public abstract class PrimitiveType extends AbstractType implements SimpleType
constraints, EMPTY_SUPERTYPES, name, schema, superType
Modifier | Constructor and Description |
---|---|
protected |
PrimitiveType(String name) |
Modifier and Type | Method and Description |
---|---|
Set<Constraint> |
getConstraints() |
ObjectResolver |
getObjectResolver()
Provides a
ObjectResolver if this type is a reference to an external entity. |
PrimitiveType |
getPrimitiveType() |
Type |
getSuperType()
Gets the super type.
|
Type[] |
getTypeHierarchy()
Gets the entire hierarchy of super-types.
|
boolean |
isPrimitive()
Tests whether this type is a primitive type.
|
boolean |
isSimpleType()
Tests whether this type is a simple type.
|
abstract boolean |
support(Class<? extends Constraint> constraint) |
abstract boolean |
validate(Object object)
Tests whether the given object is of this type.
|
addConstraints, decode, encode, getName, getSchema, getSchemaName, isAny, isAnyType, isComplexType, isCompositeType, isListType, isSuperTypeOf, newInstance, validateConstraints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert, decode, encode, getName, getSchema, getSchemaName, isAnyType, isComplexType, isCompositeType, isListType, isSuperTypeOf, newInstance
protected PrimitiveType(String name)
public abstract boolean validate(Object object)
Type
validate
in interface Type
validate
in class AbstractType
object
- the object to testpublic ObjectResolver getObjectResolver()
Type
ObjectResolver
if this type is a reference to an external entity.getObjectResolver
in interface Type
getObjectResolver
in class AbstractType
public Type getSuperType()
Type
getSuperType
in interface Type
getSuperType
in class AbstractType
public Type[] getTypeHierarchy()
Type
The array is ordered as follows:
The returned array is never null. An empty array is returned in the case of ANY
type.
getTypeHierarchy
in interface Type
getTypeHierarchy
in class AbstractType
public boolean isPrimitive()
SimpleType
isPrimitive
in interface SimpleType
public boolean isSimpleType()
Type
isSimpleType
in interface Type
isSimpleType
in class AbstractType
public PrimitiveType getPrimitiveType()
getPrimitiveType
in interface SimpleType
public abstract boolean support(Class<? extends Constraint> constraint)
public Set<Constraint> getConstraints()
getConstraints
in interface Type
getConstraints
in class AbstractType
Copyright © 2018 Nuxeo. All rights reserved.