org.apache.bcel.generic

Class ObjectType

Implemented Interfaces:
java.io.Serializable

public final class ObjectType
extends ReferenceType

Denotes reference such as java.lang.String.
Version:
$Id: ObjectType.java,v 1.1.1.1 2001/10/29 20:00:25 jvanzyl Exp $
Author:
M. Dahm
See Also:
Serialized Form

Field Summary

Fields inherited from class org.apache.bcel.generic.Type

BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, NO_ARGS, NULL, OBJECT, SHORT, STRING, STRINGBUFFER, THROWABLE, UNKNOWN, VOID, signature, type

Constructor Summary

ObjectType(String class_name)

Method Summary

boolean
accessibleTo(ObjectType accessor)
Java Virtual Machine Specification edition 2, ? 5.4.4 Access Control
boolean
equals(Object type)
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 org.apache.bcel.generic.ReferenceType

firstCommonSuperclass, getFirstCommonSuperclass, isAssignmentCompatibleWith, isCastableTo

Methods inherited from class org.apache.bcel.generic.Type

getArgumentTypes, getMethodSignature, getReturnType, getSignature, getSignature, getSize, getType, getType, getType, toString

Constructor Details

ObjectType

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

Method Details

accessibleTo

public boolean accessibleTo(ObjectType accessor)
Java Virtual Machine Specification edition 2, ? 5.4.4 Access Control

equals

public boolean equals(Object type)
Returns:
true if both type objects refer to the same class.

getClassName

public String getClassName()
Returns:
name of referenced class

hashCode

public int hashCode()
Returns:
a hash code value for the object.

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)