public class ObjectType extends ReferenceType
Constructor and Description |
---|
ObjectType(String className)
Constructs a new instance.
|
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)
Constructs a new instance.
|
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, isCastableTo
getArgumentTypes, getMethodSignature, getReturnType, getSignature, getSignature, getSize, getType, getType, getType, getTypes, normalizeForStackOrLocal, toString
public ObjectType(String className)
className
- fully qualified class name, e.g. java.lang.Stringpublic static ObjectType getInstance(String className)
className
- fully qualified class name, e.g. java.lang.Stringpublic boolean accessibleTo(ObjectType accessor) throws ClassNotFoundException
ClassNotFoundException
- if the class referenced by this type can't be foundpublic boolean equals(Object type)
public String getClassName()
getClassName
in class Type
public int hashCode()
@Deprecated public boolean referencesClass()
public boolean referencesClassExact() throws ClassNotFoundException
ClassNotFoundException
- if the class or interface referenced by this type can't be found@Deprecated public boolean referencesInterface()
public 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 foundCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.