public abstract class AbstractCompositeMetaType extends AbstractMetaType implements CompositeMetaType
ALLOWED_CLASSNAMES| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCompositeMetaType(String typeName,
String description)
Construct a composite meta type with no items.
|
protected |
AbstractCompositeMetaType(String typeName,
String description,
String[] itemNames,
String[] itemDescriptions,
MetaType[] itemTypes,
boolean ignoreItems)
Construct a composite meta type.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addItem(String itemName,
String itemDescription,
MetaType itemType)
Add an item
|
boolean |
containsItem(String itemName)
Determine whether this CompositeMetaType contains the itemName
|
protected boolean |
equalsImpl(Object obj)
Implementation of equals
|
String |
getDescription(String itemName)
Retrieve the description for an item name
|
MetaType |
getType(String itemName)
Retrieve the meta type for an item name
|
protected int |
hashCodeImpl()
Hashcode implementation
|
boolean |
isComposite()
Retrieve whether the class name of the type is composite
|
boolean |
isValue(Object obj)
Whether the passed value is one of those described by this meta type.
|
Set<String> |
itemSet()
Retrieve an unmodifiable Set view of all the item names in ascending order.
|
Set<String> |
keySet()
Retrieve an unmodifiable Set view of all the key names in ascending order.
|
protected void |
setKeys(Set<String> keySet)
Set the keys
|
String |
toString() |
getClassName, getDescription, getTypeName, isArray, isCollection, isEnum, isGeneric, isPrimitive, isProperties, isSimple, isTableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClassName, getDescription, getTypeName, isArray, isCollection, isEnum, isGeneric, isPrimitive, isProperties, isSimple, isTableprotected AbstractCompositeMetaType(String typeName, String description, String[] itemNames, String[] itemDescriptions, MetaType[] itemTypes, boolean ignoreItems)
The three arrays are internally copied. Future changes to these arrays do not alter the composite type.
getClassName() returns CompositeValue
typeName - the name of the composite type, cannot be null or emptydescription - the human readable description of the composite type, cannot be null or emptyitemNames - the names of the items described by this type. Cannot
be null, must contain at least one element, the elements cannot
be null or empty. The order of the items is unimportant when
determining equality.itemDescriptions - the human readable descriptions of the items
in the same order as the itemNames, cannot be null must have the
same number of elements as the itemNames. The elements cannot
be null or empty.itemTypes - the MetaTypes of the items in the same order as the
item names, cannot be null must have the
same number of elements as the itemNames. The elements cannot
be null.ignoreItems - whether to ignore itemsIllegalArgumentException - when a parameter does not match
what is described above or when itemNames contains a duplicate name.
The names are case sensitive, leading and trailing whitespace
is ignored.protected AbstractCompositeMetaType(String typeName, String description)
typeName - the name of the composite type, cannot be null or emptydescription - the human readable description of the composite type, cannot be null or emptyIllegalArgumentException - when a parameter does not match what is described above.protected void addItem(String itemName, String itemDescription, MetaType itemType)
itemName - the item nameitemDescription - the item descriptionitemType - the item typeIllegalArgumentException - for a null or empty item name, description or type or duplicate itempublic boolean containsItem(String itemName)
CompositeMetaTypecontainsItem in interface CompositeMetaTypeitemName - the item namepublic String getDescription(String itemName)
CompositeMetaTypegetDescription in interface CompositeMetaTypeitemName - the item namepublic boolean isComposite()
MetaTypeisComposite in interface MetaTypeisComposite in class AbstractMetaTypepublic MetaType getType(String itemName)
CompositeMetaTypegetType in interface CompositeMetaTypeitemName - the item namepublic Set<String> itemSet()
CompositeMetaTypeitemSet in interface CompositeMetaTypepublic Set<String> keySet()
CompositeMetaTypekeySet in interface CompositeMetaTypepublic boolean isValue(Object obj)
MetaTypeisValue in interface MetaTypeisValue in class AbstractMetaTypeobj - the object to testprotected boolean equalsImpl(Object obj)
obj - the object to checkprotected int hashCodeImpl()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.