org.jboss.metatype.api.types
Class CollectionMetaType
java.lang.Object
org.jboss.metatype.api.types.AbstractMetaType
org.jboss.metatype.api.types.CollectionMetaType
- All Implemented Interfaces:
- Serializable, MetaType
public class CollectionMetaType
- extends AbstractMetaType
CollectionMetaType.
- Author:
- Ales Justin, Adrian Brock
- See Also:
- Serialized Form
Methods inherited from class org.jboss.metatype.api.types.AbstractMetaType |
getClassName, getDescription, getTypeName, isArray, isComposite, isEnum, isGeneric, isPrimitive, isProperties, isSimple, isTable |
CollectionMetaType
public CollectionMetaType(String className,
MetaType elementType)
CollectionMetaType
public CollectionMetaType(String className,
String description,
MetaType elementType)
CollectionMetaType
public CollectionMetaType(String className,
String typeName,
String description,
MetaType elementType)
isCollection
public boolean isCollection()
- Description copied from interface:
MetaType
- Retrieve whether the class name of the type is a collection
- Specified by:
isCollection
in interface MetaType
- Overrides:
isCollection
in class AbstractMetaType
- Returns:
- true when it is a collection or false otherwise
getCollectionType
public static CollectionMetaType getCollectionType(String collectionType,
MetaType elementType)
- Get collection meta type.
- Parameters:
collectionType
- the element meta typeelementType
- the element meta type
- Returns:
- collection meta type
getElementType
public MetaType getElementType()
- Get the meta type of the array elements
- Returns:
- the element type
isValue
public boolean isValue(Object obj)
- Description copied from interface:
MetaType
- Whether the passed value is one of those described by this meta type.
- Specified by:
isValue
in interface MetaType
- Specified by:
isValue
in class AbstractMetaType
- Parameters:
obj
- the object to test
- Returns:
- true when it is value for this meta type, false otherwise
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 Object
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.