public class ObjectType extends ReferenceType
| Constructor and Description |
|---|
ObjectType(String className) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accessibleTo(ObjectType accessor)
Java Virtual Machine Specification edition 2, � 5.4.4 Access Control
|
boolean |
equals(Object type) |
String |
getClassName() |
static ObjectType |
getInstance(String className) |
int |
hashCode() |
boolean |
referencesClass()
Deprecated.
(since 6.0) 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.
(since 6.0) 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.
|
firstCommonSuperclass, getFirstCommonSuperclass, isAssignmentCompatibleWith, isCastableTogetArgumentTypes, getMethodSignature, getReturnType, getSignature, getSignature, getSize, getType, getType, getType, getTypes, normalizeForStackOrLocal, toStringpublic ObjectType(String className)
className - fully qualified class name, e.g. java.lang.Stringpublic static ObjectType getInstance(String className)
public String getClassName()
public int hashCode()
public boolean equals(Object type)
@Deprecated public boolean referencesClass()
@Deprecated public boolean referencesInterface()
public boolean referencesClassExact()
throws ClassNotFoundException
ClassNotFoundException - if the class or interface
referenced by this type can't be foundpublic boolean referencesInterfaceExact()
throws ClassNotFoundException
ClassNotFoundException - if the class or interface
referenced by this type can't be foundpublic boolean subclassOf(ObjectType superclass) throws ClassNotFoundException
ClassNotFoundException - if any of this class's superclasses
can't be foundpublic boolean accessibleTo(ObjectType accessor) throws ClassNotFoundException
ClassNotFoundException - if the class referenced by this type
can't be foundCopyright © 2004–2020 The Apache Software Foundation. All rights reserved.