public class ClassContext
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static boolean |
DUMP_DATAFLOW_ANALYSIS |
static boolean |
TIME_ANALYSES |
| Constructor and Description |
|---|
ClassContext(org.apache.bcel.classfile.JavaClass jclass,
AnalysisContext analysisContext)
Constructor.
|
| Modifier and Type | Method and 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.
|
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() |
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.
|
java.lang.String |
toString() |
public static final boolean DEBUG
public static final boolean TIME_ANALYSES
public static final boolean DUMP_DATAFLOW_ANALYSIS
public ClassContext(org.apache.bcel.classfile.JavaClass jclass,
AnalysisContext analysisContext)
jclass - the JavaClasspublic java.lang.String toString()
toString in class java.lang.Objectpublic 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)
analysisClass - class the method analysis object should belong tomethodDescriptor - method descriptor identifying the analyzed methodpublic 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 methodDataflowAnalysisExceptionCFGBuilderExceptionpublic ValueNumberDataflow getValueNumberDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method - the methodDataflowAnalysisExceptionCFGBuilderExceptionpublic IsNullValueDataflow getIsNullValueDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method - the methodDataflowAnalysisExceptionCFGBuilderExceptionpublic TypeDataflow getTypeDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method - the methodDataflowAnalysisExceptionCFGBuilderExceptionpublic DepthFirstSearch getDepthFirstSearch(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method - the methodCFGBuilderExceptionpublic 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)
@CheckForNull 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 methodCFGBuilderExceptionDataflowAnalysisExceptionpublic LockChecker getLockChecker(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic ReturnPathDataflow getReturnPathDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic DominatorsAnalysis getNonExceptionDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic PostDominatorsAnalysis getNonImplicitExceptionDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic PostDominatorsAnalysis getNonExceptionPostDominatorsAnalysis(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic 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 methodDataflowAnalysisExceptionCFGBuilderExceptionpublic BlockTypeDataflow getBlockTypeDataflow(org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
method - the methodDataflowAnalysisExceptionCFGBuilderExceptionpublic AssertionMethods getAssertionMethods()
public ConstantDataflow getConstantDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic LoadDataflow getLoadDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic StoreDataflow getStoreDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic CallListDataflow getCallListDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic java.util.BitSet linesMentionedMultipleTimes(org.apache.bcel.classfile.Method method)
public UnconditionalValueDerefDataflow getUnconditionalValueDerefDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic CompactLocationNumbering getCompactLocationNumbering(org.apache.bcel.classfile.Method method) throws CFGBuilderException
method - a methodCFGBuilderExceptionpublic ReturnPathTypeDataflow getReturnPathTypeDataflow(org.apache.bcel.classfile.Method method) throws CFGBuilderException, DataflowAnalysisException
method - the methodCFGBuilderExceptionDataflowAnalysisExceptionpublic 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
DataflowAnalysisExceptionpublic static void dumpTypeDataflow(org.apache.bcel.classfile.Method method,
CFG cfg,
TypeDataflow typeDataflow)
throws DataflowAnalysisException
DataflowAnalysisExceptionpublic static void dumpLiveLocalStoreDataflow(MethodDescriptor method, CFG cfg, LiveLocalStoreDataflow dataflow) throws DataflowAnalysisException
DataflowAnalysisExceptionFindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.