Enum Class InternalFlags.BytecodeGenOption

java.lang.Object
java.lang.Enum<InternalFlags.BytecodeGenOption>
com.google.inject.internal.InternalFlags.BytecodeGenOption
All Implemented Interfaces:
Serializable, Comparable<InternalFlags.BytecodeGenOption>, Constable
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.

  • Enum Constant Details

  • Constructor Details

    • BytecodeGenOption

      private BytecodeGenOption()
  • Method Details

    • values

      public static InternalFlags.BytecodeGenOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static InternalFlags.BytecodeGenOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null