Package org.apache.juneau.rest.debug
Class DebugEnablement.Builder
java.lang.Object
org.apache.juneau.rest.debug.DebugEnablement.Builder
- Enclosing class:
- DebugEnablement
Builder class.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Creates a newDebugEnablementobject from this builder. sconditional(Predicate<jakarta.servlet.http.HttpServletRequest> value) Specifies the predicate to use for conditional debug enablement.defaultEnable(Enablement value) Specifies the default debug enablement setting if not overridden per class/method.enable(Enablement enablement, Class<?>... classes) Enables or disables debug on the specified classes.enable(Enablement enablement, String... keys) Enables or disables debug on the specified classes and/or methods.impl(DebugEnablement value) Specifies an already-instantiated bean for thebuild()method to return.type(Class<? extends DebugEnablement> value) Specifies a subclass ofDebugEnablementto create when thebuild()method is called.
- 
Constructor Details- 
BuilderConstructor.- Parameters:
- beanStore- The bean store to use for creating beans.
 
 
- 
- 
Method Details- 
buildCreates a newDebugEnablementobject from this builder. sInstantiates an instance of the implementation classor elseBasicDebugEnablementif implementation class was not specified.- Returns:
- A new DebugEnablementobject.
 
- 
typeSpecifies a subclass ofDebugEnablementto create when thebuild()method is called.- Parameters:
- value- The new value for this setting.
- Returns:
- This object.
 
- 
implSpecifies an already-instantiated bean for thebuild()method to return.- Parameters:
- value- The setting value.
- Returns:
- This object.
 
- 
enableEnables or disables debug on the specified classes and/or methods.Allows you to target specified debug enablement on specified classes and/or methods. - Parameters:
- enablement- The debug enablement setting to set on the specified classes/methods.
 Can be any of the following:- ALWAYS- Debug is always enabled.
- NEVER- Debug is always disabled.
- CONDITIONAL- Debug is enabled when the- conditional(Predicate)conditional predicate test} passes.
 
- keys- The mapping keys.
 Can be any of the following:- Full class name (e.g. "com.foo.MyClass" ).
- Simple class name (e.g. "MyClass" ).
- All classes (e.g. "*" ).
- Full method name (e.g. "com.foo.MyClass.myMethod" ).
- Simple method name (e.g. "MyClass.myMethod" ).
- A comma-delimited list of anything on this list.
 
- Full class name (e.g. 
- Returns:
- This object.
 
- 
enableEnables or disables debug on the specified classes.Identical to enable(Enablement, String...)but allows you to specify specific classes.- Parameters:
- enablement- The debug enablement setting to set on the specified classes/methods.
 Can be any of the following:- ALWAYS- Debug is always enabled.
- NEVER- Debug is always disabled.
- CONDITIONAL- Debug is enabled when the- conditional(Predicate)conditional predicate test} passes.
 
- classes- The classes to set the debug enablement setting on.
- Returns:
- This object.
 
- 
defaultEnableSpecifies the default debug enablement setting if not overridden per class/method.The default value for this setting is NEVER.- Parameters:
- value- The default debug enablement setting if not overridden per class/method.
- Returns:
- This object.
 
- 
conditionalpublic DebugEnablement.Builder conditional(Predicate<jakarta.servlet.http.HttpServletRequest> value) Specifies the predicate to use for conditional debug enablement.Specifies the predicate to use to determine whether debug is enabled when the resolved enablement value is CONDITIONAL.The default value for this setting is ( .x )->"true" .equalsIgnoreCase(x .getHeader("Debug" ))- Parameters:
- value- The predicate.
- Returns:
- This object.
 
 
-