Package com.google.inject.internal
Class InternalFlags
- java.lang.Object
-
- com.google.inject.internal.InternalFlags
-
public final class InternalFlags extends java.lang.Object
Contains flags for Guice.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InternalFlags.BytecodeGenOption
Options for controlling whether Guice uses bytecode generation at runtime.static class
InternalFlags.ColorizeOption
Options for enable or disable using ansi color in error messages.static class
InternalFlags.CustomClassLoadingOption
The options for Guice custom class loading.static class
InternalFlags.IncludeStackTraceOption
The options for Guice stack trace collection.static class
InternalFlags.NullableProvidesOption
Options for handling nullable parameters used in provides methods.
-
Field Summary
Fields Modifier and Type Field Description private static InternalFlags.BytecodeGenOption
BYTECODE_GEN_OPTION
private static InternalFlags.ColorizeOption
COLORIZE_OPTION
private static InternalFlags.CustomClassLoadingOption
CUSTOM_CLASS_LOADING
private static InternalFlags.IncludeStackTraceOption
INCLUDE_STACK_TRACES
private static java.util.logging.Logger
logger
private static InternalFlags.NullableProvidesOption
NULLABLE_PROVIDES
-
Constructor Summary
Constructors Modifier Constructor Description private
InternalFlags()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
enableColorizeErrorMessages()
static InternalFlags.CustomClassLoadingOption
getCustomClassLoadingOption()
static InternalFlags.IncludeStackTraceOption
getIncludeStackTraceOption()
static InternalFlags.NullableProvidesOption
getNullableProvidesOption()
private static <T extends java.lang.Enum<T>>
TgetSystemOption(java.lang.String name, T defaultValue)
Gets the system option indicated by the specified key; runs as a privileged action.private static <T extends java.lang.Enum<T>>
TgetSystemOption(java.lang.String name, T defaultValue, T secureValue)
Gets the system option indicated by the specified key; runs as a privileged action.static boolean
isBytecodeGenEnabled()
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
INCLUDE_STACK_TRACES
private static final InternalFlags.IncludeStackTraceOption INCLUDE_STACK_TRACES
-
CUSTOM_CLASS_LOADING
private static final InternalFlags.CustomClassLoadingOption CUSTOM_CLASS_LOADING
-
NULLABLE_PROVIDES
private static final InternalFlags.NullableProvidesOption NULLABLE_PROVIDES
-
BYTECODE_GEN_OPTION
private static final InternalFlags.BytecodeGenOption BYTECODE_GEN_OPTION
-
COLORIZE_OPTION
private static final InternalFlags.ColorizeOption COLORIZE_OPTION
-
-
Method Detail
-
getIncludeStackTraceOption
public static InternalFlags.IncludeStackTraceOption getIncludeStackTraceOption()
-
getCustomClassLoadingOption
public static InternalFlags.CustomClassLoadingOption getCustomClassLoadingOption()
-
getNullableProvidesOption
public static InternalFlags.NullableProvidesOption getNullableProvidesOption()
-
isBytecodeGenEnabled
public static boolean isBytecodeGenEnabled()
-
enableColorizeErrorMessages
public static boolean enableColorizeErrorMessages()
-
getSystemOption
private static <T extends java.lang.Enum<T>> T getSystemOption(java.lang.String name, T defaultValue)
Gets the system option indicated by the specified key; runs as a privileged action.- Parameters:
name
- of the system optiondefaultValue
- if the option is not set- Returns:
- value of the option, defaultValue if not set
-
getSystemOption
private static <T extends java.lang.Enum<T>> T getSystemOption(java.lang.String name, T defaultValue, T secureValue)
Gets the system option indicated by the specified key; runs as a privileged action.- Parameters:
name
- of the system optiondefaultValue
- if the option is not setsecureValue
- if the security manager disallows access to the option- Returns:
- value of the option, defaultValue if not set, secureValue if no access
-
-