Package jadex.extension.rs.publish
Class RestMethodInfo
- java.lang.Object
-
- jadex.extension.rs.publish.RestMethodInfo
-
public class RestMethodInfo extends java.lang.ObjectInfo struct for building a rest method.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautomappingprotected java.util.List<javax.ws.rs.core.MediaType>consumedThe consumed media types.protected java.lang.Class<?>dclazzDelegation class.protected java.lang.StringdmnameThe delegation (prototype) method.protected java.lang.Class<?>[]exceptiontypesThe return type.protected java.lang.reflect.MethodmethodThe original method.protected MethodInfomethodmapperThe original service method.protected java.lang.StringnameThe method name that represents the path.protected java.util.List<java.util.List<Tuple2<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>>>parameterannosThe parameter annotations.protected ValueparametermapperThe parameter mapper info.protected java.lang.Class<?>[]parametertypesThe parameter types.protected java.lang.StringpathThe method path.protected java.util.List<javax.ws.rs.core.MediaType>producedThe produced media types.protected java.lang.Class<?>resttypeThe rest method type.protected ValueresultmapperThe result mapper info.protected java.lang.reflect.TypereturntypeThe return type.protected java.lang.StringsignatureThe signature.
-
Constructor Summary
Constructors Constructor Description RestMethodInfo(java.lang.Class<?>[] parametertypes, java.lang.reflect.Type returntype, java.lang.Class<?>[] exceptiontypes, java.lang.String name, java.lang.String path, java.lang.Class<?> resttype, java.util.List<javax.ws.rs.core.MediaType> consumed, java.util.List<javax.ws.rs.core.MediaType> produced, MethodInfo methodmapper, Value parametermapper, boolean automapping, Value resultmapper, java.lang.Class<?> dclazz, java.lang.String dmname)Create a new rest method info.RestMethodInfo(java.lang.reflect.Method method, java.lang.String name, java.lang.String path, java.lang.Class<?> resttype, java.util.List<javax.ws.rs.core.MediaType> consumed, java.util.List<javax.ws.rs.core.MediaType> produced, MethodInfo methodmapper, Value parametermapper, boolean automapping, Value resultmapper, java.lang.Class<?> dclazz, java.lang.String dmname)Create a new rest method info.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringbuildSignature(java.lang.String name, java.lang.Class<?>[] paramtypes)Get the signature.java.util.List<java.util.List<Tuple2<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>>>getAnnotationInfo()Get the annotations of a method as list of list of tuples.java.util.List<javax.ws.rs.core.MediaType>getConsumed()Get the consumed.java.lang.Class<?>getDelegateClazz()Get the dclazz.java.lang.StringgetDelegateMethodName()Get the dmname.java.lang.Class<?>[]getExceptionTypes()Get the exception types.MethodInfogetMethodMapper()Get the methodmapper.java.lang.StringgetName()Get the name.ValuegetParameterMapper()Get the parametermapper.java.lang.Class<?>[]getParameterTypes()Get the parameter types.java.lang.StringgetPath()Get the path.java.util.List<javax.ws.rs.core.MediaType>getProduced()Get the produced.java.lang.Class<?>getRestType()Get the resttype.ValuegetResultMapper()Get the resultmapper.java.lang.reflect.TypegetReturnType()Get the return type.java.lang.StringgetSignature()Get the method signature.booleanisAutomapping()Get the automapping.voidsetAutomapping(boolean automapping)Set the automapping.voidsetConsumed(java.util.List<javax.ws.rs.core.MediaType> consumed)Set the consumed.voidsetDelegateClazz(java.lang.Class<?> dclazz)Set the dclazz.voidsetDelegateMethodName(java.lang.String dmname)Set the dmname.voidsetExceptionTypes(java.lang.Class<?>[] exceptiontypes)Set the exceptiontypes.voidsetMethod(java.lang.reflect.Method method)Set the method.voidsetMethodMapper(MethodInfo methodmapper)Set the methodmapper.voidsetName(java.lang.String name)Set the name.voidsetParameterMapper(Value parametermapper)Set the parametermapper.voidsetParameterTypes(java.lang.Class<?>[] parametertypes)Set the parametertypes.voidsetPath(java.lang.String path)Set the path.voidsetProduced(java.util.List<javax.ws.rs.core.MediaType> produced)Set the produced.voidsetRestType(java.lang.Class<?> resttype)Set the resttype.voidsetResultMapper(Value resultmapper)Set the resultmapper.voidsetReturnType(java.lang.reflect.Type returntype)Set the returntype.voidsetSignature(java.lang.String signature)Set the signature.java.lang.StringtoString()Get the string representation.
-
-
-
Field Detail
-
method
protected java.lang.reflect.Method method
The original method.
-
signature
protected java.lang.String signature
The signature.
-
parametertypes
protected java.lang.Class<?>[] parametertypes
The parameter types.
-
returntype
protected java.lang.reflect.Type returntype
The return type.
-
exceptiontypes
protected java.lang.Class<?>[] exceptiontypes
The return type.
-
name
protected java.lang.String name
The method name that represents the path.
-
path
protected java.lang.String path
The method path.
-
resttype
protected java.lang.Class<?> resttype
The rest method type.
-
consumed
protected java.util.List<javax.ws.rs.core.MediaType> consumed
The consumed media types.
-
produced
protected java.util.List<javax.ws.rs.core.MediaType> produced
The produced media types.
-
methodmapper
protected MethodInfo methodmapper
The original service method.
-
parametermapper
protected Value parametermapper
The parameter mapper info.
-
automapping
protected boolean automapping
-
resultmapper
protected Value resultmapper
The result mapper info.
-
dclazz
protected java.lang.Class<?> dclazz
Delegation class.
-
dmname
protected java.lang.String dmname
The delegation (prototype) method.
-
parameterannos
protected java.util.List<java.util.List<Tuple2<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>>> parameterannos
The parameter annotations.
-
-
Constructor Detail
-
RestMethodInfo
public RestMethodInfo(java.lang.reflect.Method method, java.lang.String name, java.lang.String path, java.lang.Class<?> resttype, java.util.List<javax.ws.rs.core.MediaType> consumed, java.util.List<javax.ws.rs.core.MediaType> produced, MethodInfo methodmapper, Value parametermapper, boolean automapping, Value resultmapper, java.lang.Class<?> dclazz, java.lang.String dmname)Create a new rest method info.
-
RestMethodInfo
public RestMethodInfo(java.lang.Class<?>[] parametertypes, java.lang.reflect.Type returntype, java.lang.Class<?>[] exceptiontypes, java.lang.String name, java.lang.String path, java.lang.Class<?> resttype, java.util.List<javax.ws.rs.core.MediaType> consumed, java.util.List<javax.ws.rs.core.MediaType> produced, MethodInfo methodmapper, Value parametermapper, boolean automapping, Value resultmapper, java.lang.Class<?> dclazz, java.lang.String dmname)Create a new rest method info.
-
-
Method Detail
-
setMethod
public void setMethod(java.lang.reflect.Method method)
Set the method.- Parameters:
method- The method to set.
-
getName
public java.lang.String getName()
Get the name.- Returns:
- the name.
-
setName
public void setName(java.lang.String name)
Set the name.- Parameters:
name- The name to set.
-
getParameterTypes
public java.lang.Class<?>[] getParameterTypes()
Get the parameter types.
-
setParameterTypes
public void setParameterTypes(java.lang.Class<?>[] parametertypes)
Set the parametertypes.- Parameters:
parametertypes- The parametertypes to set.
-
getReturnType
public java.lang.reflect.Type getReturnType()
Get the return type.
-
setReturnType
public void setReturnType(java.lang.reflect.Type returntype)
Set the returntype.- Parameters:
returntype- The returntype to set.
-
getExceptionTypes
public java.lang.Class<?>[] getExceptionTypes()
Get the exception types.
-
setExceptionTypes
public void setExceptionTypes(java.lang.Class<?>[] exceptiontypes)
Set the exceptiontypes.- Parameters:
exceptiontypes- The exceptiontypes to set.
-
getPath
public java.lang.String getPath()
Get the path.- Returns:
- the path.
-
setPath
public void setPath(java.lang.String path)
Set the path.- Parameters:
path- The path to set.
-
getRestType
public java.lang.Class<?> getRestType()
Get the resttype.- Returns:
- the resttype.
-
setRestType
public void setRestType(java.lang.Class<?> resttype)
Set the resttype.- Parameters:
resttype- The resttype to set.
-
getConsumed
public java.util.List<javax.ws.rs.core.MediaType> getConsumed()
Get the consumed.- Returns:
- the consumed.
-
setConsumed
public void setConsumed(java.util.List<javax.ws.rs.core.MediaType> consumed)
Set the consumed.- Parameters:
consumed- The consumed to set.
-
getProduced
public java.util.List<javax.ws.rs.core.MediaType> getProduced()
Get the produced.- Returns:
- the produced.
-
setProduced
public void setProduced(java.util.List<javax.ws.rs.core.MediaType> produced)
Set the produced.- Parameters:
produced- The produced to set.
-
getMethodMapper
public MethodInfo getMethodMapper()
Get the methodmapper.- Returns:
- the methodmapper.
-
setMethodMapper
public void setMethodMapper(MethodInfo methodmapper)
Set the methodmapper.- Parameters:
methodmapper- The methodmapper to set.
-
getParameterMapper
public Value getParameterMapper()
Get the parametermapper.- Returns:
- the parametermapper.
-
setParameterMapper
public void setParameterMapper(Value parametermapper)
Set the parametermapper.- Parameters:
parametermapper- The parametermapper to set.
-
getResultMapper
public Value getResultMapper()
Get the resultmapper.- Returns:
- the resultmapper.
-
setResultMapper
public void setResultMapper(Value resultmapper)
Set the resultmapper.- Parameters:
resultmapper- The resultmapper to set.
-
getDelegateClazz
public java.lang.Class<?> getDelegateClazz()
Get the dclazz.- Returns:
- the dclazz.
-
setDelegateClazz
public void setDelegateClazz(java.lang.Class<?> dclazz)
Set the dclazz.- Parameters:
dclazz- The dclazz to set.
-
getDelegateMethodName
public java.lang.String getDelegateMethodName()
Get the dmname.- Returns:
- the dmname.
-
setDelegateMethodName
public void setDelegateMethodName(java.lang.String dmname)
Set the dmname.- Parameters:
dmname- The dmname to set.
-
getSignature
public java.lang.String getSignature()
Get the method signature.
-
setSignature
public void setSignature(java.lang.String signature)
Set the signature.- Parameters:
signature- The signature to set.
-
isAutomapping
public boolean isAutomapping()
Get the automapping.- Returns:
- The automapping.
-
setAutomapping
public void setAutomapping(boolean automapping)
Set the automapping.- Parameters:
automapping- The automapping to set.
-
buildSignature
public static java.lang.String buildSignature(java.lang.String name, java.lang.Class<?>[] paramtypes)Get the signature.- Parameters:
name-paramtypes-- Returns:
-
getAnnotationInfo
public java.util.List<java.util.List<Tuple2<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>>> getAnnotationInfo()
Get the annotations of a method as list of list of tuples. A tuple saves the class name and the parameter values as hashmap.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Object
-
-