Class DefaultParametersManager.DefaultHandlerData
java.lang.Object
org.apache.commons.configuration2.builder.DefaultParametersManager.DefaultHandlerData
- Enclosing class:
- DefaultParametersManager
A data class storing information about
DefaultParametersHandler
objects added to a Parameters
object.
Using this class it is possible to find out which default handlers apply for a given parameters object and to invoke
them.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DefaultParametersHandler<?>
The handler object.private final Class<?>
The class supported by this handler.private final Class<?>
The start class for applying this handler. -
Constructor Summary
ConstructorsConstructorDescriptionDefaultHandlerData
(DefaultParametersHandler<?> h, Class<?> cls, Class<?> startCls) Creates a new instance ofDefaultHandlerData
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks whether the managedDefaultParametersHandler
can be applied to the given parameters object.boolean
isOccurrence
(DefaultParametersHandler<?> h, Class<?> startCls) Tests whether this instance refers to the specified occurrence of aDefaultParametersHandler
.
-
Field Details
-
handler
The handler object. -
parameterClass
The class supported by this handler. -
startClass
The start class for applying this handler.
-
-
Constructor Details
-
DefaultHandlerData
Creates a new instance ofDefaultHandlerData
.- Parameters:
h
- theDefaultParametersHandler
cls
- the handler's data classstartCls
- the start class
-
-
Method Details
-
applyHandlerIfMatching
Checks whether the managedDefaultParametersHandler
can be applied to the given parameters object. If this is the case, it is executed on this object and can initialize it with default values.- Parameters:
obj
- the parameters object to be initialized
-
isOccurrence
Tests whether this instance refers to the specified occurrence of aDefaultParametersHandler
.- Parameters:
h
- the handler to be checkedstartCls
- the start class- Returns:
- true if this instance refers to this occurrence, false otherwise
-