Type.Continue, Type.FieldNotFoundException, Type.Mu, Type.TypeError, Type.TypeMatcher<FT,FR>
Constructor and Description |
---|
TaggedChoiceType(String name,
Type<K> keyType,
Map<K,Type<?>> types) |
Modifier and Type | Method and Description |
---|---|
RewriteResult<(K,?),?> |
all(TypeRewriteRule rule,
boolean recurse,
boolean checkIndex)
gmapT
run rule on all direct children and combine results
|
protected Codec<(K,?)> |
buildCodec() |
TypeTemplate |
buildTemplate() |
static <K,FT,FR> RewriteResult<(K,?),(K,?)> |
elementResult(K key,
TaggedChoice.TaggedChoiceType<K> type,
RewriteResult<FT,FR> result) |
boolean |
equals(Object obj,
boolean ignoreRecursionPoints,
boolean checkIndex) |
Optional<Type<?>> |
findCheckedType(int index) |
Optional<TaggedChoice.TaggedChoiceType<?>> |
findChoiceType(String name,
int index) |
Optional<Type<?>> |
findFieldTypeOpt(String name) |
<FT,FR> (TypedOptic<(K,?),?,FT,FR>|Type.FieldNotFoundException) |
findTypeInChildren(Type<FT> type,
Type<FR> resultType,
Type.TypeMatcher<FT,FR> matcher,
boolean recurse) |
Type<K> |
getKeyType() |
String |
getName() |
int |
hashCode() |
boolean |
hasType(K key) |
Optional<RewriteResult<(K,?),?>> |
one(TypeRewriteRule rule)
run rule on exactly one child
|
Optional<(K,?)> |
point(DynamicOps<?> ops)
populate with the default value, if possible
only initializes empty things
|
Optional<Typed<(K,?)>> |
point(DynamicOps<?> ops,
K key,
Object value) |
String |
toString() |
Map<K,Type<?>> |
types() |
Type<?> |
updateMu(RecursiveTypeFamily newFamily) |
codec, equals, everywhere, finder, findField, findFieldType, findType, findTypeCached, getSetType, ifSame, ifSame, ifSame, opticView, pointTyped, read, read, readAndWrite, readTyped, readTyped, rewrite, rewriteOrNop, template, unbox, write, writeDynamic
public RewriteResult<(K,?),?> all(TypeRewriteRule rule, boolean recurse, boolean checkIndex)
Type
public static <K,FT,FR> RewriteResult<(K,?),(K,?)> elementResult(K key, TaggedChoice.TaggedChoiceType<K> type, RewriteResult<FT,FR> result)
public Optional<RewriteResult<(K,?),?>> one(TypeRewriteRule rule)
Type
public Type<?> updateMu(RecursiveTypeFamily newFamily)
public TypeTemplate buildTemplate()
buildTemplate
in class Type<(K,?)>
public Optional<Type<?>> findFieldTypeOpt(String name)
findFieldTypeOpt
in class Type<(K,?)>
public Optional<(K,?)> point(DynamicOps<?> ops)
Type
public <FT,FR> (TypedOptic<(K,?),?,FT,FR>|Type.FieldNotFoundException) findTypeInChildren(Type<FT> type, Type<FR> resultType, Type.TypeMatcher<FT,FR> matcher, boolean recurse)
findTypeInChildren
in class Type<(K,?)>
public Optional<TaggedChoice.TaggedChoiceType<?>> findChoiceType(String name, int index)
findChoiceType
in class Type<(K,?)>
public Optional<Type<?>> findCheckedType(int index)
findCheckedType
in class Type<(K,?)>
public boolean equals(Object obj, boolean ignoreRecursionPoints, boolean checkIndex)
public String getName()
public boolean hasType(K key)