Class Implementation.SpecialMethodInvocation.Simple

    • Constructor Detail

      • Simple

        protected Simple​(MethodDescription methodDescription,
                         TypeDescription typeDescription,
                         StackManipulation stackManipulation)
        Creates a new legal special method invocation.
        Parameters:
        methodDescription - The method that represents the special method invocation.
        typeDescription - The type on which the method should be invoked on by an INVOKESPECIAL invocation.
        stackManipulation - The stack manipulation that represents this special method invocation.
    • Method Detail

      • of

        public static Implementation.SpecialMethodInvocation of​(MethodDescription methodDescription,
                                                                TypeDescription typeDescription)
        Creates a special method invocation for a given invocation target.
        Parameters:
        methodDescription - The method that represents the special method invocation.
        typeDescription - The type on which the method should be invoked on by an INVOKESPECIAL invocation.
        Returns:
        A special method invocation representing a legal invocation if the method can be invoked specially on the target type or an illegal invocation if this is not possible.
      • getMethodDescription

        public MethodDescription getMethodDescription()
        Description copied from interface: Implementation.SpecialMethodInvocation
        Returns the method that represents this special method invocation. This method can be different even for equal special method invocations, dependant on the method that was used to request such an invocation by the means of a Implementation.Target.
        Returns:
        The method description that describes this instances invocation target.
      • apply

        public StackManipulation.Size apply​(org.objectweb.asm.MethodVisitor methodVisitor,
                                            Implementation.Context implementationContext)
        Description copied from interface: StackManipulation
        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.