|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.rej.java.JavaType
public class JavaType
The JavaType
class represents a java type that is either
primitive (int, long, char, double, etc) or a class/interface type. In
either case the type may possibly contain several dimensions.
Nested Class Summary | |
---|---|
static class |
JavaType.ImmutableJavaType
|
Field Summary | |
---|---|
static JavaType |
INT
An immutable constant for the primitive type int (with no dimensions) |
static JavaType |
JAVA_LANG_OBJECT
An immutable constant for the type java.lang.Object (with no dimensions) |
Constructor Summary | |
---|---|
JavaType(java.lang.String def)
Instantiates a new JavaType from the given definition String. |
|
JavaType(java.lang.String typeName,
int dimensions)
Instantiates a new JavaType specifying explicitly the
name and the number of dimensions. |
Method Summary | |
---|---|
void |
dropDimension()
Decreases the dimension count by one. |
boolean |
equals(java.lang.Object obj)
|
int |
getDimensionCount()
Returns the number of dimensions. |
java.lang.String |
getDimensions()
Returns the dimension part of a type. |
java.lang.String |
getRaw()
Returns a raw representation of this type, ie. |
java.lang.String |
getType()
Returns the type of the instance. |
int |
hashCode()
|
boolean |
isPrimitive()
Returns true if the type denoted by this instance if a primitive type. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final JavaType INT
public static final JavaType JAVA_LANG_OBJECT
Constructor Detail |
---|
public JavaType(java.lang.String def)
java.lang.Stringor:
byte[]
def
- a string defining the type.public JavaType(java.lang.String typeName, int dimensions)
JavaType
specifying explicitly the
name and the number of dimensions.
typeName
- the name of the type (without dimensions).dimensions
- the number of dimensions.Method Detail |
---|
public java.lang.String getType()
public java.lang.String getDimensions()
public boolean isPrimitive()
public java.lang.String toString()
toString
in class java.lang.Object
public int getDimensionCount()
public java.lang.String getRaw()
Ljava/lang/String;
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void dropDimension()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |