Enum InternalFlags.BytecodeGenOption

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

    public static enum InternalFlags.BytecodeGenOption
    extends java.lang.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.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DISABLED
      Bytecode generation is disabled and using features that require it such as method interception will throw errors at run time.
      ENABLED
      Bytecode generation is enabled.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static InternalFlags.BytecodeGenOption valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static InternalFlags.BytecodeGenOption[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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​(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