|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.llnl.babel.symbols.Type
The Type
class defines a SIDL type, such as a primitive
type (boolean, char, dcomplex, double, fcomplex, float, int, long, opaque,
and string), arrays, and user-defined types (enum, interface, or class).
A Type
object may also be created for a void return type
from a method.
Field Summary | |
static int |
ARRAY
|
static int |
BOOLEAN
|
static int |
CHAR
|
static int |
CLASS
|
static int |
COLUMN_MAJOR
|
static int |
DCOMPLEX
|
static int |
DOUBLE
|
static int |
ENUM
|
static int |
FCOMPLEX
|
static int |
FLOAT
|
static int |
INT
|
static int |
INTERFACE
|
static int |
LONG
|
static int |
OPAQUE
|
static int |
ROW_MAJOR
|
static int |
STRING
|
static int |
SYMBOL
|
static int |
UNSPECIFIED
|
static int |
VOID
|
Constructor Summary | |
Type(int type)
Create a new primitive type (boolean, char, dcomplex, double, fcomplex, float, int, long, opaque, and string). |
|
Type(SymbolID id)
Create a new type given a user-defined symbol identifier. |
|
Type(Type type,
int dim,
int order)
Create a new array provided the array type, dimension, and order. |
Method Summary | |
boolean |
equals(java.lang.Object object)
Compare two type objects and return true if they are the same. |
int |
getArrayDimension()
If this type is an array, then return the dimension; otherwise, return zero. |
int |
getArrayOrder()
If this type is an array, then return the order; otherwise, return zero. |
Type |
getArrayType()
If this is an array, return the array type; otherwise return null. |
int |
getDetailedType()
Returns the integer that identifies the type of this type. |
SymbolID |
getSymbolID()
Return the symbol identifier associated with this symbol type. |
int |
getType()
Return the integer that identifies the type of this type. |
java.lang.String |
getTypeString()
Return a string representation of the type for printing out the types in a method signature. |
boolean |
hasArrayOrderSpec()
Return true if and only if the type is an array with an
ordering specification. |
boolean |
isArray()
Check whether the type is an array. |
boolean |
isPrimitive()
Check whether the type is one of the standard primitive types, including strings. |
boolean |
isString()
Check whether the type is a string. |
boolean |
isSymbol()
Check whether the type is a symbol. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VOID
public static final int BOOLEAN
public static final int CHAR
public static final int DCOMPLEX
public static final int DOUBLE
public static final int FCOMPLEX
public static final int FLOAT
public static final int INT
public static final int LONG
public static final int OPAQUE
public static final int STRING
public static final int ENUM
public static final int INTERFACE
public static final int CLASS
public static final int SYMBOL
public static final int ARRAY
public static final int UNSPECIFIED
public static final int COLUMN_MAJOR
public static final int ROW_MAJOR
Constructor Detail |
public Type(int type)
public Type(SymbolID id)
public Type(Type type, int dim, int order)
Method Detail |
public int getType()
public int getDetailedType()
public boolean isPrimitive()
public boolean isString()
public boolean isSymbol()
public boolean isArray()
public int getArrayDimension()
public int getArrayOrder()
public Type getArrayType()
public boolean hasArrayOrderSpec()
true
if and only if the type is an array with an
ordering specification. For example, array<int,2,column-major>
would return true
; array<int, 2> would return
false
. For non-array types, this always returns
false
.
public SymbolID getSymbolID()
public java.lang.String getTypeString()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |