| java.lang.Object edu.umd.cs.findbugs.ba.Hierarchy2
Hierarchy2 | public class Hierarchy2 (Code) | | Facade for class hierarchy queries.
These typically access the class hierarchy using
the
org.apache.bcel.Repository class. Callers should generally
expect to handle ClassNotFoundException for when referenced
classes can't be found.
author: William Pugh |
Method Summary | |
public static ObjectType[] | findDeclaredExceptions(InvokeInstruction inv, ConstantPoolGen cpg) Find the declared exceptions for the method called
by given instruction. | public static XMethod | findExactMethod(InvokeInstruction inv, ConstantPoolGen cpg, JavaClassAndMethodChooser chooser) Look up the method referenced by given InvokeInstruction. | public static XMethod | findInvocationLeastUpperBound(InvokeInstruction inv, ConstantPoolGen cpg, JavaClassAndMethodChooser methodChooser) | public static XMethod | findInvocationLeastUpperBound(ClassDescriptor classDesc, String methodName, String methodSig, boolean invokeStatic, boolean invokeInterface) | public static XMethod | findInvocationLeastUpperBound(XClass jClass, String methodName, String methodSig, boolean invokeStatic, boolean invokeInterface) | public static XMethod | findMethod(ClassDescriptor classDescriptor, String methodName, String methodSig, boolean isStatic) | static XClass | getXClass(String c) | static XClass | getXClass(ClassDescriptor c) | static XClass | getXClassFromDottedClassName(String c) | public static Set<XMethod> | resolveMethodCallTargets(InvokeInstruction invokeInstruction, TypeFrame typeFrame, ConstantPoolGen cpg) Resolve possible method call targets. | public static Set<XMethod> | resolveMethodCallTargets(ReferenceType receiverType, InvokeInstruction invokeInstruction, ConstantPoolGen cpg) Resolve possible instance method call targets. | public static Set<XMethod> | resolveMethodCallTargets(ReferenceType receiverType, InvokeInstruction invokeInstruction, ConstantPoolGen cpg, boolean receiverTypeIsExact) Resolve possible instance method call targets. |
findDeclaredExceptions | public static ObjectType[] findDeclaredExceptions(InvokeInstruction inv, ConstantPoolGen cpg) throws ClassNotFoundException(Code) | | Find the declared exceptions for the method called
by given instruction.
Parameters: inv - the InvokeInstruction Parameters: cpg - the ConstantPoolGen used by the class the InvokeInstruction belongs to array of ObjectTypes of thrown exceptions, or nullif we can't find the method implementation |
findExactMethod | public static XMethod findExactMethod(InvokeInstruction inv, ConstantPoolGen cpg, JavaClassAndMethodChooser chooser) throws ClassNotFoundException(Code) | | Look up the method referenced by given InvokeInstruction.
This method does not look for implementations in
super or subclasses according to the virtual dispatch rules.
Parameters: inv - the InvokeInstruction Parameters: cpg - the ConstantPoolGen used by the class the InvokeInstruction belongs to Parameters: chooser - JavaClassAndMethodChooser to use to pick the method from among the candidates the JavaClassAndMethod, or null if no such method is defined in the class |
resolveMethodCallTargets | public static Set<XMethod> resolveMethodCallTargets(ReferenceType receiverType, InvokeInstruction invokeInstruction, ConstantPoolGen cpg) throws ClassNotFoundException(Code) | | Resolve possible instance method call targets.
Assumes that invokevirtual and invokeinterface methods may
call any subtype of the receiver class.
Parameters: receiverType - type of the receiver object Parameters: invokeInstruction - the InvokeInstruction Parameters: cpg - the ConstantPoolGen Set of methods which might be called throws: ClassNotFoundException - |
resolveMethodCallTargets | public static Set<XMethod> resolveMethodCallTargets(ReferenceType receiverType, InvokeInstruction invokeInstruction, ConstantPoolGen cpg, boolean receiverTypeIsExact) throws ClassNotFoundException(Code) | | Resolve possible instance method call targets.
Parameters: receiverType - type of the receiver object Parameters: invokeInstruction - the InvokeInstruction Parameters: cpg - the ConstantPoolGen Parameters: receiverTypeIsExact - if true, the receiver type is known exactly,which should allow a precise result Set of methods which might be called throws: ClassNotFoundException - |
|
|