|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value={TYPE,METHOD,PARAMETER}) public @interface Name
Optional method argument level annotation, sets the parameter name to use in the request. If not specified, defaults to the parameter config default value.
Can be set at method level to default all method argument values if not specified at argument level.
Can be set at interface level to default all method argument values if not specified at method level.
Additionally, this annotation (with other parameter-specific annotation) can be used for any user class used as a method argument of a rest-binded interface, eg :
@EndPoint("http://my-server")
interface FooInterface {
MyModel getModel(MyBean arg);
}
@Name("type-name")
class MyBean {
public String toString(){
return "hello-world"
}
}
For any call to FooInterface.getModel(long,MyBean), will fire a request to http://my-server?type-name="hello-world" (as by default param destination is URL).
ParamConfig.DEFAULT_NAME
,
ParamConfig.getName()
Required Element Summary | |
---|---|
String |
value
|
Element Detail |
---|
public abstract String value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |