java.io.Serializable
public class ObjectType extends ReferenceType
Constructor | Description |
---|---|
ObjectType(java.lang.String class_name) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
accessibleTo(ObjectType accessor) |
Java Virtual Machine Specification edition 2, § 5.4.4 Access Control
|
boolean |
equals(java.lang.Object type) |
|
java.lang.String |
getClassName() |
|
int |
hashCode() |
|
boolean |
referencesClass() |
Deprecated.
this method returns an inaccurate result
if the class or interface referenced cannot
be found: use referencesClassExact() instead
|
boolean |
referencesClassExact() |
Return true if this type references a class,
false if it references an interface.
|
boolean |
referencesInterface() |
Deprecated.
this method returns an inaccurate result
if the class or interface referenced cannot
be found: use referencesInterfaceExact() instead
|
boolean |
referencesInterfaceExact() |
Return true if this type references an interface,
false if it references a class.
|
boolean |
subclassOf(ObjectType superclass) |
Return true if this type is a subclass of given ObjectType.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
firstCommonSuperclass, getFirstCommonSuperclass, isAssignmentCompatibleWith, isCastableTo
getArgumentTypes, getMethodSignature, getReturnType, getSignature, getSignature, getSize, getType, getType, getType, getTypes, toString
public ObjectType(java.lang.String class_name)
class_name
- fully qualified class name, e.g. java.lang.Stringpublic java.lang.String getClassName()
public int hashCode()
public boolean equals(java.lang.Object type)
public boolean referencesClass()
public boolean referencesInterface()
public boolean referencesClassExact() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if the class or interface
referenced by this type can't be foundpublic boolean referencesInterfaceExact() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if the class or interface
referenced by this type can't be foundpublic boolean subclassOf(ObjectType superclass) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if any of this class's superclasses
can't be foundpublic boolean accessibleTo(ObjectType accessor) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if the class referenced by this type
can't be found