|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.parameters.core.ParameterDecoratorImpl
public class ParameterDecoratorImpl
Generic implementation of a parameter sensible object.
| Field Summary | |
|---|---|
protected Map<String,Object> |
allParameters
Set of all parameters, valid or not. |
protected Map<String,IAccess> |
checked
Hold information of already checked attributes. |
protected Map<String,Object> |
parameters
Set of valid parameters. |
| Fields inherited from interface org.specrunner.parameters.IParameterDecorator |
|---|
INVERT_FLAG, LATE_FLAG, SILENT_FLAG |
| Constructor Summary | |
|---|---|
ParameterDecoratorImpl()
|
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,IAccess> checked
protected Map<String,Object> parameters
protected Map<String,Object> allParameters
| Constructor Detail |
|---|
public ParameterDecoratorImpl()
| Method Detail |
|---|
public Object getDecorated()
IParameterDecorator
getDecorated in interface IParameterDecoratorpublic void setDecorated(Object decorated)
IParameterDecorator
setDecorated in interface IParameterDecoratordecorated - The new decorated object.public boolean isEval(String name)
IParameterDecorator
isEval in interface IParameterDecoratorname - The feature name.
public boolean isSilent(String name)
IParameterDecorator
isSilent in interface IParameterDecoratorname - The feature name.
public boolean isLate(String name)
IParameterDecorator
isLate 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)
IParameterDecorator
clear in interface IParameterDecoratorname - The name.
public Object getParameter(String name)
IParameterDecorator
getParameter in interface IParameterDecoratorname - The parameter name.
public Object setParameter(String name,
Object value,
IContext context)
throws Exception
IParameterDecorator
setParameter in interface IParameterDecoratorname - The parameter name.value - The parameter value.context - The context where value is insert.
Exception - On evaluation error.
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)
IParameterDecorator
hasParameter in interface IParameterDecoratorname - The parameter.
public Map<String,Object> getParameters()
IParameterDecorator
getParameters in interface IParameterDecoratorpublic void setParameters(Map<String,Object> parameters)
IParameterDecorator
setParameters in interface IParameterDecoratorparameters - The map.public Map<String,Object> getAllParameters()
IParameterDecorator
getAllParameters in interface IParameterDecoratorpublic void setAllParameters(Map<String,Object> allParameters)
IParameterDecorator
setAllParameters in interface IParameterDecoratorallParameters - The map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||