public class DefaultRestMethodGenerator extends Object implements IRestMethodGenerator
Constructor and Description |
---|
DefaultRestMethodGenerator() |
Modifier and Type | Method and Description |
---|---|
List<RestMethodInfo> |
generateRestMethodInfos(IService service,
ClassLoader classloader,
Class<?> baseclass,
Map<String,Object> mapprops)
Generate the rest method infos.
|
static Class<?> |
getDeclaredRestType(Method method)
Get the declared rest type.
|
Class<?> |
guessRestType(Method method)
Guess the http type (GET, POST, PUT, DELETE, ...) of a method.
|
boolean |
hasStringConvertableParameters(Method method,
Class<?> rettype,
Class<?>[] paramtypes)
Test if a method has parameters that are all convertible from string.
|
static boolean |
isStringConvertableType(Class<?> type)
Test if a class is convertible from string.
|
public List<RestMethodInfo> generateRestMethodInfos(IService service, ClassLoader classloader, Class<?> baseclass, Map<String,Object> mapprops) throws Exception
generateRestMethodInfos
in interface IRestMethodGenerator
service
- The Jadex service.classloader
- The classloader.baseclass
- The (abstract or concrete) baseclass or interface.mapprops
- Additional mapping properties.Exception
public Class<?> guessRestType(Method method)
method
- The method.public boolean hasStringConvertableParameters(Method method, Class<?> rettype, Class<?>[] paramtypes)
method
- The method.rettype
- The return types (possibly unwrapped from future type).paramtypes
- The parameter types.public static boolean isStringConvertableType(Class<?> type)
Copyright © 2012. All Rights Reserved.