|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.metatype.api.types.AbstractMetaType
org.jboss.metatype.plugins.types.AbstractCompositeMetaType
public abstract class AbstractCompositeMetaType
ImmutableCompositeMetaType.
| Field Summary |
|---|
| Fields inherited from interface org.jboss.metatype.api.types.MetaType |
|---|
ALLOWED_CLASSNAMES |
| Constructor Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.jboss.metatype.api.types.AbstractMetaType |
|---|
getClassName, getDescription, getTypeName, isArray, isCollection, isEnum, isGeneric, isPrimitive, isProperties, isSimple, isTable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.metatype.api.types.MetaType |
|---|
getClassName, getDescription, getTypeName, isArray, isCollection, isEnum, isGeneric, isPrimitive, isProperties, isSimple, isTable |
| Constructor Detail |
|---|
protected 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 items
IllegalArgumentException - 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 empty
IllegalArgumentException - when a parameter does not match what is described above.| Method Detail |
|---|
protected void setKeys(Set<String> keySet)
keySet - the key set
protected void addItem(String itemName,
String itemDescription,
MetaType itemType)
itemName - the item nameitemDescription - the item descriptionitemType - the item type
IllegalArgumentException - for a null or empty item name, description or type or duplicate itempublic boolean containsItem(String itemName)
CompositeMetaType
containsItem in interface CompositeMetaTypeitemName - the item name
public String getDescription(String itemName)
CompositeMetaType
getDescription in interface CompositeMetaTypeitemName - the item name
public boolean isComposite()
MetaType
isComposite in interface MetaTypeisComposite in class AbstractMetaTypepublic MetaType getType(String itemName)
CompositeMetaType
getType in interface CompositeMetaTypeitemName - the item name
public Set<String> itemSet()
CompositeMetaType
itemSet in interface CompositeMetaTypepublic Set<String> keySet()
CompositeMetaType
keySet in interface CompositeMetaTypepublic boolean isValue(Object obj)
MetaType
isValue in interface MetaTypeisValue in class AbstractMetaTypeobj - the object to test
protected boolean equalsImpl(Object obj)
obj - the object to check
protected int hashCodeImpl()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||