| java.lang.Object tide.staticanalysis.StaticAnalysis
StaticAnalysis | final public class StaticAnalysis (Code) | | [Oct2007]: first motivation: enforce Override declarations !
=> after JLint Lint4J and Xlint: Tlint is born !
no other tool find them. They must use source (cause of annotation retention that limit existence to source)
TODO: also look in anonymous classes, typically adapters (or search for new XXAdapter(){
TODO2: check @edu.umd.cs.findbugs.annotations.OverrideMustInvoke
TODO3: make HTMLEditorKit.ParserCallback override correctly handled
|
Method Summary | |
public static void | analyse(List<SourceFile> srcs) | public static int | analyse(SourceFile si) | public static int | analyse(SourceFile si, ClassNode tn, String simpleFileName) Search for missing Overrides (also static !). | public static int | getNumberOfArgsFromSimplified1Sign(String s) | public static String | getSignatureSimplified1(Method mh) Just use name + "%" + number of args. | public static String | getSignatureSimplified2(Method mh) Name +"("+ list of arg types simple names) (String,double[],..) no spaces, no generics. | public static String | getSignatureSimplified2Gen(Method mh, Map<String, String> claParamTypesForName) Name +"("+ list of arg types simple names) (String,double[],..) no spaces, no generics. | public static void | readSettings(ProjectSettings proj) Should be called at project changes. | public static void | saveSettings(ProjectSettings proj) Should be called on changes only => from the dialog. |
autoApplyOnChangedClasses | static boolean autoApplyOnChangedClasses(Code) | | |
detectImplementsAnn | static boolean detectImplementsAnn(Code) | | |
detectMissingOverrides | static boolean detectMissingOverrides(Code) | | |
detectMissingRecurseAnn | static boolean detectMissingRecurseAnn(Code) | | |
detectNearOverrides | static boolean detectNearOverrides(Code) | | |
detectOverrideMustInvoke | static boolean detectOverrideMustInvoke(Code) | | |
detectPrivateOverloads | static boolean detectPrivateOverloads(Code) | | |
detectRecurseAnn | static boolean detectRecurseAnn(Code) | | |
detectStaticOverloads | static boolean detectStaticOverloads(Code) | | |
analyse | public static int analyse(SourceFile si, ClassNode tn, String simpleFileName) throws Exception(Code) | | Search for missing Overrides (also static !). (EASY simplif: only count args instead full sign.)
Not possible in bytecode! java.lang.Override.class has source retention => never present in class !
|
getNumberOfArgsFromSimplified1Sign | public static int getNumberOfArgsFromSimplified1Sign(String s)(Code) | | |
getSignatureSimplified1 | public static String getSignatureSimplified1(Method mh)(Code) | | Just use name + "%" + number of args.
Useful to detect collisions, that may give hints on bad design.
|
getSignatureSimplified2 | public static String getSignatureSimplified2(Method mh)(Code) | | Name +"("+ list of arg types simple names) (String,double[],..) no spaces, no generics.
|
getSignatureSimplified2Gen | public static String getSignatureSimplified2Gen(Method mh, Map<String, String> claParamTypesForName)(Code) | | Name +"("+ list of arg types simple names) (String,double[],..) no spaces, no generics.
|
readSettings | public static void readSettings(ProjectSettings proj)(Code) | | Should be called at project changes. (load)
|
saveSettings | public static void saveSettings(ProjectSettings proj)(Code) | | Should be called on changes only => from the dialog.
|
|
|