org.jboss.metatype.api.types
Interface MetaType

All Superinterfaces:
Serializable
All Known Subinterfaces:
CompositeMetaType, TableMetaType
All Known Implementing Classes:
AbstractCompositeMetaType, AbstractMetaType, ArrayMetaType, CollectionMetaType, EnumMetaType, GenericMetaType, ImmutableCompositeMetaType, ImmutableTableMetaType, MapCompositeMetaType, MutableCompositeMetaType, PropertiesMetaType, SimpleMetaType

public interface MetaType
extends Serializable

MetaType.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Field Summary
static List<String> ALLOWED_CLASSNAMES
          The allowed classnames.
 
Method Summary
 String getClassName()
          Retrieve the class name of the values of this meta type.
 String getDescription()
          Retrieve the description of the type
 String getTypeName()
          Retrieve the name of the meta type
 boolean isArray()
          Retrieve whether the class name of the type is an array
 boolean isCollection()
          Retrieve whether the class name of the type is a collection
 boolean isComposite()
          Retrieve whether the class name of the type is composite
 boolean isEnum()
          Retrieve whether the class name of the type is an enum
 boolean isGeneric()
          Retrieve whether the class name of the type is generic
 boolean isPrimitive()
          Retrieve whether the class name of the type is a java primitive type.
 boolean isProperties()
          Return whether the type is a PropertiesMetaType type.
 boolean isSimple()
          Retrieve whether the class name of the type is simple
 boolean isTable()
          Retrieve whether the class name of the type is a table
 boolean isValue(Object obj)
          Whether the passed value is one of those described by this meta type.
 

Field Detail

ALLOWED_CLASSNAMES

static final List<String> ALLOWED_CLASSNAMES
The allowed classnames.

One of
java.lang.Void
java.lang.Boolean
java.lang.Character
java.lang.Byte
java.lang.Short
java.lang.Integer
java.lang.Long
java.lang.Float
java.lang.Double
java.lang.String
java.lang.Date
java.math.BigDecimal
java.math.BigInteger
java.util.Properties
Name
SimpleValue
EnumValue
GenericValue
ArrayValue
CompositeValue
TableValue

Method Detail

getClassName

String getClassName()
Retrieve the class name of the values of this meta type. It is one of those listed in ALLOWED_CLASSNAMES or a (multi-dimensional) array of one of those classes.

Returns:
the class name

getTypeName

String getTypeName()
Retrieve the name of the meta type

Returns:
the type name

getDescription

String getDescription()
Retrieve the description of the type

Returns:
the description

isArray

boolean isArray()
Retrieve whether the class name of the type is an array

Returns:
true when it is an array or false otherwise

isCollection

boolean isCollection()
Retrieve whether the class name of the type is a collection

Returns:
true when it is a collection or false otherwise

isEnum

boolean isEnum()
Retrieve whether the class name of the type is an enum

Returns:
true when it is an enum or false otherwise

isSimple

boolean isSimple()
Retrieve whether the class name of the type is simple

Returns:
true when it is simple or false otherwise

isPrimitive

boolean isPrimitive()
Retrieve whether the class name of the type is a java primitive type.

Returns:

isGeneric

boolean isGeneric()
Retrieve whether the class name of the type is generic

Returns:
true when it is generic or false otherwise

isComposite

boolean isComposite()
Retrieve whether the class name of the type is composite

Returns:
true when it is composite or false otherwise

isTable

boolean isTable()
Retrieve whether the class name of the type is a table

Returns:
true when it is a table or false otherwise

isProperties

boolean isProperties()
Return whether the type is a PropertiesMetaType type.

Returns:
true if type is a PropertiesMetaType
See Also:
PropertiesMetaType

isValue

boolean isValue(Object obj)
Whether the passed value is one of those described by this meta type.

Parameters:
obj - the object to test
Returns:
true when it is value for this meta type, false otherwise


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.