wt.tools.xref
Class ClassInterface

java.lang.Object
  extended bywt.tools.xref.ClassInterface

public class ClassInterface
extends Object

This class stores information about both classes and interfaces. The d_objectType field is used to indicate what a particular instance of this class is referring to.


Field Summary
private static Hashtable d_baseTypesList
          This container is used to store a list of the Java base data types and is later used by the getObjectType() method.
(package private)  String d_name
          This field contains the name of the Class/Interface.
(package private)  int d_objectType
          This field contains true if it is a class (this also means it could be an exception as well), otherwise it contains false if it is an interface.
(package private)  String d_superClass
          This field contains the name of the parent Class/Interface that this Class/Interface extends.
static int OT_BASE_TYPE
           
static int OT_CLASS
           
static int OT_ERROR
           
static int OT_EXCEPTION
           
static int OT_INTERFACE
           
static int OT_UNKNOWN
           
 
Constructor Summary
ClassInterface(String name, int objectType)
          Constructor
 
Method Summary
 String getName()
          This method returns the name of this Class/Interface.
 int getObjectType()
           
static int getObjectType(String classInterfaceName)
          This method loads the specified Class/Interface and determines if it is a CLASS or an INTERFACE and returns the appropriate value.
 String getSuperClass()
          This method returns a reference to the d_superClass field.
 boolean isBaseType()
          This method returns true if the instance is a Base Java Type.
 boolean isClass()
          This method returns true if the instance is an CLASS.
 boolean isException()
          This method returns true if the instance is an EXCEPTION.
 boolean isInterface()
          This method returns true if the instance is an INTERFACE.
 void setObjectType(int objectType)
           
 void setSuperClass(String superClass)
          This method sets the d_superClass field to the specified value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OT_UNKNOWN

public static final int OT_UNKNOWN
See Also:
Constant Field Values

OT_CLASS

public static final int OT_CLASS
See Also:
Constant Field Values

OT_INTERFACE

public static final int OT_INTERFACE
See Also:
Constant Field Values

OT_EXCEPTION

public static final int OT_EXCEPTION
See Also:
Constant Field Values

OT_ERROR

public static final int OT_ERROR
See Also:
Constant Field Values

OT_BASE_TYPE

public static final int OT_BASE_TYPE
See Also:
Constant Field Values

d_objectType

int d_objectType
This field contains true if it is a class (this also means it could be an exception as well), otherwise it contains false if it is an interface.


d_name

String d_name
This field contains the name of the Class/Interface.


d_superClass

String d_superClass
This field contains the name of the parent Class/Interface that this Class/Interface extends.


d_baseTypesList

private static Hashtable d_baseTypesList
This container is used to store a list of the Java base data types and is later used by the getObjectType() method.

Constructor Detail

ClassInterface

public ClassInterface(String name,
                      int objectType)
Constructor

Method Detail

getObjectType

public int getObjectType()

setObjectType

public void setObjectType(int objectType)

isException

public boolean isException()
This method returns true if the instance is an EXCEPTION.


isClass

public boolean isClass()
This method returns true if the instance is an CLASS.


isInterface

public boolean isInterface()
This method returns true if the instance is an INTERFACE.


isBaseType

public boolean isBaseType()
This method returns true if the instance is a Base Java Type.


getName

public String getName()
This method returns the name of this Class/Interface.


setSuperClass

public void setSuperClass(String superClass)
This method sets the d_superClass field to the specified value.


getSuperClass

public String getSuperClass()
This method returns a reference to the d_superClass field.


getObjectType

public static int getObjectType(String classInterfaceName)
                         throws Exception
This method loads the specified Class/Interface and determines if it is a CLASS or an INTERFACE and returns the appropriate value.

Throws:
Exception

toString

public String toString()