Class MethodParameter<T>

java.lang.Object
org.wicketstuff.rest.utils.reflection.MethodParameter<T>
Type Parameters:
T - the generic type

public class MethodParameter<T> extends Object
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 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

      public Object extractParameterValue(MethodParameterContext context)
      Extract parameter value from the current web request or other web entities (cookies, request header, etc...).
      Parameters:
      context - the context
      Returns:
      the object
    • getParameterClass

      public Class<?> getParameterClass()
      Gets the type of the method parameter.
      Returns:
      the parameter class
    • getOwnerMethod

      public MethodMappingInfo 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

      public String getDeaultValue()
      Gets the deault value for the parameter.
      Returns:
      the deault value
    • getValdatorKey

      public String getValdatorKey()
      Gets the valdator key.
      Returns:
      the valdator key
    • getAnnotationParam

      public Annotation getAnnotationParam()
      Gets the annotation for the parameter.
      Returns:
      the annotation for the parameter