Class MethodParameter<T>
java.lang.Object
org.wicketstuff.rest.utils.reflection.MethodParameter<T>
- Type Parameters:
T
- the generic type
The class contains the informations of a method parameter, like its type or its index in the
array of method parameters.
- Author:
- andrea del bene
-
Constructor Summary
ConstructorDescriptionMethodParameter
(Class<? extends T> type, MethodMappingInfo ownerMethod, int paramIndex, Supplier<Locale> supplier) Instantiates a new method parameter. -
Method Summary
Modifier and TypeMethodDescriptionExtract parameter value from the current web request or other web entities (cookies, request header, etc...).Gets the annotation for the parameter.Gets the deault value for the parameter.Gets the owner method.Class<?>
Gets the type of the method parameter.int
Gets the index of the parameter in the array of method's parameters.Gets the valdator key.boolean
Checks if the parameter required.
-
Constructor Details
-
MethodParameter
public MethodParameter(Class<? extends T> type, MethodMappingInfo ownerMethod, int paramIndex, Supplier<Locale> supplier) Instantiates a new method parameter.- Parameters:
type
- the type of the parameter.ownerMethod
- the owner method for the parameter.paramIndex
- the index of the parameter in the array of method's parameters.
-
-
Method Details
-
extractParameterValue
Extract parameter value from the current web request or other web entities (cookies, request header, etc...).- Parameters:
context
- the context- Returns:
- the object
-
getParameterClass
Gets the type of the method parameter.- Returns:
- the parameter class
-
getOwnerMethod
Gets the owner method.- Returns:
- the owner method
-
getParamIndex
public int getParamIndex()Gets the index of the parameter in the array of method's parameters.- Returns:
- the parameter index
-
isRequired
public boolean isRequired()Checks if the parameter required.- Returns:
- true, if is required
-
getDeaultValue
Gets the deault value for the parameter.- Returns:
- the deault value
-
getValdatorKey
Gets the valdator key.- Returns:
- the valdator key
-
getAnnotationParam
Gets the annotation for the parameter.- Returns:
- the annotation for the parameter
-