Package jadex.extension.rs.publish
Class RestMethodInfo
- java.lang.Object
-
- jadex.extension.rs.publish.RestMethodInfo
-
public class RestMethodInfo extends java.lang.Object
Info struct for building a rest method.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
automapping
protected java.util.List<javax.ws.rs.core.MediaType>
consumed
The consumed media types.protected java.lang.Class<?>
dclazz
Delegation class.protected java.lang.String
dmname
The delegation (prototype) method.protected java.lang.Class<?>[]
exceptiontypes
The return type.protected java.lang.reflect.Method
method
The original method.protected MethodInfo
methodmapper
The original service method.protected java.lang.String
name
The 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>>>>
parameterannos
The parameter annotations.protected Value
parametermapper
The parameter mapper info.protected java.lang.Class<?>[]
parametertypes
The parameter types.protected java.lang.String
path
The method path.protected java.util.List<javax.ws.rs.core.MediaType>
produced
The produced media types.protected java.lang.Class<?>
resttype
The rest method type.protected Value
resultmapper
The result mapper info.protected java.lang.reflect.Type
returntype
The return type.protected java.lang.String
signature
The 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.String
buildSignature(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.String
getDelegateMethodName()
Get the dmname.java.lang.Class<?>[]
getExceptionTypes()
Get the exception types.MethodInfo
getMethodMapper()
Get the methodmapper.java.lang.String
getName()
Get the name.Value
getParameterMapper()
Get the parametermapper.java.lang.Class<?>[]
getParameterTypes()
Get the parameter types.java.lang.String
getPath()
Get the path.java.util.List<javax.ws.rs.core.MediaType>
getProduced()
Get the produced.java.lang.Class<?>
getRestType()
Get the resttype.Value
getResultMapper()
Get the resultmapper.java.lang.reflect.Type
getReturnType()
Get the return type.java.lang.String
getSignature()
Get the method signature.boolean
isAutomapping()
Get the automapping.void
setAutomapping(boolean automapping)
Set the automapping.void
setConsumed(java.util.List<javax.ws.rs.core.MediaType> consumed)
Set the consumed.void
setDelegateClazz(java.lang.Class<?> dclazz)
Set the dclazz.void
setDelegateMethodName(java.lang.String dmname)
Set the dmname.void
setExceptionTypes(java.lang.Class<?>[] exceptiontypes)
Set the exceptiontypes.void
setMethod(java.lang.reflect.Method method)
Set the method.void
setMethodMapper(MethodInfo methodmapper)
Set the methodmapper.void
setName(java.lang.String name)
Set the name.void
setParameterMapper(Value parametermapper)
Set the parametermapper.void
setParameterTypes(java.lang.Class<?>[] parametertypes)
Set the parametertypes.void
setPath(java.lang.String path)
Set the path.void
setProduced(java.util.List<javax.ws.rs.core.MediaType> produced)
Set the produced.void
setRestType(java.lang.Class<?> resttype)
Set the resttype.void
setResultMapper(Value resultmapper)
Set the resultmapper.void
setReturnType(java.lang.reflect.Type returntype)
Set the returntype.void
setSignature(java.lang.String signature)
Set the signature.java.lang.String
toString()
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:
toString
in classjava.lang.Object
-
-