Enum Advice.Dispatcher.RelocationHandler.ForValue

    • Field Detail

      • load

        private final int load
        An opcode for loading a value of the represented type from the local variable array.
      • defaultJump

        private final int defaultJump
        The opcode to check for a non-default value.
      • nonDefaultJump

        private final int nonDefaultJump
        The opcode to check for a default value.
      • requiredSize

        private final int requiredSize
        The minimal required stack size to apply this relocation handler.
    • Constructor Detail

      • ForValue

        private ForValue​(int load,
                         int defaultJump,
                         int nonDefaultJump,
                         int requiredSize)
        Creates a new relocation handler for a type's default or non-default value.
        Parameters:
        load - An opcode for loading a value of the represented type from the local variable array.
        defaultJump - The opcode to check for a non-default value.
        nonDefaultJump - The opcode to check for a default value.
        requiredSize - The minimal required stack size to apply this relocation handler.
    • Method Detail

      • values

        public static Advice.Dispatcher.RelocationHandler.ForValue[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Advice.Dispatcher.RelocationHandler.ForValue c : Advice.Dispatcher.RelocationHandler.ForValue.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Advice.Dispatcher.RelocationHandler.ForValue valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • of

        protected static Advice.Dispatcher.RelocationHandler of​(TypeDefinition typeDefinition,
                                                                boolean inverted)
        Resolves a relocation handler for a given type.
        Parameters:
        typeDefinition - The type to be resolved for a relocation attempt.
        inverted - true if the relocation should be applied for any non-default value of a type.
        Returns:
        An appropriate relocation handler.
      • convertValue

        protected abstract void convertValue​(org.objectweb.asm.MethodVisitor methodVisitor)
        Applies a value conversion prior to a applying a conditional jump.
        Parameters:
        methodVisitor - The method visitor to use.