Type.Continue, Type.FieldNotFoundException, Type.Mu, Type.TypeError, Type.TypeMatcher<FT,FR>
Constructor and Description |
---|
HookType(Type<A> delegate,
Hook.HookFunction preRead,
Hook.HookFunction postWrite) |
Modifier and Type | Method and Description |
---|---|
RewriteResult<A,?> |
all(TypeRewriteRule rule,
boolean recurse,
boolean checkIndex)
gmapT
run rule on all direct children and combine results
|
protected Codec<A> |
buildCodec() |
TypeTemplate |
buildTemplate() |
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<A,?,FT,FR>|Type.FieldNotFoundException) |
findTypeInChildren(Type<FT> type,
Type<FR> resultType,
Type.TypeMatcher<FT,FR> matcher,
boolean recurse) |
static <A,B> RewriteResult<A,?> |
fix(Hook.HookType<A> type,
RewriteResult<A,B> instance) |
int |
hashCode() |
Optional<RewriteResult<A,?>> |
one(TypeRewriteRule rule)
run rule on exactly one child
|
Optional<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(TypedOptic<A,B,FT,FR> optic,
Hook.HookFunction preRead,
Hook.HookFunction postWrite) |
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 HookType(Type<A> delegate, Hook.HookFunction preRead, Hook.HookFunction postWrite)
protected Codec<A> buildCodec()
buildCodec
in class Type<A>
public RewriteResult<A,?> all(TypeRewriteRule rule, boolean recurse, boolean checkIndex)
Type
public Optional<RewriteResult<A,?>> one(TypeRewriteRule rule)
Type
public Type<?> updateMu(RecursiveTypeFamily newFamily)
public TypeTemplate buildTemplate()
buildTemplate
in class Type<A>
public Optional<TaggedChoice.TaggedChoiceType<?>> findChoiceType(String name, int index)
findChoiceType
in class Type<A>
public Optional<Type<?>> findCheckedType(int index)
findCheckedType
in class Type<A>
public Optional<Type<?>> findFieldTypeOpt(String name)
findFieldTypeOpt
in class Type<A>
public Optional<A> point(DynamicOps<?> ops)
Type
public <FT,FR> (TypedOptic<A,?,FT,FR>|Type.FieldNotFoundException) findTypeInChildren(Type<FT> type, Type<FR> resultType, Type.TypeMatcher<FT,FR> matcher, boolean recurse)
findTypeInChildren
in class Type<A>
public static <A,B> RewriteResult<A,?> fix(Hook.HookType<A> type, RewriteResult<A,B> instance)
protected static <A,B,FT,FR> TypedOptic<A,B,FT,FR> wrapOptic(TypedOptic<A,B,FT,FR> optic, Hook.HookFunction preRead, Hook.HookFunction postWrite)
public boolean equals(Object obj, boolean ignoreRecursionPoints, boolean checkIndex)