Package com.exedio.cope.pattern
Class BlockField<E extends Block>
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.pattern.BlockField<E>
-
- All Implemented Interfaces:
Copyable
,TemplatedField<E>
,Serializable
public final class BlockField<E extends Block> extends Pattern implements Copyable, TemplatedField<E>
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockField<E>
copy(CopyMapper mapper)
static <E extends Block>
BlockField<E>create(BlockType<E> valueType)
E
get(Item item)
List<? extends Feature>
getComponents()
<X extends Feature>
XgetTemplate(X component)
Returns the template the given component was created for.List<? extends Feature>
getTemplates()
Class<E>
getValueClass()
BlockType<E>
getValueType()
<X extends Feature>
Xof(X template)
Returns the component created for the given template within this BlockField.-
Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, onMount, registerSource
-
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
-
-
-
Method Detail
-
create
public static <E extends Block> BlockField<E> create(BlockType<E> valueType)
-
copy
public BlockField<E> copy(CopyMapper mapper)
-
of
public <X extends Feature> X of(X template)
Returns the component created for the given template within this BlockField. The reverse operation isgetTemplate(Feature)
.- Specified by:
of
in interfaceTemplatedField<E extends Block>
-
getTemplate
public <X extends Feature> X getTemplate(X component)
Returns the template the given component was created for. The reverse operation isof(Feature)
.- Specified by:
getTemplate
in interfaceTemplatedField<E extends Block>
-
getComponents
public List<? extends Feature> getComponents()
- Specified by:
getComponents
in interfaceTemplatedField<E extends Block>
-
get
@Nonnull public E get(@Nonnull Item item)
- Specified by:
get
in interfaceTemplatedField<E extends Block>
-
getValueType
public BlockType<E> getValueType()
- Specified by:
getValueType
in interfaceTemplatedField<E extends Block>
-
getValueClass
public Class<E> getValueClass()
- Specified by:
getValueClass
in interfaceTemplatedField<E extends Block>
-
-