Class ApiMethodImpl
java.lang.Object
org.apache.camel.support.component.ApiMethodImpl
- All Implemented Interfaces:
ApiMethod
Delegate class for
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 Summary
ConstructorsConstructorDescriptionApiMethodImpl(Class<?> proxyType, Class<?> resultType, String name, ApiMethodArg... args) -
Method Summary
-
Constructor Details
-
ApiMethodImpl
public ApiMethodImpl(Class<?> proxyType, Class<?> resultType, String name, ApiMethodArg... args) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
getName
Description copied from interface:ApiMethodReturns method name. -
getResultType
Description copied from interface:ApiMethodReturns method result type.- Specified by:
getResultTypein interfaceApiMethod- Returns:
- result type
-
getArgNames
Description copied from interface:ApiMethodReturns method argument names.- Specified by:
getArgNamesin interfaceApiMethod- Returns:
- argument names
-
getSetterArgNames
Description copied from interface:ApiMethodReturns setter argument names.- Specified by:
getSetterArgNamesin interfaceApiMethod- Returns:
- setter argument names
-
getArgTypes
Description copied from interface:ApiMethodReturn method argument types.- Specified by:
getArgTypesin interfaceApiMethod- Returns:
- argument types
-
getMethod
Description copied from interface:ApiMethodReturnsMethodin proxy type. -
toString
-