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)
           
 
Method Summary
 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()
          If "this" doesn't reference a class, it references an interface or a non-existant entity.
 boolean referencesInterface()
          If "this" doesn't reference an interface, it references a class or a non-existant entity.
 boolean subclassOf(ObjectType superclass)
           
 
Methods inherited from class de.fub.bytecode.generic.ReferenceType
firstCommonSuperclass, isAssignmentCompatibleWith, isCastableTo
 
Methods inherited from class de.fub.bytecode.generic.Type
getArgumentTypes, getMethodSignature, getReturnType, getSignature, getSize, getType, getType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectType

public ObjectType(java.lang.String class_name)
Parameters:
class_name - fully qualified class name, e.g. java.lang.String
Method Detail

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