public final class ApiMethodImpl extends Object implements ApiMethod
ApiMethod
.
This class is instantiated by Enumerations for Api Proxy types.
For example:
public enum HelloWorldMethod implements ApiMethod {
SAYHI(String.class, "sayHi", ApiMethodArg.from(String.class, "name");
private ApiMethodImpl apiMethod;
private HelloWorldMethods(Class<?> resultType, String name, ApiMethodArg... args) throws IllegalArgumentException {
this.apiMethod = new ApiMethod(HelloWorld.class, resultType, name, args);
}
// implement ApiMethod interface
String getName() { return apiMethod.getName(); }
Class<?> getResultType() {return apiMethod.getResultType(); }
List<String> getArgNames() { return apiMethod.getArgNames(); }
List<Class<?>> getArgTypes() {return apiMethod.getArgTypes(); }
Method getMethod() { return apiMethod.getMethod(); }
}
Constructor and Description |
---|
ApiMethodImpl(Class<?> proxyType,
Class<?> resultType,
String name,
ApiMethodArg... args) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getArgNames()
Returns method argument names.
|
List<Class<?>> |
getArgTypes()
Return method argument types.
|
Method |
getMethod()
Returns
Method in proxy type. |
String |
getName()
Returns method name.
|
Class<?> |
getResultType()
Returns method result type.
|
String |
toString() |
public ApiMethodImpl(Class<?> proxyType, Class<?> resultType, String name, ApiMethodArg... args) throws IllegalArgumentException
IllegalArgumentException
public Class<?> getResultType()
ApiMethod
getResultType
in interface ApiMethod
public List<String> getArgNames()
ApiMethod
getArgNames
in interface ApiMethod
public List<Class<?>> getArgTypes()
ApiMethod
getArgTypes
in interface ApiMethod
public Method getMethod()
ApiMethod
Method
in proxy type.Apache Camel