ObjectType (jakarta-bcel 5.2 API)
Keywords: org.apache.bcel.generic.ObjectType class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.bcel.generic
Class ObjectType

    java.lang.Object
      org.apache.bcel.generic.Type
          org.apache.bcel.generic.ReferenceType
              org.apache.bcel.generic.ObjectType

All Implemented Interfaces:
  Serializable

    public class ObjectType

extends ReferenceType

Denotes reference such as java.lang.String.

Version:
  $Id: ObjectType.java 386056 2006-03-15 11:31:56Z tcurdt $
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.bcel.generic.Type
`BOOLEAN, BYTE, CHAR, CLASS, DOUBLE, FLOAT, INT, LONG, NO_ARGS, NULL, OBJECT, SHORT, signature, STRING, STRINGBUFFER, THROWABLE, type, UNKNOWN, VOID`

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()` Deprecated. 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. 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.

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, getTypes, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ObjectType

    public ObjectType(String class_name)

Parameters:
  `class_name` - fully qualified class name, e.g. java.lang.String

Method Detail

### getClassName

    public String getClassName()

  Returns:
    name of referenced class

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Type`
  Returns:
    a hash code value for the object.

### equals

    public boolean equals(Object type)

  Overrides:
    `equals` in class `Type`
  Returns:
    true if both type objects refer to the same class.

### referencesClass

    public boolean referencesClass()

  Deprecated. this method returns an inaccurate result if the class or interface referenced cannot be found: use referencesClassExact() instead

  If "this" doesn't reference a class, it references an interface or a non-existant entity.

### referencesInterface

    public boolean referencesInterface()

  Deprecated. this method returns an inaccurate result if the class or interface referenced cannot be found: use referencesInterfaceExact() instead

  If "this" doesn't reference an interface, it references a class or a non-existant entity.

### referencesClassExact

    public boolean referencesClassExact()
                                 throws ClassNotFoundException

  Return true if this type references a class, false if it references an interface.

  Returns:
    true if the type references a class, false if it references an interface
  Throws:
    `ClassNotFoundException` - if the class or interface referenced by this type can't be found

### referencesInterfaceExact

    public boolean referencesInterfaceExact()
                                     throws ClassNotFoundException

  Return true if this type references an interface, false if it references a class.

  Returns:
    true if the type references an interface, false if it references a class
  Throws:
    `ClassNotFoundException` - if the class or interface referenced by this type can't be found

### subclassOf

    public boolean subclassOf(ObjectType superclass)
                       throws ClassNotFoundException

  Return true if this type is a subclass of given ObjectType.

  Throws:
    `ClassNotFoundException` - if any of this class's superclasses can't be found

### accessibleTo

    public boolean accessibleTo(ObjectType accessor)
                         throws ClassNotFoundException

  Java Virtual Machine Specification edition 2, ß 5.4.4 Access Control

  Throws:
    `ClassNotFoundException` - if the class referenced by this type can't be found

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.