org.jboss.metatype.api.types
Class ImmutableCompositeMetaType
java.lang.Object
org.jboss.metatype.api.types.AbstractMetaType
org.jboss.metatype.plugins.types.AbstractCompositeMetaType
org.jboss.metatype.api.types.ImmutableCompositeMetaType
- All Implemented Interfaces:
- Serializable, CompositeMetaType, MetaType
public class ImmutableCompositeMetaType
- extends AbstractCompositeMetaType
ImmutableCompositeMetaType.
- Version:
- $Revision: 1.1 $
- Author:
- Adrian Brock
- See Also:
- Serialized Form
Methods inherited from class org.jboss.metatype.plugins.types.AbstractCompositeMetaType |
addItem, containsItem, equalsImpl, getDescription, getType, hashCodeImpl, isComposite, isValue, itemSet, keySet, setKeys |
Methods inherited from class org.jboss.metatype.api.types.AbstractMetaType |
getClassName, getDescription, getTypeName, isArray, isCollection, isEnum, isGeneric, isPrimitive, isProperties, isSimple, isTable |
Methods inherited from interface org.jboss.metatype.api.types.MetaType |
getClassName, getDescription, getTypeName, isArray, isCollection, isEnum, isGeneric, isPrimitive, isProperties, isSimple, isTable |
ImmutableCompositeMetaType
public ImmutableCompositeMetaType(String typeName,
String description,
String[] itemNames,
String[] itemDescriptions,
MetaType[] itemTypes)
- Construct a composite meta type. The parameters are checked for validity.
The three arrays are internally copied. Future changes to these
arrays do not alter the composite type.
getClassName() returns CompositeValue
- Parameters:
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.
- Throws:
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.
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class AbstractCompositeMetaType
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.