Package net.bytebuddy.asm
Class MemberSubstitution.WithoutSpecification.ForMatchedByteCodeElement
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.WithoutSpecification
net.bytebuddy.asm.MemberSubstitution.WithoutSpecification.ForMatchedByteCodeElement
- Enclosing class:
MemberSubstitution.WithoutSpecification
@Enhance
protected static class MemberSubstitution.WithoutSpecification.ForMatchedByteCodeElement
extends MemberSubstitution.WithoutSpecification
Describes a member substitution that requires a specification for how to replace a byte code element.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.asm.MemberSubstitution.WithoutSpecification
MemberSubstitution.WithoutSpecification.ForMatchedByteCodeElement, MemberSubstitution.WithoutSpecification.ForMatchedField, MemberSubstitution.WithoutSpecification.ForMatchedMethod
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ElementMatcher
<? super ByteCodeElement.Member> A matcher for any byte code elements that should be substituted.Fields inherited from class net.bytebuddy.asm.MemberSubstitution.WithoutSpecification
methodGraphCompiler, replacementFactory, strict, typePoolResolver
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForMatchedByteCodeElement
(MethodGraph.Compiler methodGraphCompiler, MemberSubstitution.TypePoolResolver typePoolResolver, boolean strict, MemberSubstitution.Replacement.Factory replacementFactory, ElementMatcher<? super ByteCodeElement.Member> matcher) Creates a new member substitution for a matched byte code element that requires a specification for how to perform a substitution. -
Method Summary
Modifier and TypeMethodDescriptionreplaceWith
(MemberSubstitution.Substitution.Factory substitutionFactory) Replaces any interaction with the supplied substitution.Methods inherited from class net.bytebuddy.asm.MemberSubstitution.WithoutSpecification
replaceWith, replaceWith, replaceWith, replaceWith, replaceWithChain, replaceWithChain, replaceWithConstant, replaceWithField, replaceWithInstrumentedMethod, replaceWithMethod, replaceWithMethod, stub
-
Field Details
-
matcher
A matcher for any byte code elements that should be substituted.
-
-
Constructor Details
-
ForMatchedByteCodeElement
protected ForMatchedByteCodeElement(MethodGraph.Compiler methodGraphCompiler, MemberSubstitution.TypePoolResolver typePoolResolver, boolean strict, MemberSubstitution.Replacement.Factory replacementFactory, ElementMatcher<? super ByteCodeElement.Member> matcher) Creates a new member substitution for a matched byte code element that requires a specification for how to perform a substitution.- Parameters:
methodGraphCompiler
- The method graph compiler to use.typePoolResolver
- The type pool resolver to use.strict
-true
if the method processing should be strict where an exception is raised if a member cannot be found.replacementFactory
- The replacement factory to use.matcher
- A matcher for any byte code elements that should be substituted.
-
-
Method Details
-
replaceWith
Replaces any interaction with the supplied substitution.- Specified by:
replaceWith
in classMemberSubstitution.WithoutSpecification
- Parameters:
substitutionFactory
- The substitution factory to use for creating the applied substitution.- Returns:
- A member substitution that replaces any matched byte code element with the supplied substitution.
-