blob: 9458281f21c42e8dcb0bd944d192b51d8c975c5b [file] [log] [blame]
package com.google.inject.internal;
/**
* Contains flags for Guice.
*/
public class InternalFlags {
/**
* The options for Guice stack trace collection.
*/
public enum IncludeStackTraceOption {
// No stack trace collection
OFF,
// Minimum stack trace collection (Default)
ONLY_FOR_DECLARING_SOURCE,
// Full stack trace for everything
COMPLETE
}
public static IncludeStackTraceOption getIncludeStackTraceOption() {
String propertyValue = System.getProperty(
"guice_include_stack_traces");
if (IncludeStackTraceOption.OFF.name().equals(propertyValue)) {
return IncludeStackTraceOption.OFF;
}
if (IncludeStackTraceOption.COMPLETE.name().equals(propertyValue)) {
return IncludeStackTraceOption.COMPLETE;
}
return IncludeStackTraceOption.ONLY_FOR_DECLARING_SOURCE;
}
}