@Immutable public class ElementType extends Object implements TypeConstraint
TypeDefinition
for a
elements of a collection. This is only relevant for a type if its
Binding
is a collection or array, default element binding is
Object
.Constructor and Description |
---|
ElementType()
Creates a default element binding constraint with
Object binding
and no type definition. |
Modifier and Type | Method and Description |
---|---|
static ElementType |
createFromType(TypeDefinition elementType)
Create an element type constraint with the given element type.
|
static ElementType |
get(Class<?> binding)
Get the element type constraint with the given Java binding
|
Class<?> |
getBinding()
Get the Java binding for collection elements of the type
|
TypeDefinition |
getDefinition()
Get the type definition for collection elements of the type
|
boolean |
isInheritable()
Determines if the constraint is inheritable, meaning it may be used for a
sub-type.
|
public ElementType()
Object
binding
and no type definition.Constraint
public static ElementType get(Class<?> binding)
binding
- the type's Java bindingpublic static ElementType createFromType(TypeDefinition elementType)
elementType
- the element type definitionpublic Class<?> getBinding()
public TypeDefinition getDefinition()
null
public boolean isInheritable()
TypeConstraint
isInheritable
in interface TypeConstraint
TypeConstraint.isInheritable()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a