Package net.bytebuddy.asm
Class MemberSubstitution.Replacement.Binding.ForDynamicInvocation
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Replacement.Binding.ForDynamicInvocation
-
- All Implemented Interfaces:
MemberSubstitution.Replacement.Binding
- Enclosing interface:
- MemberSubstitution.Replacement.Binding
@Enhance public static class MemberSubstitution.Replacement.Binding.ForDynamicInvocation extends java.lang.Object implements MemberSubstitution.Replacement.Binding
A binding that was resolved for an invokedynamic expression.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Replacement.Binding
MemberSubstitution.Replacement.Binding.ForDynamicInvocation, MemberSubstitution.Replacement.Binding.ForMember, MemberSubstitution.Replacement.Binding.Unresolved
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<JavaConstant>argumentsThe constant arguments supplied to the bootstrap method.private JavaConstant.MethodTypemethodTypeThe type of the lambda expression that is to be bound.private java.lang.StringnameThe name of the lambda expression target.private MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForDynamicInvocation>substitutionThe substitution to apply.
-
Constructor Summary
Constructors Modifier Constructor Description protectedForDynamicInvocation(JavaConstant.MethodType methodType, java.lang.String name, java.util.List<JavaConstant> arguments, MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForDynamicInvocation> substitution)Creates a resolved binding for an invokedynamic expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBound()Returnstrueif this binding is resolved.StackManipulationmake(TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, int freeOffset)Creates a stack manipulation that represents the substitution.
-
-
-
Field Detail
-
methodType
private final JavaConstant.MethodType methodType
The type of the lambda expression that is to be bound.
-
name
private final java.lang.String name
The name of the lambda expression target.
-
arguments
private final java.util.List<JavaConstant> arguments
The constant arguments supplied to the bootstrap method.
-
substitution
private final MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForDynamicInvocation> substitution
The substitution to apply.
-
-
Constructor Detail
-
ForDynamicInvocation
protected ForDynamicInvocation(JavaConstant.MethodType methodType, java.lang.String name, java.util.List<JavaConstant> arguments, MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForDynamicInvocation> substitution)
Creates a resolved binding for an invokedynamic expression.- Parameters:
methodType- The type of the lambda expression that is to be bound.name- The name of the lambda expression target.arguments- The constant arguments supplied to the bootstrap method.substitution- The substitution to apply.
-
-
Method Detail
-
isBound
public boolean isBound()
Returnstrueif this binding is resolved.- Specified by:
isBoundin interfaceMemberSubstitution.Replacement.Binding- Returns:
trueif this binding is resolved.
-
make
public StackManipulation make(TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, int freeOffset)
Creates a stack manipulation that represents the substitution. This method can only be called for actually bound bindings.- Specified by:
makein interfaceMemberSubstitution.Replacement.Binding- Parameters:
parameters- The parameters that are accessible to the substitution target.result- The result that is expected from the substitution target orvoidif none is expected.methodHandle- A method handle that represents the original expression that is being substituted.stackManipulation- The original byte code expression that is being substituted.freeOffset- The first offset that can be used for storing local variables.- Returns:
- A stack manipulation that represents the replacement.
-
-