|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ipdr.common.OpenType
org.ipdr.common.ArrayType
public class ArrayType
This class represents the Array Type. This extends from OpenType. The derived type contains TypeCode + "ARRAY". It stores the max length of the array. If the max length is "unbounded", the max length is '-1'.
Field Summary | |
---|---|
static java.lang.String |
ARRAY
String containing "ARRAY" to use in derived type. |
static java.lang.String |
DESCRIPTION
String containing the base for default description. |
protected int |
maxLength_
To store the Max Length of the Array. |
protected OpenType |
type_
OpenType of the Array elements. |
protected char |
typeCode_
Char containing the Type Code of the Array elements. |
static int |
UNBOUNDED
Int to represent the 'unbounded' max length. |
Fields inherited from class org.ipdr.common.OpenType |
---|
BOOLEAN_TYPE_CODE, BYTE_TYPE_CODE, derivedType_, description_, DOUBLE_TYPE_CODE, FLOAT_TYPE_CODE, HEX_BINARY_TYPE_CODE, INTEGER_TYPE_CODE, LONG_TYPE_CODE, name_, OBJECT_TYPE_CODE, SHORT_TYPE_CODE, STRING_TYPE_CODE, UNSIGNEDBYTE_TYPE_CODE, UNSIGNEDINT_TYPE_CODE, UNSIGNEDLONG_TYPE_CODE, UNSIGNEDSHORT_TYPE_CODE |
Constructor Summary | |
---|---|
ArrayType(OpenType type,
int maxLen)
Constructor that takes the Type of the Array elements its max length. |
Method Summary | |
---|---|
int |
getMaxLength()
Method to get the Max Length of the Array. |
OpenType |
getType()
Method to get the Type of the Array elements. |
char |
getTypeCode()
Method to get the Type Code of the Array elements. |
static void |
main(java.lang.String[] args)
Simple demonstration entry point. |
java.lang.String |
toString()
Utility method for displaying types. |
Methods inherited from class org.ipdr.common.OpenType |
---|
getDerivedType, getDescription, getName, setDerivedType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DESCRIPTION
public static final java.lang.String ARRAY
public static final int UNBOUNDED
protected char typeCode_
protected OpenType type_
protected int maxLength_
Constructor Detail |
---|
public ArrayType(OpenType type, int maxLen)
type
- The OpenType of the elementsmaxLen
- The max length of the arrayMethod Detail |
---|
public OpenType getType()
getType
in class OpenType
public char getTypeCode()
getTypeCode
in class OpenType
public int getMaxLength()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |