|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.util.criteria.Parameter
A parameter is an immutable class that contains a description of an allowable parameter within a crieria instance.
Constructor Summary | |
Parameter(String key,
Class type)
Creation of a new required parameter constraint. |
|
Parameter(String key,
Class type,
Object value)
Creation of a new optional parameter constraint. |
Method Summary | |
Object |
getDefault()
Return the default value for this parameter. |
String |
getKey()
Return the key for the parameter. |
static String[] |
getKeys(Parameter[] params)
Return the set of keys corresponding to the supplied set of parameters. |
Class |
getParameterClass()
Return the classname for the parameter. |
boolean |
isOptional()
Return TRUE is the parameter is optional. |
boolean |
isRequired()
Return TRUE is the parameter is required. |
Object |
resolve(Object value)
Resolve a supplied argument to a value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Parameter(String key, Class type)
key
- the parameter keytype
- the name of a class constraining assigned valuespublic Parameter(String key, Class type, Object value)
key
- the parameter keytype
- the name of a class constraining assigned valuesvalue
- the default valueMethod Detail |
public static String[] getKeys(Parameter[] params)
params
- the parameter sequence
public String getKey()
public Class getParameterClass()
public boolean isRequired()
public boolean isOptional()
public Object getDefault()
public Object resolve(Object value) throws CriteriaException
value
- the supplied argument
Exception
- if an error occurs
CriteriaException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |