Type.Continue, Type.FieldNotFoundException, Type.Mu, Type.TypeError, Type.TypeMatcher<FT,FR>
Modifier and Type | Field and Description |
---|---|
protected Type<A> |
element |
protected String |
name |
Constructor and Description |
---|
NamedType(String name,
Type<A> element) |
Modifier and Type | Method and Description |
---|---|
RewriteResult<(String,A),?> |
all(TypeRewriteRule rule,
boolean recurse,
boolean checkIndex)
gmapT
run rule on all direct children and combine results
|
protected Codec<(String,A)> |
buildCodec() |
TypeTemplate |
buildTemplate() |
Type<A> |
element() |
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<(String,A),?,FT,FR>|Type.FieldNotFoundException) |
findTypeInChildren(Type<FT> type,
Type<FR> resultType,
Type.TypeMatcher<FT,FR> matcher,
boolean recurse) |
static <A,B> RewriteResult<(String,A),?> |
fix(Named.NamedType<A> type,
RewriteResult<A,B> instance) |
int |
hashCode() |
String |
name() |
Optional<RewriteResult<(String,A),?>> |
one(TypeRewriteRule rule)
run rule on exactly one child
|
Optional<(String,A)> |
point(DynamicOps<?> ops)
populate with the default value, if possible
only initializes empty things
|
String |
toString() |
Type<?> |
updateMu(RecursiveTypeFamily newFamily) |
protected static <A,B,FT,FR> |
wrapOptic(String name,
TypedOptic<A,B,FT,FR> optic) |
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 static <A,B> RewriteResult<(String,A),?> fix(Named.NamedType<A> type, RewriteResult<A,B> instance)
public RewriteResult<(String,A),?> all(TypeRewriteRule rule, boolean recurse, boolean checkIndex)
Type
public Optional<RewriteResult<(String,A),?>> one(TypeRewriteRule rule)
Type
public Type<?> updateMu(RecursiveTypeFamily newFamily)
public TypeTemplate buildTemplate()
buildTemplate
in class Type<(String,A)>
public Optional<TaggedChoice.TaggedChoiceType<?>> findChoiceType(String name, int index)
findChoiceType
in class Type<(String,A)>
public Optional<Type<?>> findCheckedType(int index)
findCheckedType
in class Type<(String,A)>
protected Codec<(String,A)> buildCodec()
buildCodec
in class Type<(String,A)>
public String name()
public boolean equals(Object obj, boolean ignoreRecursionPoints, boolean checkIndex)
public Optional<Type<?>> findFieldTypeOpt(String name)
findFieldTypeOpt
in class Type<(String,A)>
public Optional<(String,A)> point(DynamicOps<?> ops)
Type
public <FT,FR> (TypedOptic<(String,A),?,FT,FR>|Type.FieldNotFoundException) findTypeInChildren(Type<FT> type, Type<FR> resultType, Type.TypeMatcher<FT,FR> matcher, boolean recurse)
findTypeInChildren
in class Type<(String,A)>
protected static <A,B,FT,FR> TypedOptic<(String,A),(String,B),FT,FR> wrapOptic(String name, TypedOptic<A,B,FT,FR> optic)