public abstract class ClassReference extends QualifiedReference
QualifiedReference.Type| Modifier and Type | Field and Description |
|---|---|
protected ObjectType |
classType |
protected static char |
INNER_CLASS_SEPARATOR_CHAR |
JVMS_COMPONENT_JOINER, type| Constructor and Description |
|---|
ClassReference(QualifiedReference.Type type,
ObjectType classType)
Constructs a new reference to a class.
|
| Modifier and Type | Method and Description |
|---|---|
protected StringJoiner |
buildToString() |
boolean |
equals(Object obj) |
ObjectType |
getClassType()
Returns the type of class represented by this reference
|
FieldReference |
getField(FieldSignature signature)
Returns a reference to a field contained by this class.
|
FieldReference |
getField(String name)
Returns a reference to a field contained by this class.
|
FieldReference |
getField(String name,
FieldType type)
Returns a reference to a field contained by this class.
|
FieldReference |
getField(String name,
String type)
Returns a reference to a field contained by this class.
|
InnerClassReference |
getInnerClass(String unqualifiedName)
Returns a reference to an inner class of this class.
|
MethodReference |
getMethod(MethodSignature signature)
Returns a reference to a method contained by this class.
|
MethodReference |
getMethod(String name,
MethodDescriptor descriptor)
Returns a reference to a method contained by this class.
|
MethodReference |
getMethod(String name,
String descriptor)
Returns a reference to a method contained by this class.
|
int |
hashCode() |
String |
toJvmsIdentifier()
Returns a JVMS-like identifier string corresponding to this reference.
|
getType, toStringprotected static final char INNER_CLASS_SEPARATOR_CHAR
protected final ObjectType classType
public ClassReference(QualifiedReference.Type type, ObjectType classType)
type - The Type of reference (must be
Type#TOP_LEVEL_CLASS or Type#INNER_CLASS)classType - An ObjectType representing the type of the
referenced classpublic ObjectType getClassType()
public InnerClassReference getInnerClass(String unqualifiedName)
unqualifiedName - The unqualified name of the inner classpublic FieldReference getField(FieldSignature signature)
signature - The signature of the fieldpublic FieldReference getField(String name, FieldType type)
name - The name of the fieldtype - The type of the fieldpublic FieldReference getField(String name, String type)
name - The name of the fieldtype - The type of the fieldpublic FieldReference getField(String name)
name - The name of the fieldpublic MethodReference getMethod(MethodSignature signature)
signature - The signature of the methodpublic MethodReference getMethod(String name, MethodDescriptor descriptor)
name - The name of the methoddescriptor - The descriptor of the methodpublic MethodReference getMethod(String name, String descriptor)
name - The name of the methoddescriptor - The JVMS descriptor of the methodpublic String toJvmsIdentifier()
QualifiedReferencetoJvmsIdentifier in class QualifiedReferenceprotected StringJoiner buildToString()
buildToString in class QualifiedReferencepublic boolean equals(Object obj)
equals in class QualifiedReferencepublic int hashCode()
hashCode in class QualifiedReference