Package com.google.inject.internal
Class InternalFlags
- java.lang.Object
-
- com.google.inject.internal.InternalFlags
-
public final class InternalFlags extends java.lang.ObjectContains flags for Guice.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInternalFlags.BytecodeGenOptionOptions for controlling whether Guice uses bytecode generation at runtime.static classInternalFlags.ColorizeOptionOptions for enable or disable using ansi color in error messages.static classInternalFlags.CustomClassLoadingOptionThe options for Guice custom class loading.static classInternalFlags.IncludeStackTraceOptionThe options for Guice stack trace collection.static classInternalFlags.NullableProvidesOptionOptions for handling nullable parameters used in provides methods.
-
Field Summary
Fields Modifier and Type Field Description private static InternalFlags.BytecodeGenOptionBYTECODE_GEN_OPTIONprivate static InternalFlags.ColorizeOptionCOLORIZE_OPTIONprivate static InternalFlags.CustomClassLoadingOptionCUSTOM_CLASS_LOADINGprivate static InternalFlags.IncludeStackTraceOptionINCLUDE_STACK_TRACESprivate static java.util.logging.Loggerloggerprivate static InternalFlags.NullableProvidesOptionNULLABLE_PROVIDES
-
Constructor Summary
Constructors Modifier Constructor Description privateInternalFlags()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanenableColorizeErrorMessages()static InternalFlags.CustomClassLoadingOptiongetCustomClassLoadingOption()static InternalFlags.IncludeStackTraceOptiongetIncludeStackTraceOption()static InternalFlags.NullableProvidesOptiongetNullableProvidesOption()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 booleanisBytecodeGenEnabled()
-
-
-
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
-
-