Package com.mebigfatguy.fbcontrib.detect
Class IncorrectInternalClassUse
java.lang.Object
com.mebigfatguy.fbcontrib.detect.IncorrectInternalClassUse
- All Implemented Interfaces:
edu.umd.cs.findbugs.Detector,edu.umd.cs.findbugs.Priorities
looks for classes that use objects from com.sun.xxx packages. As these are
internal to sun and subject to change, this should not be done.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final edu.umd.cs.findbugs.BugReporterFields inherited from interface edu.umd.cs.findbugs.Priorities
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionIncorrectInternalClassUse(edu.umd.cs.findbugs.BugReporter bugReporter) constructs a IICU detector given the reporter to report bugs on -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanisInternal(String clsName) determines if the class in question is an internal class by looking at package prefixesvoidreport()implementation stub for Detector interfacetoString()voidvisitClassContext(edu.umd.cs.findbugs.ba.ClassContext context) implements the visitor to look for classes that reference com.sun.xxx, or org.apache.xerces.xxx classes by looking for class Const in the constant pool
-
Field Details
-
internalPackages
-
externalPackages
-
bugReporter
private final edu.umd.cs.findbugs.BugReporter bugReporter
-
-
Constructor Details
-
IncorrectInternalClassUse
public IncorrectInternalClassUse(edu.umd.cs.findbugs.BugReporter bugReporter) constructs a IICU detector given the reporter to report bugs on- Parameters:
bugReporter- the sync of bug reports
-
-
Method Details
-
visitClassContext
public void visitClassContext(edu.umd.cs.findbugs.ba.ClassContext context) implements the visitor to look for classes that reference com.sun.xxx, or org.apache.xerces.xxx classes by looking for class Const in the constant pool- Specified by:
visitClassContextin interfaceedu.umd.cs.findbugs.Detector- Parameters:
context- the context object of the currently parsed class
-
report
public void report()implementation stub for Detector interface- Specified by:
reportin interfaceedu.umd.cs.findbugs.Detector
-
isInternal
determines if the class in question is an internal class by looking at package prefixes- Parameters:
clsName- the name of the class to check- Returns:
- whether the class is internal
-
toString
-