public class Analyzer
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Analyzer.FailureException
This exception is thrown by verify() when it fails.
|
static class |
Analyzer.PathElement |
static class |
Analyzer.TypeVisitor |
| Modifier and Type | Field and Description |
|---|---|
protected int[][] |
backEdges |
protected java.util.BitSet |
basicBlockStarts |
protected java.lang.String |
classType |
protected ExceptionHandler[][] |
handlers |
protected ClassHierarchyProvider |
hierarchy |
protected IInstruction[] |
instructions |
protected int[] |
instToBC |
protected boolean |
isConstructor |
protected boolean |
isStatic |
protected java.lang.String[][] |
locals |
protected int |
maxLocals |
protected int |
maxStack |
protected static int[] |
noEdges |
protected static java.lang.String[] |
noStrings |
protected java.lang.String |
signature |
protected java.lang.String[][] |
stacks |
protected int[] |
stackSizes |
static java.lang.String |
thisType |
static java.lang.String |
topType |
protected java.lang.String[][] |
varTypes |
| Modifier | Constructor and Description |
|---|---|
|
Analyzer(boolean isConstructor,
boolean isStatic,
java.lang.String classType,
java.lang.String signature,
IInstruction[] instructions,
ExceptionHandler[][] handlers,
int[] instToBC,
java.lang.String[][] vars) |
protected |
Analyzer(MethodData info) |
protected |
Analyzer(MethodData info,
int[] instToBC,
java.lang.String[][] vars) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeTypes(Analyzer.TypeVisitor v,
java.util.BitSet makeTypesAt,
boolean wantPath)
Verify the method and compute types at every program point.
|
static Analyzer |
createAnalyzer(MethodData info) |
java.lang.String |
findCommonSupertype(java.lang.String t1,
java.lang.String t2) |
int[][] |
getBackEdges() |
java.util.BitSet |
getBasicBlockStarts() |
IInstruction[] |
getInstructions() |
java.lang.String[][] |
getLocalTypes() |
java.util.BitSet |
getReachableFrom(int from) |
java.util.BitSet |
getReachableFrom(int from,
boolean followHandlers,
java.util.BitSet mask) |
void |
getReachableFromUpdate(int from,
java.util.BitSet reachable,
boolean followHandlers,
java.util.BitSet mask) |
void |
getReachingToUpdate(int to,
java.util.BitSet reaching,
java.util.BitSet mask) |
int[] |
getStackSizes() |
java.lang.String[][] |
getStackTypes() |
protected void |
initTypeInfo() |
boolean |
isSubtypeOf(java.lang.String t1,
java.lang.String t2) |
void |
setClassHierarchy(ClassHierarchyProvider h)
Use class hierarchy information in 'h'.
|
static java.lang.String |
stripSharp(java.lang.String type) |
public static final java.lang.String thisType
public static final java.lang.String topType
protected final boolean isConstructor
protected final boolean isStatic
protected final java.lang.String classType
protected final java.lang.String signature
protected final IInstruction[] instructions
protected final ExceptionHandler[][] handlers
protected ClassHierarchyProvider hierarchy
protected int maxStack
protected int maxLocals
protected java.lang.String[][] stacks
protected java.lang.String[][] locals
protected int[] stackSizes
protected java.util.BitSet basicBlockStarts
protected int[][] backEdges
protected int[] instToBC
protected java.lang.String[][] varTypes
protected static final java.lang.String[] noStrings
protected static final int[] noEdges
public Analyzer(boolean isConstructor,
boolean isStatic,
java.lang.String classType,
java.lang.String signature,
IInstruction[] instructions,
ExceptionHandler[][] handlers,
int[] instToBC,
java.lang.String[][] vars)
protected Analyzer(MethodData info)
protected Analyzer(MethodData info, int[] instToBC, java.lang.String[][] vars)
public final void setClassHierarchy(ClassHierarchyProvider h)
public final int[][] getBackEdges()
public final boolean isSubtypeOf(java.lang.String t1,
java.lang.String t2)
public final java.lang.String findCommonSupertype(java.lang.String t1,
java.lang.String t2)
public final java.util.BitSet getBasicBlockStarts()
public final IInstruction[] getInstructions()
public final java.util.BitSet getReachableFrom(int from)
public final void getReachableFromUpdate(int from,
java.util.BitSet reachable,
boolean followHandlers,
java.util.BitSet mask)
public final java.util.BitSet getReachableFrom(int from,
boolean followHandlers,
java.util.BitSet mask)
public final void getReachingToUpdate(int to,
java.util.BitSet reaching,
java.util.BitSet mask)
public static java.lang.String stripSharp(java.lang.String type)
public int[] getStackSizes()
throws Analyzer.FailureException
Analyzer.FailureExceptionprotected final void initTypeInfo()
throws Analyzer.FailureException
Analyzer.FailureExceptionpublic final void computeTypes(Analyzer.TypeVisitor v, java.util.BitSet makeTypesAt, boolean wantPath) throws Analyzer.FailureException
Analyzer.FailureException - the method contains invalid bytecodepublic final java.lang.String[][] getLocalTypes()
public final java.lang.String[][] getStackTypes()
public static Analyzer createAnalyzer(MethodData info)