Package com.google.inject.internal
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
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
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static InternalFlags.BytecodeGenOption[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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.
-
-
Constructor Details
-
BytecodeGenOption
private BytecodeGenOption()
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-