|
|||||||||
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.CompositeType
public class CompositeType
This class represents an arbitrary composite data type which adheres to the OpenMBean restrictions.
Once defined, a composite type is immutable, the structure it defines does not change. Significant savings in storage overhead as well as processing can be acheived by using the same instance of CompositeType in all instances of CompositeData which share the same strucutre.
Field Summary | |
---|---|
protected OpenType[] |
typeList_
The sequence of types which appear in a data item of this OpenType. |
protected java.util.HashMap |
typesByName_
A HashMap to aid in finding the index for a field by its name in this CompositeType. |
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 | |
---|---|
CompositeType(java.lang.String name,
OpenType[] types,
java.lang.String desc)
Builds a composite type from the supplied array of types Note that a given CompositeType is immutable. |
Method Summary | |
---|---|
int |
getFieldIndex(java.lang.String fieldName)
Retreives index information for a given named field in the composite type. |
OpenType |
getFieldType(java.lang.String fieldName)
Retreives type information for a given named field in the composite type. |
OpenType |
getType()
Retreives the details about this type. |
char |
getTypeCode()
Retreives simple info about this type being composed. |
OpenType[] |
getTypeList()
Retreives the type list which describes the layout of data for this CompositeType. |
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 |
---|
protected OpenType[] typeList_
protected java.util.HashMap typesByName_
Constructor Detail |
---|
public CompositeType(java.lang.String name, OpenType[] types, java.lang.String desc) throws BadCompositeException
name
- Composite Type Nametypes
- Array of OpenTypedesc
- Description
BadCompositeException
- when a problem occurs while building
the Composite Type objectMethod Detail |
---|
public OpenType getType()
getType
in class OpenType
public OpenType[] getTypeList()
The returned array should not be altered.
public int getFieldIndex(java.lang.String fieldName)
fieldName
- The field name
public OpenType getFieldType(java.lang.String fieldName)
fieldName
- The field name
public char getTypeCode()
getTypeCode
in class OpenType
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 |