public class ClassContext
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static boolean |
DEBUG |
|
static int |
depth |
|
static boolean |
DUMP_DATAFLOW_ANALYSIS |
|
static boolean |
TIME_ANALYSES |
Constructor | Description |
---|---|
ClassContext(org.apache.bcel.classfile.JavaClass jclass,
AnalysisContext analysisContext) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
public static final boolean DEBUG
public static final boolean TIME_ANALYSES
public static final boolean DUMP_DATAFLOW_ANALYSIS
public static int depth
public ClassContext(org.apache.bcel.classfile.JavaClass jclass, AnalysisContext analysisContext)
jclass
- the JavaClasspublic 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 methodCheckedAnalysisException
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 MethodGenpublic 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 methodpublic CFG getCFG(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method
- the methodCFGBuilderException
- 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 methodDataflowAnalysisException
CFGBuilderException
public ValueNumberDataflow getValueNumberDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the methodDataflowAnalysisException
CFGBuilderException
public IsNullValueDataflow getIsNullValueDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the methodDataflowAnalysisException
CFGBuilderException
public TypeDataflow getTypeDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the methodDataflowAnalysisException
CFGBuilderException
public DepthFirstSearch getDepthFirstSearch(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method
- the methodCFGBuilderException
public ReverseDepthFirstSearch getReverseDepthFirstSearch(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method
- the methodCFGBuilderException
@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 methodpublic LockDataflow getLockDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public LockChecker getLockChecker(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public ReturnPathDataflow getReturnPathDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public DominatorsAnalysis getNonExceptionDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public PostDominatorsAnalysis getNonImplicitExceptionDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public PostDominatorsAnalysis getNonExceptionPostDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public ExceptionSetFactory getExceptionSetFactory(org.apache.bcel.classfile.Method method)
method
- the methodpublic java.lang.String[] getParameterSignatureList(org.apache.bcel.classfile.Method method)
method
- the methodpublic LoadedFieldSet getLoadedFieldSet(org.apache.bcel.classfile.Method method)
method
- the methodpublic LiveLocalStoreDataflow getLiveLocalStoreDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the methodDataflowAnalysisException
CFGBuilderException
public BlockTypeDataflow getBlockTypeDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method
- the methodDataflowAnalysisException
CFGBuilderException
public AssertionMethods getAssertionMethods()
public ConstantDataflow getConstantDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public LoadDataflow getLoadDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public StoreDataflow getStoreDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
DataflowAnalysisException
public CallListDataflow getCallListDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
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 methodCFGBuilderException
DataflowAnalysisException
public CompactLocationNumbering getCompactLocationNumbering(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method
- a methodCFGBuilderException
public DefinitelyNullSetDataflow getDefinitelyNullSetDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- a methodDataflowAnalysisException
CFGBuilderException
public ReturnPathTypeDataflow getReturnPathTypeDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method
- the methodCFGBuilderException
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
- TODODataflowAnalysisException
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™ is licenced under the LGPL. Copyright © 2006 University of Maryland.