public class MemberFinder extends java.lang.Object implements MemberVisitor
Constructor and Description |
---|
MemberFinder()
Creates a new MemberFinder that looks in the class hierarchy.
|
MemberFinder(boolean searchHierarchy)
Creates a new MemberFinder that looks in the class hierarchy if specified.
|
Modifier and Type | Method and Description |
---|---|
Clazz |
correspondingClass()
Returns the corresponding class of the most recently found class member.
|
Field |
findField(Clazz referencingClass,
Clazz clazz,
java.lang.String name,
java.lang.String descriptor)
Finds the field with the given name and descriptor in the given class or its hierarchy.
|
Field |
findField(Clazz clazz,
java.lang.String name,
java.lang.String descriptor)
Finds the field with the given name and descriptor in the given class or its hierarchy.
|
Member |
findMember(Clazz referencingClass,
Clazz clazz,
java.lang.String name,
java.lang.String descriptor,
boolean isField)
Finds the class member with the given name and descriptor in the given class or its hierarchy,
referenced from the optional given class.
|
Member |
findMember(Clazz clazz,
java.lang.String name,
java.lang.String descriptor,
boolean isField)
Finds the class member with the given name and descriptor in the given class or its hierarchy.
|
Method |
findMethod(Clazz referencingClass,
Clazz clazz,
java.lang.String name,
java.lang.String descriptor)
Finds the method with the given name and descriptor in the given class or its hierarchy.
|
Method |
findMethod(Clazz clazz,
java.lang.String name,
java.lang.String descriptor)
Finds the method with the given name and descriptor in the given class or its hierarchy.
|
boolean |
isOverriden(Clazz clazz,
Method method)
Returns whether the given method is overridden anywhere down the class hierarchy.
|
boolean |
isShadowed(Clazz clazz,
Field field)
Returns whether the given field is shadowed anywhere down the class hierarchy.
|
void |
visitAnyMember(Clazz clazz,
Member member)
Visits any Member instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitLibraryField, visitLibraryMember, visitLibraryMethod, visitProgramField, visitProgramMember, visitProgramMethod
public MemberFinder()
public MemberFinder(boolean searchHierarchy)
public Field findField(Clazz clazz, java.lang.String name, java.lang.String descriptor)
public Field findField(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor)
public Method findMethod(Clazz clazz, java.lang.String name, java.lang.String descriptor)
public Method findMethod(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor)
public Member findMember(Clazz clazz, java.lang.String name, java.lang.String descriptor, boolean isField)
public Member findMember(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor, boolean isField)
public Clazz correspondingClass()
public boolean isOverriden(Clazz clazz, Method method)
public boolean isShadowed(Clazz clazz, Field field)
public void visitAnyMember(Clazz clazz, Member member)
MemberVisitor
visitAnyMember
in interface MemberVisitor