Interface StackManipulation
- All Known Subinterfaces:
ArrayFactory.ArrayCreator,Implementation.SpecialMethodInvocation,MethodConstant.CanCache,MethodDelegationBinder.MethodBinding,MethodDelegationBinder.ParameterBinding<T>,MethodInvocation.WithImplicitInvocationTargetType
- All Known Implementing Classes:
Addition,Advice.AssignReturned.DefaultValueSkip,Advice.AssignReturned.ExceptionHandler,AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher.UsingMethodHandle,ArrayAccess.Loader,ArrayAccess.Putter,ArrayFactory.ArrayCreator.ForPrimitiveType,ArrayFactory.ArrayCreator.ForReferenceType,ArrayFactory.ArrayStackManipulation,ArrayLength,ClassConstant,ClassConstant.ForReferenceType,DefaultMethod.Binder.DelegationMethod,DefaultValue,Division,DoubleConstant,DoubleConstant.ConstantPool,Duplication,Duplication.WithFlip,EqualsMethod.ConditionalReturn,EqualsMethod.NullValueGuard.UsingJump.AfterInstruction,EqualsMethod.NullValueGuard.UsingJump.BeforeInstruction,EqualsMethod.ValueComparator,FieldAccess.AccessDispatcher.AbstractFieldInstruction,FieldAccess.AccessDispatcher.FieldGetInstruction,FieldAccess.AccessDispatcher.FieldPutInstruction,FieldConstant,FieldConstant.Cached,FieldProxy.Binder.AccessorProxy,FloatConstant,FloatConstant.ConstantPool,HandleInvocation,HashCodeMethod.NullValueGuard.UsingJump.AfterInstruction,HashCodeMethod.NullValueGuard.UsingJump.BeforeInstruction,HashCodeMethod.ValueTransformer,Implementation.Context.Default.FieldCacheEntry,Implementation.SpecialMethodInvocation.AbstractBase,Implementation.SpecialMethodInvocation.Illegal,Implementation.SpecialMethodInvocation.Simple,InstanceCheck,IntegerConstant,IntegerConstant.ConstantPool,IntegerConstant.SingleBytePush,IntegerConstant.TwoBytePush,JavaConstantValue,LongConstant,LongConstant.ConstantPool,MethodCallProxy.AssignableSignatureCall,MethodConstant,MethodConstant.CachedConstructor,MethodConstant.CachedMethod,MethodConstant.CanCacheIllegal,MethodConstant.ForConstructor,MethodConstant.ForMethod,MethodConstant.PrivilegedLookup,MethodDelegationBinder.MethodBinding.Builder.Build,MethodDelegationBinder.MethodBinding.Illegal,MethodDelegationBinder.ParameterBinding.Anonymous,MethodDelegationBinder.ParameterBinding.Illegal,MethodDelegationBinder.ParameterBinding.Unique,MethodInvocation.DynamicInvocation,MethodInvocation.HandleInvocation,MethodInvocation.IllegalInvocation,MethodInvocation.Invocation,MethodInvocation.OfGenericMethod,MethodReturn,MethodVariableAccess.MethodLoading,MethodVariableAccess.OffsetIncrementing,MethodVariableAccess.OffsetLoading,MethodVariableAccess.OffsetWriting,Morph.Binder.RedirectionProxy,Multiplication,NullConstant,Pipe.Binder.RedirectionProxy,PrimitiveBoxingDelegate.BoxingStackManipulation,PrimitiveUnboxingDelegate,PrimitiveWideningDelegate.WideningStackManipulation,RebaseImplementationTarget.RebasedMethodInvocation,Remainder,Removal,SerializedConstant,ShiftLeft,ShiftRight,ShiftRight.Unsigned,StackManipulation.AbstractBase,StackManipulation.Compound,StackManipulation.Illegal,StackManipulation.Simple,StackManipulation.Trivial,Subtraction,SuperMethod.Binder.DelegationMethod,TextConstant,Throw,ToStringMethod.ValueConsumer,TypeCasting,TypeCreation,TypeProxy.AbstractMethodErrorThrow,TypeProxy.ForDefaultMethod,TypeProxy.ForSuperMethodByConstructor,TypeProxy.ForSuperMethodByReflectionFactory,TypeProxy.MethodCall.Appender.AccessorMethodInvocation
public interface StackManipulation
Describes a manipulation of a method's operand stack that does not affect the frame's variable array.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn abstract base implementation of a valid stack manipulation.static classAn immutable stack manipulation that aggregates a sequence of other stack manipulations.static enumCanonical representation of an illegal stack manipulation.static classAn implementation ofStackManipulationthat simplifies functional invocations via lambda expressions.static classA description of the size change that is imposed by someStackManipulation.static enumCanonical representation of a legal stack manipulation which does not require any action. -
Method Summary
Modifier and TypeMethodDescriptionapply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.booleanisValid()Determines if this stack manipulation is valid.
-
Method Details
-
isValid
boolean isValid()Determines if this stack manipulation is valid.- Returns:
- If
false, this manipulation cannot be applied and should throw an exception.
-
apply
StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.- Parameters:
methodVisitor- The method visitor used to write the method implementation to.implementationContext- The context of the current implementation.- Returns:
- The changes to the size of the operand stack that are implied by this stack manipulation.
-