Package net.bytebuddy.asm
Class MemberSubstitution.Replacement.ForDynamicInvocation.Factory
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Replacement.ForDynamicInvocation.Factory
-
- All Implemented Interfaces:
MemberSubstitution.Replacement.Factory
- Enclosing class:
- MemberSubstitution.Replacement.ForDynamicInvocation
@Enhance protected static class MemberSubstitution.Replacement.ForDynamicInvocation.Factory extends java.lang.Object implements MemberSubstitution.Replacement.Factory
A factory for a replacement for an invokedynamic instruction.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Replacement.Factory
MemberSubstitution.Replacement.Factory.Compound
-
-
Field Summary
Fields Modifier and Type Field Description private ElementMatcher.Junction<? super java.util.List<JavaConstant>>
argumentsMatcher
A matcher for an invokedynamic instruction's constant arguments.private ElementMatcher<? super JavaConstant.MethodHandle>
handleMatcher
A matcher for an invokedynamic bootstrap method.private ElementMatcher.Junction<? super java.lang.String>
nameMatcher
A matcher for an invokedynamic instruction's name.private MemberSubstitution.Substitution.Factory<? super MemberSubstitution.Target.ForDynamicInvocation>
substitutionFactory
A factory for creating a substitution.private ElementMatcher.Junction<? super JavaConstant.MethodType>
typeMatcher
A matcher for an invokedynamic instruction's result type.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Factory(ElementMatcher<? super JavaConstant.MethodHandle> handleMatcher, ElementMatcher.Junction<? super java.lang.String> nameMatcher, ElementMatcher.Junction<? super JavaConstant.MethodType> typeMatcher, ElementMatcher.Junction<? super java.util.List<JavaConstant>> argumentsMatcher, MemberSubstitution.Substitution.Factory<? super MemberSubstitution.Target.ForDynamicInvocation> substitutionFactory)
Creates a factory for a replacement for a replacement for an invokedynamic instruction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemberSubstitution.Replacement
make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)
Creates a replacement for an instrumented method.
-
-
-
Field Detail
-
handleMatcher
private final ElementMatcher<? super JavaConstant.MethodHandle> handleMatcher
A matcher for an invokedynamic bootstrap method.
-
nameMatcher
private final ElementMatcher.Junction<? super java.lang.String> nameMatcher
A matcher for an invokedynamic instruction's name.
-
typeMatcher
private final ElementMatcher.Junction<? super JavaConstant.MethodType> typeMatcher
A matcher for an invokedynamic instruction's result type.
-
argumentsMatcher
private final ElementMatcher.Junction<? super java.util.List<JavaConstant>> argumentsMatcher
A matcher for an invokedynamic instruction's constant arguments.
-
substitutionFactory
private final MemberSubstitution.Substitution.Factory<? super MemberSubstitution.Target.ForDynamicInvocation> substitutionFactory
A factory for creating a substitution.
-
-
Constructor Detail
-
Factory
protected Factory(ElementMatcher<? super JavaConstant.MethodHandle> handleMatcher, ElementMatcher.Junction<? super java.lang.String> nameMatcher, ElementMatcher.Junction<? super JavaConstant.MethodType> typeMatcher, ElementMatcher.Junction<? super java.util.List<JavaConstant>> argumentsMatcher, MemberSubstitution.Substitution.Factory<? super MemberSubstitution.Target.ForDynamicInvocation> substitutionFactory)
Creates a factory for a replacement for a replacement for an invokedynamic instruction.- Parameters:
handleMatcher
- A matcher for an invokedynamic bootstrap method.nameMatcher
- A matcher for an invokedynamic instruction's name.typeMatcher
- A matcher for an invokedynamic instruction's result type.argumentsMatcher
- A matcher for an invokedynamic instruction's constant arguments.substitutionFactory
- A factory for creating a substitution.
-
-
Method Detail
-
make
public MemberSubstitution.Replacement make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)
Creates a replacement for an instrumented method.- Specified by:
make
in interfaceMemberSubstitution.Replacement.Factory
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.typePool
- The type pool being used within the member substitution being applied.- Returns:
- A replacement to use within the supplied instrumented method.
-
-