|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.ClassContext
public class ClassContext
A ClassContext caches all of the auxiliary objects used to analyze the methods of a class. That way, these objects don't need to be created over and over again.
Field Summary | |
---|---|
static boolean |
DEBUG
|
static int |
depth
|
static boolean |
DUMP_DATAFLOW_ANALYSIS
|
static boolean |
TIME_ANALYSES
|
Constructor Summary | |
---|---|
ClassContext(org.apache.bcel.classfile.JavaClass jclass,
AnalysisContext analysisContext)
Constructor. |
Method Summary | |
---|---|
void |
dumpDataflowInformation(org.apache.bcel.classfile.Method method)
|
static void |
dumpDataflowInformation(org.apache.bcel.classfile.Method method,
CFG cfg,
ValueNumberDataflow vnd,
IsNullValueDataflow inv,
UnconditionalValueDerefDataflow dataflow,
TypeDataflow typeDataflow)
|
static void |
dumpLiveLocalStoreDataflow(MethodDescriptor method,
CFG cfg,
LiveLocalStoreDataflow dataflow)
|
void |
dumpSimpleDataflowInformation(org.apache.bcel.classfile.Method method)
|
static void |
dumpTypeDataflow(org.apache.bcel.classfile.Method method,
CFG cfg,
TypeDataflow typeDataflow)
|
AnalysisContext |
getAnalysisContext()
Get the AnalysisContext. |
AssertionMethods |
getAssertionMethods()
Get AssertionMethods for class. |
BlockTypeDataflow |
getBlockTypeDataflow(org.apache.bcel.classfile.Method method)
Get BlockType dataflow for given method. |
static java.util.BitSet |
getBytecodeSet(org.apache.bcel.classfile.JavaClass clazz,
org.apache.bcel.classfile.Method method)
Get a BitSet representing the bytecodes that are used in the given method. |
java.util.BitSet |
getBytecodeSet(org.apache.bcel.classfile.Method method)
Get a BitSet representing the bytecodes that are used in the given method. |
CallListDataflow |
getCallListDataflow(org.apache.bcel.classfile.Method method)
Get CallListDataflow for method. |
CFG |
getCFG(org.apache.bcel.classfile.Method method)
Get a CFG for given method. |
ClassDescriptor |
getClassDescriptor()
|
CompactLocationNumbering |
getCompactLocationNumbering(org.apache.bcel.classfile.Method method)
Get a CompactLocationNumbering for a method. |
ConstantDataflow |
getConstantDataflow(org.apache.bcel.classfile.Method method)
Get ConstantDataflow for method. |
org.apache.bcel.generic.ConstantPoolGen |
getConstantPoolGen()
Get the ConstantPoolGen used to create the MethodGens for this class. |
DefinitelyNullSetDataflow |
getDefinitelyNullSetDataflow(org.apache.bcel.classfile.Method method)
Get DefinitelyNullSetDataflow for a method. |
DepthFirstSearch |
getDepthFirstSearch(org.apache.bcel.classfile.Method method)
Get a DepthFirstSearch for given method. |
ExceptionSetFactory |
getExceptionSetFactory(org.apache.bcel.classfile.Method method)
Get ExceptionSetFactory for given method. |
java.lang.String |
getFullyQualifiedMethodName(org.apache.bcel.classfile.Method method)
|
IsNullValueDataflow |
getIsNullValueDataflow(org.apache.bcel.classfile.Method method)
Get an IsNullValueDataflow for given method. |
org.apache.bcel.classfile.JavaClass |
getJavaClass()
Get the JavaClass. |
LiveLocalStoreDataflow |
getLiveLocalStoreDataflow(org.apache.bcel.classfile.Method method)
Get LiveLocalStoreAnalysis dataflow for given method. |
LoadDataflow |
getLoadDataflow(org.apache.bcel.classfile.Method method)
Get load dataflow. |
LoadedFieldSet |
getLoadedFieldSet(org.apache.bcel.classfile.Method method)
Get the set of fields loaded by given method. |
LockChecker |
getLockChecker(org.apache.bcel.classfile.Method method)
Get LockChecker for method. |
LockDataflow |
getLockDataflow(org.apache.bcel.classfile.Method method)
Get dataflow for LockAnalysis for given method. |
RepositoryLookupFailureCallback |
getLookupFailureCallback()
Get the RepositoryLookupFailureCallback. |
static java.util.Set<java.lang.Integer> |
getLoopExitBranches(org.apache.bcel.classfile.Method method,
org.apache.bcel.generic.MethodGen methodGen)
|
org.apache.bcel.classfile.Method |
getMethod(org.apache.bcel.generic.MethodGen methodGen)
Look up the Method represented by given MethodGen. |
java.lang.Object |
getMethodAnalysis(java.lang.Class<?> analysisClass,
MethodDescriptor methodDescriptor)
Retrieve a method analysis object. |
org.apache.bcel.generic.MethodGen |
getMethodGen(org.apache.bcel.classfile.Method method)
Get a MethodGen object for given method. |
java.util.List<org.apache.bcel.classfile.Method> |
getMethodsInCallOrder()
|
DominatorsAnalysis |
getNonExceptionDominatorsAnalysis(org.apache.bcel.classfile.Method method)
Get DominatorsAnalysis for given method, where exception edges are ignored. |
PostDominatorsAnalysis |
getNonExceptionPostDominatorsAnalysis(org.apache.bcel.classfile.Method method)
Get PostDominatorsAnalysis for given method, where exception edges are ignored. |
PostDominatorsAnalysis |
getNonImplicitExceptionDominatorsAnalysis(org.apache.bcel.classfile.Method method)
Get DominatorsAnalysis for given method, where implicit exception edges are ignored. |
java.util.Map<MethodDescriptor,java.lang.Object> |
getObjectMap(java.lang.Class<?> analysisClass)
|
short[] |
getOffsetToOpcodeMap(org.apache.bcel.classfile.Method method)
Get array mapping bytecode offsets to opcodes for given method. |
java.lang.String[] |
getParameterSignatureList(org.apache.bcel.classfile.Method method)
Get array of type signatures of parameters for given method. |
ReturnPathDataflow |
getReturnPathDataflow(org.apache.bcel.classfile.Method method)
Get ReturnPathDataflow for method. |
ReturnPathTypeDataflow |
getReturnPathTypeDataflow(org.apache.bcel.classfile.Method method)
Get ReturnPathTypeDataflow for a method. |
ReverseDepthFirstSearch |
getReverseDepthFirstSearch(org.apache.bcel.classfile.Method method)
Get a ReverseDepthFirstSearch for given method. |
StoreDataflow |
getStoreDataflow(org.apache.bcel.classfile.Method method)
Get store dataflow. |
TypeDataflow |
getTypeDataflow(org.apache.bcel.classfile.Method method)
Get a TypeDataflow for given method. |
UnconditionalValueDerefDataflow |
getUnconditionalValueDerefDataflow(org.apache.bcel.classfile.Method method)
Get the UnconditionalValueDerefDataflow for a method. |
UsagesRequiringNonNullValues |
getUsagesRequiringNonNullValues(org.apache.bcel.classfile.Method method)
Get a UsagesRequiringNonNullValues for given method. |
ValueNumberDataflow |
getValueNumberDataflow(org.apache.bcel.classfile.Method method)
Get a ValueNumberDataflow for given method. |
XClass |
getXClass()
|
static void |
indent()
|
static java.util.BitSet |
linesMentionedMultipleTimes(org.apache.bcel.classfile.Method method)
|
void |
purgeAllMethodAnalyses()
|
void |
purgeMethodAnalyses(MethodDescriptor methodDescriptor)
Purge all CFG-based method analyses for given method. |
void |
putMethodAnalysis(java.lang.Class<?> analysisClass,
MethodDescriptor methodDescriptor,
java.lang.Object object)
Store a method analysis object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
public static final boolean TIME_ANALYSES
public static final boolean DUMP_DATAFLOW_ANALYSIS
public static int depth
Constructor Detail |
---|
public ClassContext(org.apache.bcel.classfile.JavaClass jclass, AnalysisContext analysisContext)
jclass
- the JavaClassMethod Detail |
---|
public static void indent()
public java.util.Map<MethodDescriptor,java.lang.Object> getObjectMap(java.lang.Class<?> analysisClass)
public void putMethodAnalysis(java.lang.Class<?> analysisClass, MethodDescriptor methodDescriptor, java.lang.Object object)
analysisClass
- class the method analysis object belongs tomethodDescriptor
- method descriptor identifying the analyzed methodobject
- the analysis object to cachepublic java.lang.Object getMethodAnalysis(java.lang.Class<?> analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException
analysisClass
- class the method analysis object should belong tomethodDescriptor
- method descriptor identifying the analyzed method
CheckedAnalysisException
public void purgeAllMethodAnalyses()
public void purgeMethodAnalyses(MethodDescriptor methodDescriptor)
methodDescriptor
- method descriptor identifying method to purgepublic org.apache.bcel.classfile.JavaClass getJavaClass()
public XClass getXClass()
public ClassDescriptor getClassDescriptor()
public org.apache.bcel.classfile.Method getMethod(org.apache.bcel.generic.MethodGen methodGen)
methodGen
- a MethodGen
public java.lang.String getFullyQualifiedMethodName(org.apache.bcel.classfile.Method method)
@NonNull public java.util.List<org.apache.bcel.classfile.Method> getMethodsInCallOrder()
public AnalysisContext getAnalysisContext()
public RepositoryLookupFailureCallback getLookupFailureCallback()
@CheckForNull public org.apache.bcel.generic.MethodGen getMethodGen(org.apache.bcel.classfile.Method method)
method
- the method
public CFG getCFG(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method
- the method
CFGBuilderException
- if a CFG cannot be constructed for the method@NonNull public org.apache.bcel.generic.ConstantPoolGen getConstantPoolGen()
public UsagesRequiringNonNullValues getUsagesRequiringNonNullValues(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the method
DataflowAnalysisException
CFGBuilderException
public ValueNumberDataflow getValueNumberDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the method
DataflowAnalysisException
CFGBuilderException
public IsNullValueDataflow getIsNullValueDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the method
DataflowAnalysisException
CFGBuilderException
public TypeDataflow getTypeDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the method
DataflowAnalysisException
CFGBuilderException
public DepthFirstSearch getDepthFirstSearch(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method
- the method
CFGBuilderException
public ReverseDepthFirstSearch getReverseDepthFirstSearch(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method
- the method
CFGBuilderException
@CheckForNull public java.util.BitSet getBytecodeSet(org.apache.bcel.classfile.Method method)
method
- the method
@CheckForNull public static java.util.BitSet getBytecodeSet(org.apache.bcel.classfile.JavaClass clazz, org.apache.bcel.classfile.Method method)
method
- the method
@NonNull public static java.util.Set<java.lang.Integer> getLoopExitBranches(org.apache.bcel.classfile.Method method, org.apache.bcel.generic.MethodGen methodGen)
public short[] getOffsetToOpcodeMap(org.apache.bcel.classfile.Method method)
method
- the method
public LockDataflow getLockDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public LockChecker getLockChecker(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public ReturnPathDataflow getReturnPathDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public DominatorsAnalysis getNonExceptionDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public PostDominatorsAnalysis getNonImplicitExceptionDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public PostDominatorsAnalysis getNonExceptionPostDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public ExceptionSetFactory getExceptionSetFactory(org.apache.bcel.classfile.Method method)
method
- the method
public java.lang.String[] getParameterSignatureList(org.apache.bcel.classfile.Method method)
method
- the method
public LoadedFieldSet getLoadedFieldSet(org.apache.bcel.classfile.Method method)
method
- the method
public LiveLocalStoreDataflow getLiveLocalStoreDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the method
DataflowAnalysisException
CFGBuilderException
public BlockTypeDataflow getBlockTypeDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the method
DataflowAnalysisException
CFGBuilderException
public AssertionMethods getAssertionMethods()
public ConstantDataflow getConstantDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public LoadDataflow getLoadDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public StoreDataflow getStoreDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public CallListDataflow getCallListDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public static java.util.BitSet linesMentionedMultipleTimes(org.apache.bcel.classfile.Method method)
public UnconditionalValueDerefDataflow getUnconditionalValueDerefDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public CompactLocationNumbering getCompactLocationNumbering(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method
- a method
CFGBuilderException
public DefinitelyNullSetDataflow getDefinitelyNullSetDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- a method
DataflowAnalysisException
CFGBuilderException
public ReturnPathTypeDataflow getReturnPathTypeDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the method
CFGBuilderException
DataflowAnalysisException
public void dumpSimpleDataflowInformation(org.apache.bcel.classfile.Method method)
public void dumpDataflowInformation(org.apache.bcel.classfile.Method method)
public static void dumpDataflowInformation(org.apache.bcel.classfile.Method method, CFG cfg, ValueNumberDataflow vnd, IsNullValueDataflow inv, @CheckForNull UnconditionalValueDerefDataflow dataflow, @CheckForNull TypeDataflow typeDataflow) throws DataflowAnalysisException
method
- cfg
- vnd
- inv
- dataflow
- typeDataflow
- TODO
DataflowAnalysisException
public static void dumpTypeDataflow(org.apache.bcel.classfile.Method method, CFG cfg, TypeDataflow typeDataflow) throws DataflowAnalysisException
method
- cfg
- typeDataflow
-
DataflowAnalysisException
public static void dumpLiveLocalStoreDataflow(MethodDescriptor method, CFG cfg, LiveLocalStoreDataflow dataflow) throws DataflowAnalysisException
method
- cfg
- typeDataflow
-
DataflowAnalysisException
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |