Class AsmVisitorWrapper.ForDeclaredFields.Entry
java.lang.Object
net.bytebuddy.asm.AsmVisitorWrapper.ForDeclaredFields.Entry
- All Implemented Interfaces:
AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper, ElementMatcher<FieldDescription.InDefinedShape>
- Enclosing class:
AsmVisitorWrapper.ForDeclaredFields
@Enhance
protected static class AsmVisitorWrapper.ForDeclaredFields.Entry
extends Object
implements ElementMatcher<FieldDescription.InDefinedShape>, AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper
An entry describing a field visitor wrapper paired with a matcher for fields to be wrapped.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ElementMatcher
ElementMatcher.Junction<S> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<? extends AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper> The field visitor wrapper to be applied if the given matcher is matched.private final ElementMatcher<? super FieldDescription.InDefinedShape> The matcher to identify fields to be wrapped. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEntry(ElementMatcher<? super FieldDescription.InDefinedShape> matcher, List<? extends AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper> fieldVisitorWrappers) Creates a new entry. -
Method Summary
Modifier and TypeMethodDescriptionbooleanMatches a target against this element matcher.org.objectweb.asm.FieldVisitorwrap(TypeDescription instrumentedType, FieldDescription.InDefinedShape fieldDescription, org.objectweb.asm.FieldVisitor fieldVisitor) Wraps a field visitor.
-
Field Details
-
matcher
The matcher to identify fields to be wrapped. -
fieldVisitorWrappers
private final List<? extends AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper> fieldVisitorWrappersThe field visitor wrapper to be applied if the given matcher is matched.
-
-
Constructor Details
-
Entry
protected Entry(ElementMatcher<? super FieldDescription.InDefinedShape> matcher, List<? extends AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper> fieldVisitorWrappers) Creates a new entry.- Parameters:
matcher- The matcher to identify fields to be wrapped.fieldVisitorWrappers- The field visitor wrapper to be applied if the given matcher is matched.
-
-
Method Details
-
matches
Matches a target against this element matcher.- Specified by:
matchesin interfaceElementMatcher<FieldDescription.InDefinedShape>- Parameters:
target- The instance to be matched ornull.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
wrap
public org.objectweb.asm.FieldVisitor wrap(TypeDescription instrumentedType, FieldDescription.InDefinedShape fieldDescription, org.objectweb.asm.FieldVisitor fieldVisitor) Wraps a field visitor.- Specified by:
wrapin interfaceAsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper- Parameters:
instrumentedType- The instrumented type.fieldDescription- The field that is currently being defined.fieldVisitor- The original field visitor that defines the given field.- Returns:
- The wrapped field visitor.
-