public class ParameterDecoratorImpl extends Object implements IParameterDecorator
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
allParameters
Set of all parameters, valid or not.
|
protected Map<String,IAccess> |
checked
Hold information of already checked attributes.
|
protected Object |
decorated
The object to be parameterized.
|
protected Map<String,Object> |
parameters
Set of valid parameters.
|
INVERT_FLAG, LATE_FLAG, SILENT_FLAG| Constructor and Description |
|---|
ParameterDecoratorImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
clear(String name)
Get name cleared.
|
Map<String,Object> |
getAllParameters()
Map of parameters set.
|
Object |
getDecorated()
Gets the decorated object.
|
Object |
getParameter(String name)
Gets a parameter.
|
Map<String,Object> |
getParameters()
Map of parameters set.
|
protected boolean |
hasAnnotation(IAccess s,
Class<? extends Annotation> an)
Check if
@DontEval annotation is present in feature. |
boolean |
hasParameter(String name)
Check if a parameter name is valid.
|
protected boolean |
is(String name,
String flag,
Class<? extends Annotation> annotation)
Combine flag and annotation information.
|
boolean |
isEval(String name)
Check if a given name has to be evaluated.
|
boolean |
isLate(String name)
Check if a given name has to be evaluated at the end or not.
|
boolean |
isSilent(String name)
Check if a given name has to be evaluated silently or not.
|
protected Object |
prepareValue(Object value,
IContext context,
boolean eval,
boolean silent)
Prepare the value to set.
|
void |
setAllParameters(Map<String,Object> allParameters)
Set of all parameters map.
|
void |
setDecorated(Object decorated)
Sets the decorated object.
|
Object |
setParameter(String name,
Object value,
IContext context)
Set a parameter.
|
void |
setParameters(Map<String,Object> parameters)
Set parameters map.
|
protected Object decorated
public Object getDecorated()
IParameterDecoratorgetDecorated in interface IParameterDecoratorpublic void setDecorated(Object decorated)
IParameterDecoratorsetDecorated in interface IParameterDecoratordecorated - The new decorated object.public boolean isEval(String name)
IParameterDecoratorisEval in interface IParameterDecoratorname - The feature name.public boolean isSilent(String name)
IParameterDecoratorisSilent in interface IParameterDecoratorname - The feature name.public boolean isLate(String name)
IParameterDecoratorisLate in interface IParameterDecoratorname - The feature name.protected boolean is(String name, String flag, Class<? extends Annotation> annotation)
name - The feature name.flag - The flag name.annotation - The annotation.public String clear(String name)
IParameterDecoratorclear in interface IParameterDecoratorname - The name.public Object getParameter(String name)
IParameterDecoratorgetParameter in interface IParameterDecoratorname - The parameter name.public Object setParameter(String name, Object value, IContext context) throws Exception
IParameterDecoratorsetParameter in interface IParameterDecoratorname - The parameter name.value - The parameter value.context - The context where value is insert.Exception - On evaluation error.protected Object prepareValue(Object value, IContext context, boolean eval, boolean silent) throws PluginException
value - The value.context - The context.eval - True, to evalualte, false, otherwise.silent - True, to silent evaluation, false, otherwise.PluginException - On processing errors.protected boolean hasAnnotation(IAccess s, Class<? extends Annotation> an)
@DontEval annotation is present in feature.s - The feature access.an - Annotation type.public boolean hasParameter(String name)
IParameterDecoratorhasParameter in interface IParameterDecoratorname - The parameter.public Map<String,Object> getParameters()
IParameterDecoratorgetParameters in interface IParameterDecoratorpublic void setParameters(Map<String,Object> parameters)
IParameterDecoratorsetParameters in interface IParameterDecoratorparameters - The map.public Map<String,Object> getAllParameters()
IParameterDecoratorgetAllParameters in interface IParameterDecoratorpublic void setAllParameters(Map<String,Object> allParameters)
IParameterDecoratorsetAllParameters in interface IParameterDecoratorallParameters - The map.Copyright © 2016. All rights reserved.