|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.Hierarchy
public class Hierarchy
Facade for class hierarchy queries.
These typically access the class hierarchy using
the Repository
class. Callers should generally
expect to handle ClassNotFoundException for when referenced
classes can't be found.
Field Summary | |
---|---|
static org.apache.bcel.generic.ObjectType |
ERROR_TYPE
Type of java.lang.Error. |
static org.apache.bcel.generic.ObjectType |
EXCEPTION_TYPE
Type of java.lang.Exception. |
static org.apache.bcel.generic.ObjectType |
RUNTIME_EXCEPTION_TYPE
Type of java.lang.RuntimeException. |
Constructor Summary | |
---|---|
Hierarchy()
|
Method Summary | |
---|---|
static org.apache.bcel.generic.ObjectType[] |
findDeclaredExceptions(org.apache.bcel.generic.InvokeInstruction inv,
org.apache.bcel.generic.ConstantPoolGen cpg)
Find the declared exceptions for the method called by given instruction. |
static org.apache.bcel.classfile.Method |
findExactMethod(org.apache.bcel.generic.InvokeInstruction inv,
org.apache.bcel.generic.ConstantPoolGen cpg)
Look up the method referenced by given InvokeInstruction. |
static org.apache.bcel.classfile.Field |
findField(java.lang.String className,
java.lang.String fieldName)
Find a field with given name defined in given class. |
static org.apache.bcel.classfile.Method |
findMethod(org.apache.bcel.classfile.JavaClass[] classList,
java.lang.String methodName,
java.lang.String methodSig)
Find a method in given list of classes, searching the classes in order. |
static org.apache.bcel.classfile.Method |
findMethod(org.apache.bcel.classfile.JavaClass javaClass,
java.lang.String methodName,
java.lang.String methodSig)
Find a method in given class. |
static org.apache.bcel.classfile.Method |
findPrototypeMethod(org.apache.bcel.generic.InvokeInstruction inv,
org.apache.bcel.generic.ConstantPoolGen cpg)
Get the method which serves as a "prototype" for the given InvokeInstruction. |
static XField |
findXField(org.apache.bcel.generic.FieldInstruction fins,
org.apache.bcel.generic.ConstantPoolGen cpg)
Look up the field referenced by given FieldInstruction, returning it as an XField object. |
static XField |
findXField(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig)
Look up a field with given name and signature in given class, returning it as an XField object. |
static InnerClassAccess |
getInnerClassAccess(org.apache.bcel.generic.INVOKESTATIC inv,
org.apache.bcel.generic.ConstantPoolGen cpg)
Get the InnerClassAccess for access method called by given INVOKESTATIC. |
static boolean |
isInnerClassAccess(org.apache.bcel.generic.INVOKESTATIC inv,
org.apache.bcel.generic.ConstantPoolGen cpg)
Determine whether the given INVOKESTATIC instruction is an inner-class field accessor method. |
static boolean |
isMonitorNotify(java.lang.String methodName,
java.lang.String methodSig)
Determine if method whose name and signature is specified is a monitor notify operation. |
static boolean |
isMonitorWait(java.lang.String methodName,
java.lang.String methodSig)
Determine if method whose name and signature is specified is a monitor wait operation. |
static boolean |
isSubtype(org.apache.bcel.generic.ReferenceType t,
org.apache.bcel.generic.ReferenceType possibleSupertype)
Determine if one reference type is a subtype of another. |
static boolean |
isSubtype(java.lang.String clsName,
java.lang.String possibleSupertypeClassName)
Determine whether one class (or reference type) is a subtype of another. |
static boolean |
isUncheckedException(org.apache.bcel.generic.ObjectType type)
Determine if the given ObjectType refers to an unchecked exception (RuntimeException or Error). |
static boolean |
isUniversalExceptionHandler(org.apache.bcel.generic.ObjectType catchType)
Determine if the given ObjectType reference represents a universal exception handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.bcel.generic.ObjectType EXCEPTION_TYPE
public static final org.apache.bcel.generic.ObjectType ERROR_TYPE
public static final org.apache.bcel.generic.ObjectType RUNTIME_EXCEPTION_TYPE
Constructor Detail |
---|
public Hierarchy()
Method Detail |
---|
public static boolean isSubtype(java.lang.String clsName, java.lang.String possibleSupertypeClassName) throws java.lang.ClassNotFoundException
clsName
- the name of the class or reference typepossibleSupertypeClassName
- the name of the possible superclass
java.lang.ClassNotFoundException
public static boolean isSubtype(org.apache.bcel.generic.ReferenceType t, org.apache.bcel.generic.ReferenceType possibleSupertype) throws java.lang.ClassNotFoundException
t
- a reference typepossibleSupertype
- the possible supertype
java.lang.ClassNotFoundException
public static boolean isUniversalExceptionHandler(org.apache.bcel.generic.ObjectType catchType)
catchType
- the ObjectType of the exception handler
public static boolean isUncheckedException(org.apache.bcel.generic.ObjectType type) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static boolean isMonitorWait(java.lang.String methodName, java.lang.String methodSig)
methodName
- name of the methodmethodSig
- signature of the method
public static boolean isMonitorNotify(java.lang.String methodName, java.lang.String methodSig)
methodName
- name of the methodmethodSig
- signature of the method
public static org.apache.bcel.classfile.Method findExactMethod(org.apache.bcel.generic.InvokeInstruction inv, org.apache.bcel.generic.ConstantPoolGen cpg) throws java.lang.ClassNotFoundException
inv
- the InvokeInstructioncpg
- the ConstantPoolGen used by the class the InvokeInstruction belongs to
java.lang.ClassNotFoundException
public static org.apache.bcel.classfile.Method findPrototypeMethod(org.apache.bcel.generic.InvokeInstruction inv, org.apache.bcel.generic.ConstantPoolGen cpg) throws java.lang.ClassNotFoundException
inv
- the InvokeInstructioncpg
- the ConstantPoolGen used by the class the InvokeInstruction belongs to
java.lang.ClassNotFoundException
public static org.apache.bcel.generic.ObjectType[] findDeclaredExceptions(org.apache.bcel.generic.InvokeInstruction inv, org.apache.bcel.generic.ConstantPoolGen cpg) throws java.lang.ClassNotFoundException
inv
- the InvokeInstructioncpg
- the ConstantPoolGen used by the class the InvokeInstruction belongs to
java.lang.ClassNotFoundException
public static org.apache.bcel.classfile.Method findMethod(org.apache.bcel.classfile.JavaClass javaClass, java.lang.String methodName, java.lang.String methodSig)
javaClass
- the classmethodName
- the name of the methodmethodSig
- the signature of the method
public static org.apache.bcel.classfile.Method findMethod(org.apache.bcel.classfile.JavaClass[] classList, java.lang.String methodName, java.lang.String methodSig)
classList
- list of classes in which to searchmethodName
- the name of the methodmethodSig
- the signature of the method
public static org.apache.bcel.classfile.Field findField(java.lang.String className, java.lang.String fieldName) throws java.lang.ClassNotFoundException
className
- the name of the classfieldName
- the name of the field
java.lang.ClassNotFoundException
public static XField findXField(java.lang.String className, java.lang.String fieldName, java.lang.String fieldSig) throws java.lang.ClassNotFoundException
XField
object.
If a field can't be found in the immediate class,
its superclass is search, and so forth.
className
- name of the class through which the field
is referencedfieldName
- name of the fieldfieldSig
- signature of the field
java.lang.ClassNotFoundException
public static XField findXField(org.apache.bcel.generic.FieldInstruction fins, org.apache.bcel.generic.ConstantPoolGen cpg) throws java.lang.ClassNotFoundException
XField
object.
fins
- the FieldInstructioncpg
- the ConstantPoolGen used by the class containing the instruction
java.lang.ClassNotFoundException
public static boolean isInnerClassAccess(org.apache.bcel.generic.INVOKESTATIC inv, org.apache.bcel.generic.ConstantPoolGen cpg)
inv
- the INVOKESTATIC instructioncpg
- the ConstantPoolGen for the method
public static InnerClassAccess getInnerClassAccess(org.apache.bcel.generic.INVOKESTATIC inv, org.apache.bcel.generic.ConstantPoolGen cpg) throws java.lang.ClassNotFoundException
inv
- the INVOKESTATIC instructioncpg
- the ConstantPoolGen for the method
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |