ajax.type
Class Type
java.lang.Object
|
+--ajax.type.Type
- Direct Known Subclasses:
- ArrayType, BuiltInType, ComposedType
- public abstract class Type
- extends java.lang.Object
Class Type is the root of the type hierarchy
which is used for internal representation of types.
Note that types may be named. Thus, when a type is compared to
another type, its base type must be compared.
NOTE: With the new class ArrayType, the OBJECTARRAY variable
is no longer needed. In this case should add the "Object" as a
built-in type and OBJECTARRAY is defined as ArrayType(new Type("object")).
Constructor Summary |
Type()
|
Method Summary |
static ArrayType |
ARRAY(Type type)
|
abstract boolean |
equals(Type other)
Compares this type to another type. |
Type |
getBaseType()
Get base type. |
abstract java.lang.String |
getName()
Gets the type name |
static BuiltInType |
STRING(int size)
|
java.lang.String |
toDBaseType(boolean function)
Converts this type into the database corresponding one. |
abstract java.lang.String |
toJavaType()
Converts this type into the Java corresponding one |
abstract java.lang.String |
toString()
Convert type to human-readable form. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INTEGER
public static BuiltInType INTEGER
- The built-in types.
FLOAT
public static BuiltInType FLOAT
STRING
public static BuiltInType STRING
CHAR
public static BuiltInType CHAR
DATE
public static BuiltInType DATE
BOOLEAN
public static BuiltInType BOOLEAN
LIST
public static BuiltInType LIST
TABLE
public static BuiltInType TABLE
OBJECTARRAY
public static BuiltInType OBJECTARRAY
Type
public Type()
ARRAY
public static ArrayType ARRAY(Type type)
STRING
public static BuiltInType STRING(int size)
getName
public abstract java.lang.String getName()
- Gets the type name
equals
public abstract boolean equals(Type other)
- Compares this type to another type.
toJavaType
public abstract java.lang.String toJavaType()
throws AjaxTypeException
- Converts this type into the Java corresponding one
toDBaseType
public java.lang.String toDBaseType(boolean function)
throws AjaxTypeException
- Converts this type into the database corresponding one.
toString
public abstract java.lang.String toString()
- Convert type to human-readable form.
- Overrides:
toString
in class java.lang.Object
getBaseType
public Type getBaseType()
- Get base type. The base type of the type is its type after all
naming re-direction has been removed.
- Returns:
- base type