de.fub.bytecode.generic
Class ObjectType
java.lang.Object
|
+--de.fub.bytecode.generic.Type
|
+--de.fub.bytecode.generic.ReferenceType
|
+--de.fub.bytecode.generic.ObjectType
- public final class ObjectType
- extends ReferenceType
Denotes reference such as java.lang.String.
- Version:
- $Id: ObjectType.java,v 1.5 2001/05/09 09:26:57 dahm Exp $
- Author:
- M. Dahm
Fields inherited from class de.fub.bytecode.generic.Type |
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, NO_ARGS, NULL, OBJECT, SHORT, signature, STRING, STRINGBUFFER, THROWABLE, type, UNKNOWN, VOID |
Constructor Summary |
ObjectType(java.lang.String class_name)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ObjectType
public ObjectType(java.lang.String class_name)
- Parameters:
class_name
- fully qualified class name, e.g. java.lang.String
getClassName
public java.lang.String getClassName()
- Returns:
- name of referenced class
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
- Returns:
- a hash code value for the object.
equals
public boolean equals(java.lang.Object type)
- Overrides:
equals
in class java.lang.Object
- Returns:
- true if both type objects refer to the same class.
referencesClass
public boolean referencesClass()
- If "this" doesn't reference a class, it references an interface
or a non-existant entity.
referencesInterface
public boolean referencesInterface()
- If "this" doesn't reference an interface, it references a class
or a non-existant entity.
subclassOf
public boolean subclassOf(ObjectType superclass)
accessibleTo
public boolean accessibleTo(ObjectType accessor)
- Java Virtual Machine Specification edition 2, § 5.4.4 Access Control