com.combex.e.edoc
Class EArrayType

java.lang.Object
  |
  +--com.combex.e.edoc.EArrayType
All Implemented Interfaces:
EType, Marker, PassByConstruction, Serializable, com.sun.javadoc.Type

class EArrayType
extends Object
implements EType

Author:
mods by Mark Miller of combex.com subject to the terms of Sun's SCSL license.

Field Summary
private  int myDimension
          a dimension, like [][] = 2...
private  EType myType
          array of ...
 
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction
HONORARY, HONORED_NAMES, serialVersionUID
 
Constructor Summary
  EArrayType(EDocBuilder builder, com.sun.javadoc.Type arrayType)
           
(package private) EArrayType(int dim, EType eType)
           
 
Method Summary
 com.sun.javadoc.ClassDoc asClassDoc()
          Return this type as a class.
 String dimension()
          Return the type's dimension information, as a string.
 boolean equals(Object obj)
          Compares two Objects for equality.
 int hashCode()
          Returns a hash code value for the object.
 String qualifiedTypeName()
          Return qualified name of type excluding any dimension information.
 String toString()
          Returns a string representation of the type.
 String typeName()
          Return unqualified name of type excluding any dimension information.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

myDimension

private final int myDimension
a dimension, like [][] = 2...


myType

private final EType myType
array of ...

Constructor Detail

EArrayType

public EArrayType(EDocBuilder builder,
                  com.sun.javadoc.Type arrayType)

EArrayType

EArrayType(int dim,
           EType eType)
Method Detail

dimension

public String dimension()
Return the type's dimension information, as a string.

For example, a two dimensional array of String returns '[][]'.


typeName

public String typeName()
Return unqualified name of type excluding any dimension information.

For example, a two dimensional array of String returns 'String'.


qualifiedTypeName

public String qualifiedTypeName()
Return qualified name of type excluding any dimension information.

For example, a two dimensional array of String returns 'java.lang.String'.


asClassDoc

public com.sun.javadoc.ClassDoc asClassDoc()
Return this type as a class. Array dimensions are ignored.

Returns:
a ClassDocImpl if the type is a Class. Return null if it is a primitive type..

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.HashMap and java.util.Hashtable.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
equals(java.lang.Object), java.util.HashMap, java.util.Hashtable

equals

public boolean equals(Object obj)
Compares two Objects for equality.

The equals method implements an equivalence relation.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.hashCode(), java.util.Hashtable

toString

public String toString()
Returns a string representation of the type. Return name of type including any dimension information.

For example, a two dimensional array of String returns String[][].

Overrides:
toString in class Object
Returns:
name of type including any dimension information.


comments?