Package eu.bandm.tools.ramus.ogma
Interface Factory.Configuration
- Enclosing class:
Factory
public static interface Factory.Configuration
Interface of factory configuration settings.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the callback object that is notified of each created object.Returns the parsing pragmas that are in effect globally.Returns the function object that discerns between code pertaining to the parser construction service, and its client.booleanChecks whether this factory shall capture the construction call location in client code.default Factory.ConfigurationwithAddedGlobalPragmas(Parser.Pragma... pragmas) Returns a variant of this configuration with also the given global parsing pragmas.default Factory.ConfigurationReturns a variant of this configuration with capturing of caller locations enabled.default Factory.ConfigurationwithCapturingCallerLocations(boolean capturingCallerLocations) Returns a variant of this configuration with capturing of caller locations enabled or disabled.default Factory.ConfigurationwithCreationWatcher(@Opt Consumer<Object> creationWatcher) Returns a variant of this configuration with the given creation watcher callback.default Factory.ConfigurationwithGlobalPragmas(Parser.Pragma... pragmas) Returns a variant of this configuration with just the given global parsing pragmas.default Factory.ConfigurationReturns a variant of this configuration with stack trace elements distinguished by module membership.
-
Method Details
-
isCapturingCallerLocations
boolean isCapturingCallerLocations()Checks whether this factory shall capture the construction call location in client code.- Returns:
trueif objects constructed by this factory record a location of the client code that called the factory;falseif callers are not tracked.
-
getCreationWatcher
Returns the callback object that is notified of each created object.- Returns:
- the callback object that is notified of each parser created by this
factory, or
nullif no notification takes place.
-
getServiceFilter
Predicate<StackTraceElement> getServiceFilter()Returns the function object that discerns between code pertaining to the parser construction service, and its client.- Returns:
- a function object that returns
truefor a stack trace element that belongs to the parser construction service, orfalseif it belongs to the client
-
getGlobalPragmas
Collection<Parser.Pragma> getGlobalPragmas()Returns the parsing pragmas that are in effect globally.- Returns:
- an unmodifiable collection of the parsing pragmas that are in effect globally
-
withCapturingCallerLocations
Returns a variant of this configuration with capturing of caller locations enabled.- Returns:
- a variant of this configuration with capturing of caller locations enabled
-
withCapturingCallerLocations
Returns a variant of this configuration with capturing of caller locations enabled or disabled.- Parameters:
capturingCallerLocations-truefor enabling,falsefor disabling capturing- Returns:
- a variant of this configuration with capturing of caller locations modified
-
withCreationWatcher
Returns a variant of this configuration with the given creation watcher callback.- Parameters:
creationWatcher- the new creation watcher callback, ornullto disable creation watching- Returns:
- a variant of this configuration with the given creation watcher callback
- See Also:
-
withModuleAwareServiceFilter
Returns a variant of this configuration with stack trace elements distinguished by module membership.- Returns:
- a variant of this configuration with stack trace elements distinguished by module membership
- See Also:
-
withGlobalPragmas
Returns a variant of this configuration with just the given global parsing pragmas. Global pragmas in effect for this configuration are not inherited by the result.- Parameters:
pragmas- the parsing pragmas that should be in effect globally- Returns:
- a variant of this configuration with the given global parsing pragmas
- Throws:
NullPointerException- ifpragmasis or contains null- See Also:
-
withAddedGlobalPragmas
Returns a variant of this configuration with also the given global parsing pragmas. Global pragmas in effect for this configuration are inherited by the result.- Parameters:
pragmas- the parsing pragmas that should be in effect globally, in addition to the ones for this configuration- Returns:
- a variant of this configuration with the given global parsing pragmas
- Throws:
NullPointerException- ifpragmasis or contains null- See Also:
-