Enum InternalFlags.BytecodeGenOption

  • All Implemented Interfaces:
    Serializable, Comparable<InternalFlags.BytecodeGenOption>
    Enclosing class:
    InternalFlags

    public static enum InternalFlags.BytecodeGenOption
    extends Enum<InternalFlags.BytecodeGenOption>
    Options for controlling whether Guice uses bytecode generation at runtime. When bytecode generation is enabled, the following features will be enabled in Guice:
    • Runtime bytecode generation (instead of reflection) will be used when Guice need to invoke application code.
    • Method interception.

    Bytecode generation is generally faster than using reflection when invoking application code, however, it can use more memory and slower in certain cases due to the time spent in generating the classes. If you prefer to use reflection over bytecode generation then set InternalFlags.BytecodeGenOption to DISABLED.

    • Method Detail

      • values

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

        public static InternalFlags.BytecodeGenOption valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null