Enum JavaDispatcher.Dispatcher.ForDefaultValue

    • Field Detail

      • value

        private final java.lang.Object value
        The default value.
      • load

        private final int load
        The opcode to load the default value.
      • returned

        private final int returned
        The opcode to return the default value.
      • size

        private final int size
        The operand stack size of default value.
    • Constructor Detail

      • ForDefaultValue

        private ForDefaultValue​(java.lang.Object value,
                                int load,
                                int returned,
                                int size)
        Creates a new default value dispatcher.
        Parameters:
        value - The default value.
        load - The opcode to load the default value.
        returned - The opcode to return the default value.
        size - The operand stack size of default value.
    • Method Detail

      • values

        public static JavaDispatcher.Dispatcher.ForDefaultValue[] 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 (JavaDispatcher.Dispatcher.ForDefaultValue c : JavaDispatcher.Dispatcher.ForDefaultValue.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JavaDispatcher.Dispatcher.ForDefaultValue 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 JavaDispatcher.Dispatcher of​(java.lang.Class<?> type)
        Resolves a fixed value for a given type.
        Parameters:
        type - The type to resolve.
        Returns:
        An appropriate dispatcher.
      • invoke

        public java.lang.Object invoke​(java.lang.Object[] argument)
        Invokes the proxied action.
        Specified by:
        invoke in interface JavaDispatcher.Dispatcher
        Parameters:
        argument - The arguments provided.
        Returns:
        The return value.
      • apply

        public int apply​(org.objectweb.asm.MethodVisitor methodVisitor,
                         java.lang.reflect.Method method)
        Implements this dispatcher in a generated proxy.
        Specified by:
        apply in interface JavaDispatcher.Dispatcher
        Parameters:
        methodVisitor - The method visitor to implement the method with.
        method - The method being implemented.
        Returns:
        The maximal size of the operand stack.