public class HierarchicalParametersCallback extends java.lang.Object implements ParametersCallback
ParametersCallback
interface.
This class decorates behaviour of a primary callback by obtaining absent parameter values from the parent callback.
Note: This class is mutable and not thread-safe.
Constructor and Description |
---|
HierarchicalParametersCallback(ParametersCallback callback,
ParametersCallback parentCallback)
Creates a hierarchical parameters callback instance.
|
Modifier and Type | Method and Description |
---|---|
ParametersCallback |
getCallback()
Returns primary callback.
|
java.lang.Object |
getParameter(java.lang.String name)
This method obtains the value of a specified parameter from the primary callback
.
|
ParametersCallback |
getParentCallback()
Returns secondary callback.
|
void |
setCallback(ParametersCallback callback)
Sets primary callback.
|
void |
setParentCallback(ParametersCallback parentCallback)
Sets secondary callback.
|
public HierarchicalParametersCallback(ParametersCallback callback, ParametersCallback parentCallback)
callback
- primary callback.parentCallback
- secondary (parent) callback. If null - only primary callback is used.public ParametersCallback getCallback()
public void setCallback(ParametersCallback callback)
callback
- primary callback. Cannot be null.public ParametersCallback getParentCallback()
public void setParentCallback(ParametersCallback parentCallback)
parentCallback
- secondary callback. May be null, in this case only primary callback is used.public java.lang.Object getParameter(java.lang.String name)
getParameter
in interface ParametersCallback
name
- parameter name.Copyright © Copyright 2006-2019 The Scriptella Project Team.