public interface Type extends Ref<Type>, Disposable, Validation, Scoped
| Modifier and Type | Interface and Description |
|---|---|
static class |
Type.Family |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Scope scope,
Ref<Value> valueRef)
Accept value, use scope for resolution.
|
default ElementSetSpecs |
asElementSetSpecs()
Convert type to value set if possible
|
Type |
copy()
Copy this type.
|
IEncoding |
getEncoding(EncodingInstructions instructions)
Return type encodings
|
Type.Family |
getFamily()
Return type family
|
default NamedType |
getNamedType(String name)
Return component type by name
|
default List<? extends NamedType> |
getNamedTypes()
Returns list of all named types
|
default NamedValue |
getNamedValue(String name)
Return named value by name
|
default Collection<NamedValue> |
getNamedValues() |
String |
getNamespace() |
default Scope |
getScope(Scope parentScope)
Get type scope
|
default Type |
getSibling()
Returns sibling type if any
|
default boolean |
hasConstraint() |
default boolean |
hasElementSetSpecs()
Returns true if this type has value set associated with it.
|
default boolean |
isConstructedValue(Scope scope,
Value value) |
default boolean |
isTagged()
Returns true if current type is tagged.
|
Value |
optimize(Scope scope,
Ref<Value> valueRef)
Optimize value to type native value kind.
|
void |
setNamespace(String namespace) |
disposegetState, isDisposed, isValidated, validatedefault boolean isTagged()
@Nullable default Type getSibling()
IllegalStateException - if type is not validatedvoid accept(@NotNull
Scope scope,
@NotNull
Ref<Value> valueRef)
throws ValidationException,
ResolutionException
scope - resolution scopevalueRef - value referenceValidationException - if value is malformed for this typeResolutionException - if reference was not resolved, or data can not be acquiredoptimize(Scope, Ref)@NotNull Value optimize(@NotNull Scope scope, @NotNull Ref<Value> valueRef) throws ResolutionException, ValidationException
scope - the resolution scopevalueRef - the value ref to optimizeValidationException - if value is malformed for this typeResolutionException - if reference was not resolved, or data can not be acquiredaccept(Scope, Ref)@Nullable default NamedType getNamedType(@NotNull String name)
name - component name@NotNull default List<? extends NamedType> getNamedTypes()
@Nullable default NamedValue getNamedValue(@NotNull String name)
name - value name@NotNull default Collection<NamedValue> getNamedValues()
@NotNull Type.Family getFamily()
IEncoding getEncoding(EncodingInstructions instructions)
instructions - encoding instructions@NotNull Type copy()
TemplateString getNamespace()
void setNamespace(String namespace)
default ElementSetSpecs asElementSetSpecs()
default boolean hasConstraint()
default boolean hasElementSetSpecs()
Copyright © 2017. All rights reserved.