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, Invokedynamic, 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.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.
  • 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.