Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.core.schema.types
Class AnyType

java.lang.Object
  extended by org.nuxeo.ecm.core.schema.types.AbstractType
      extended by org.nuxeo.ecm.core.schema.types.AnyType
All Implemented Interfaces:
Serializable, Type, ValueConverter

public final class AnyType
extends AbstractType

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Field Summary
static String ID
           
static AnyType INSTANCE
           
 
Fields inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
converter, EMPTY_SUPERTYPES, F_NOTNULL, F_READONLY, flags, helper, name, schema, superType
 
Fields inherited from interface org.nuxeo.ecm.core.schema.types.Type
ANY
 
Method Summary
 Object convert(Object object)
          Converts the given value to an object compatible with the associated type.
 Type getSuperType()
          Gets the super type.
 Type[] getTypeHierarchy()
          Gets the entire hierarchy of super-types.
 boolean isAnyType()
          Tests whether this type is the ANY type.
protected  Object readResolve()
           
 boolean validate(Object object)
          Tests whether the given object is of this type.
 
Methods inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
clearFlags, decode, encode, getConverter, getHelper, getName, getRef, getSchema, getSchemaName, isAny, isComplexType, isCompositeType, isFlagSet, isListType, isNotNull, isReadOnly, isSimpleType, isSuperTypeOf, newInstance, setConverter, setFlags, setNotNull, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

INSTANCE

public static final AnyType INSTANCE
Method Detail

getSuperType

public Type getSuperType()
Description copied from interface: Type
Gets the super type.

Specified by:
getSuperType in interface Type
Overrides:
getSuperType in class AbstractType
Returns:
the super type or null if this is a primitive type

getTypeHierarchy

public Type[] getTypeHierarchy()
Description copied from interface: Type
Gets the entire hierarchy of super-types.

The array is ordered as follows:

The returned array is never null. An empty array is returned in the case of ANY type.

Specified by:
getTypeHierarchy in interface Type
Overrides:
getTypeHierarchy in class AbstractType
Returns:
an array containing the supertypes of this type

isAnyType

public boolean isAnyType()
Description copied from interface: Type
Tests whether this type is the ANY type.

Specified by:
isAnyType in interface Type
Overrides:
isAnyType in class AbstractType
Returns:
true if it is the ANY type, false otherwise

validate

public boolean validate(Object object)
Description copied from interface: Type
Tests whether the given object is of this type.

Specified by:
validate in interface Type
Overrides:
validate in class AbstractType
Parameters:
object - the object to test
Returns:
true if the given object if of this type, false otherwise

convert

public Object convert(Object object)
Description copied from interface: ValueConverter
Converts the given value to an object compatible with the associated type.

Specified by:
convert in interface ValueConverter
Overrides:
convert in class AbstractType
Parameters:
object - the value to convert
Returns:
the converted value

readResolve

protected Object readResolve()

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.