public abstract class ShrikeBTMethod extends Object implements IMethod, com.ibm.wala.shrikeBT.BytecodeConstants
Modifier and Type | Class and Description |
---|---|
protected static class |
ShrikeBTMethod.BytecodeInfo |
IMethod.SourcePosition
ContextItem.Value<T>
Modifier and Type | Field and Description |
---|---|
protected IClass |
declaringClass
A wrapper around the declaring class.
|
JBC_aaload, JBC_aastore, JBC_aconst_null, JBC_aload, JBC_aload_0, JBC_aload_1, JBC_aload_2, JBC_aload_3, JBC_anewarray, JBC_areturn, JBC_arraylength, JBC_astore, JBC_astore_0, JBC_astore_1, JBC_astore_2, JBC_astore_3, JBC_athrow, JBC_baload, JBC_bastore, JBC_bipush, JBC_caload, JBC_castore, JBC_checkcast, JBC_d2f, JBC_d2i, JBC_d2l, JBC_dadd, JBC_daload, JBC_dastore, JBC_dcmpg, JBC_dcmpl, JBC_dconst_0, JBC_dconst_1, JBC_ddiv, JBC_dload, JBC_dload_0, JBC_dload_1, JBC_dload_2, JBC_dload_3, JBC_dmul, JBC_dneg, JBC_drem, JBC_dreturn, JBC_dstore, JBC_dstore_0, JBC_dstore_1, JBC_dstore_2, JBC_dstore_3, JBC_dsub, JBC_dup, JBC_dup_x1, JBC_dup_x2, JBC_dup2, JBC_dup2_x1, JBC_dup2_x2, JBC_f2d, JBC_f2i, JBC_f2l, JBC_fadd, JBC_faload, JBC_fastore, JBC_fcmpg, JBC_fcmpl, JBC_fconst_0, JBC_fconst_1, JBC_fconst_2, JBC_fdiv, JBC_fload, JBC_fload_0, JBC_fload_1, JBC_fload_2, JBC_fload_3, JBC_fmul, JBC_fneg, JBC_frem, JBC_freturn, JBC_fstore, JBC_fstore_0, JBC_fstore_1, JBC_fstore_2, JBC_fstore_3, JBC_fsub, JBC_getfield, JBC_getstatic, JBC_goto, JBC_goto_w, JBC_i2d, JBC_i2f, JBC_i2l, JBC_iadd, JBC_iaload, JBC_iand, JBC_iastore, JBC_iconst_0, JBC_iconst_1, JBC_iconst_2, JBC_iconst_3, JBC_iconst_4, JBC_iconst_5, JBC_iconst_m1, JBC_idiv, JBC_if_acmpeq, JBC_if_acmpne, JBC_if_icmpeq, JBC_if_icmpge, JBC_if_icmpgt, JBC_if_icmple, JBC_if_icmplt, JBC_if_icmpne, JBC_ifeq, JBC_ifge, JBC_ifgt, JBC_ifle, JBC_iflt, JBC_ifne, JBC_ifnonnull, JBC_ifnull, JBC_iinc, JBC_iload, JBC_iload_0, JBC_iload_1, JBC_iload_2, JBC_iload_3, JBC_impdep1, JBC_impdep2, JBC_imul, JBC_ineg, JBC_instanceof, JBC_int2byte, JBC_int2char, JBC_int2short, JBC_invokeinterface, JBC_invokespecial, JBC_invokestatic, JBC_invokevirtual, JBC_ior, JBC_irem, JBC_ireturn, JBC_ishl, JBC_ishr, JBC_istore, JBC_istore_0, JBC_istore_1, JBC_istore_2, JBC_istore_3, JBC_isub, JBC_iushr, JBC_ixor, JBC_jsr, JBC_jsr_w, JBC_l2d, JBC_l2f, JBC_l2i, JBC_ladd, JBC_laload, JBC_land, JBC_lastore, JBC_lcmp, JBC_lconst_0, JBC_lconst_1, JBC_ldc, JBC_ldc_w, JBC_ldc2_w, JBC_ldiv, JBC_length, JBC_lload, JBC_lload_0, JBC_lload_1, JBC_lload_2, JBC_lload_3, JBC_lmul, JBC_lneg, JBC_lookupswitch, JBC_lor, JBC_lrem, JBC_lreturn, JBC_lshl, JBC_lshr, JBC_lstore, JBC_lstore_0, JBC_lstore_1, JBC_lstore_2, JBC_lstore_3, JBC_lsub, JBC_lushr, JBC_lxor, JBC_monitorenter, JBC_monitorexit, JBC_multianewarray, JBC_name, JBC_new, JBC_newarray, JBC_nop, JBC_pop, JBC_pop2, JBC_putfield, JBC_putstatic, JBC_ret, JBC_return, JBC_saload, JBC_sastore, JBC_sipush, JBC_swap, JBC_tableswitch, JBC_wide, JBC_xxxunusedxxx
Constructor and Description |
---|
ShrikeBTMethod(IClass klass) |
Modifier and Type | Method and Description |
---|---|
void |
clearCaches()
Clear all optional cached data associated with this class.
|
boolean |
equals(Object obj) |
Iterator<TypeReference> |
getArraysRead() |
Iterator<TypeReference> |
getArraysWritten() |
protected ShrikeBTMethod.BytecodeInfo |
getBCInfo() |
int |
getBytecodeIndex(int instructionIndex)
Return the program counter (bytecode index) for a particular Shrike instruction index.
|
protected abstract byte[] |
getBytecodes() |
BytecodeStream |
getBytecodeStream()
Method getBytecodeStream.
|
Collection<CallSiteReference> |
getCallSites() |
Iterator<TypeReference> |
getCastTypes() |
Set<TypeReference> |
getCaughtExceptionTypes() |
TypeReference[] |
getDeclaredExceptions()
Clients should not modify the returned array.
|
protected abstract String[] |
getDeclaredExceptionTypeNames() |
IClass |
getDeclaringClass()
Return the object that represents the declaring class
for this member.
|
Descriptor |
getDescriptor()
something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
|
Iterator<FieldReference> |
getFieldsRead() |
Iterator<FieldReference> |
getFieldsWritten() |
com.ibm.wala.shrikeBT.ExceptionHandler[][] |
getHandlers() |
Collection<TypeReference> |
getImplicitExceptionTypes() |
int |
getInstructionIndex(int bcIndex)
Return the Shrike instruction index for a particular valid program counter (bytecode index), or -1 if
the Shrike instriction index could not be determined.
|
com.ibm.wala.shrikeBT.IInstruction[] |
getInstructions() |
int |
getLineNumber(int bcIndex)
END Custom change: precise bytecode positions
|
abstract String |
getLocalVariableName(int bcIndex,
int localNumber) |
abstract int |
getMaxLocals() |
abstract int |
getMaxStackHeight() |
protected abstract String |
getMethodName() |
protected abstract String |
getMethodSignature() |
protected abstract int |
getModifiers() |
Atom |
getName() |
int |
getNumberOfParameters()
Method getNumberOfParameters.
|
int |
getNumShrikeInstructions()
Return the number of Shrike instructions for this method.
|
IMethod.SourcePosition |
getParameterSourcePosition(int paramNum) |
TypeReference |
getParameterType(int i)
By convention, for a non-static method, getParameterType(0) is the this pointer
|
MethodReference |
getReference() |
Selector |
getSelector()
something like: foo(Ljava/langString;)Ljava/lang/Class;
|
String |
getSignature()
something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
|
IMethod.SourcePosition |
getSourcePosition(int bcIndex)
BEGIN Custom change: precise bytecode positions
|
abstract boolean |
hasExceptionHandler() |
int |
hashCode() |
abstract boolean |
hasLocalVariableTable() |
boolean |
hasMonitorOp() |
boolean |
isAbstract()
Is this method abstract?
|
boolean |
isBridge()
Is this method a bridge method? See JLS 3rd Edition 15.12.4.5
|
boolean |
isClinit()
Is this method a class initializer?
|
boolean |
isFinal()
Is this method final?
|
boolean |
isInit()
Is this method an object initializer?
|
boolean |
isNative()
Is this method native?
|
boolean |
isPrivate()
Is this method private?
|
boolean |
isProtected()
Is this method protected?
|
boolean |
isPublic()
Is this method public?
|
boolean |
isStatic()
Is this member static?
|
boolean |
isSynchronized()
Is this method synchronized?
|
boolean |
isSynthetic()
Is this method synthetic, i.e., compiler-generated (this refers to the
synthetic flag in java/dex bytecode)
|
boolean |
isWalaSynthetic()
Is the implementation of this method a model generated by WALA?
For compiler-generated synthetic methods, refer to
IMethod.isSynthetic() |
protected abstract com.ibm.wala.shrikeBT.Decoder |
makeDecoder()
Find the decoder object for this method, or create one if necessary.
|
protected abstract void |
processDebugInfo(ShrikeBTMethod.BytecodeInfo bcInfo)
Walk through the bytecodes and collect trivial information.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNumberOfDefaultParameters, getReturnType
getAnnotations
getClassHierarchy
protected final IClass declaringClass
public ShrikeBTMethod(IClass klass)
protected ShrikeBTMethod.BytecodeInfo getBCInfo() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public int getBytecodeIndex(int instructionIndex) throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public int getInstructionIndex(int bcIndex) throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public int getNumShrikeInstructions() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public Collection<CallSiteReference> getCallSites() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public Collection<TypeReference> getImplicitExceptionTypes() throws com.ibm.wala.shrikeCT.InvalidClassFileException
Set
<TypeReference
>, the exceptions that statements in this method may throw,com.ibm.wala.shrikeCT.InvalidClassFileException
public boolean hasMonitorOp() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public Iterator<FieldReference> getFieldsWritten() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public Iterator<FieldReference> getFieldsRead() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public Iterator<TypeReference> getArraysRead() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public Iterator<TypeReference> getArraysWritten() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public Iterator<TypeReference> getCastTypes() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
protected abstract byte[] getBytecodes()
public BytecodeStream getBytecodeStream()
protected abstract String getMethodName() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
protected abstract String getMethodSignature() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public MethodReference getReference()
getReference
in interface IMethod
public boolean isClinit()
IMethod
public boolean isInit()
IMethod
protected abstract int getModifiers()
public boolean isNative()
IMethod
public boolean isAbstract()
IMethod
isAbstract
in interface IMethod
public boolean isPrivate()
IMethod
public boolean isProtected()
IMethod
isProtected
in interface IMethod
public boolean isPublic()
IMethod
public boolean isFinal()
IMethod
public boolean isBridge()
IMethod
public boolean isSynchronized()
IMethod
isSynchronized
in interface IMethod
public boolean isStatic()
IMember
public boolean isSynthetic()
IMethod
isSynthetic
in interface IMethod
public boolean isWalaSynthetic()
IMethod
IMethod.isSynthetic()
isWalaSynthetic
in interface IMethod
public IClass getDeclaringClass()
IMember
getDeclaringClass
in interface IMember
protected abstract com.ibm.wala.shrikeBT.Decoder makeDecoder()
protected abstract void processDebugInfo(ShrikeBTMethod.BytecodeInfo bcInfo) throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public abstract int getMaxLocals()
public abstract int getMaxStackHeight()
public Atom getName()
public Descriptor getDescriptor()
IMethod
getDescriptor
in interface IMethod
public com.ibm.wala.shrikeBT.IInstruction[] getInstructions() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public com.ibm.wala.shrikeBT.ExceptionHandler[][] getHandlers() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public TypeReference getParameterType(int i)
getParameterType
in interface IMethod
public int getNumberOfParameters()
getNumberOfParameters
in interface IMethod
public abstract boolean hasExceptionHandler()
hasExceptionHandler
in interface IMethod
public TypeReference[] getDeclaredExceptions() throws com.ibm.wala.shrikeCT.InvalidClassFileException
getDeclaredExceptions
in interface IMethod
com.ibm.wala.shrikeCT.InvalidClassFileException
protected abstract String[] getDeclaredExceptionTypeNames() throws com.ibm.wala.shrikeCT.InvalidClassFileException
com.ibm.wala.shrikeCT.InvalidClassFileException
public IMethod.SourcePosition getSourcePosition(int bcIndex) throws com.ibm.wala.shrikeCT.InvalidClassFileException
getSourcePosition
in interface IMethod
com.ibm.wala.shrikeCT.InvalidClassFileException
public IMethod.SourcePosition getParameterSourcePosition(int paramNum) throws com.ibm.wala.shrikeCT.InvalidClassFileException
getParameterSourcePosition
in interface IMethod
com.ibm.wala.shrikeCT.InvalidClassFileException
public int getLineNumber(int bcIndex)
getLineNumber
in interface IMethod
public Set<TypeReference> getCaughtExceptionTypes() throws com.ibm.wala.shrikeCT.InvalidClassFileException
Set
<TypeReference
>com.ibm.wala.shrikeCT.InvalidClassFileException
public String getSignature()
IMethod
getSignature
in interface IMethod
public Selector getSelector()
IMethod
getSelector
in interface IMethod
public abstract String getLocalVariableName(int bcIndex, int localNumber)
getLocalVariableName
in interface IMethod
public abstract boolean hasLocalVariableTable()
hasLocalVariableTable
in interface IMethod
public void clearCaches()
Copyright © 2019. All rights reserved.