Class AnnotationHandler<T extends Annotation>

Direct Known Subclasses:
AncestorInPath.HandlerImpl, Header.HandlerImpl, JsonBody.Handler, QueryParameter.HandlerImpl, SubmittedForm.Handler

public abstract class AnnotationHandler<T extends Annotation> extends Object
Handles stapler parameter annotations by determining what values to inject for a method call.
Kohsuke Kawaguchi
See Also:
  • Constructor Details

    • AnnotationHandler

      public AnnotationHandler()
  • Method Details

    • parse

      public abstract Object parse(StaplerRequest request, T a, Class type, String parameterName) throws javax.servlet.ServletException
      request - Current request being processed. Normally the parameter injection grabs some value from here and returns it. Never null.
      a - The annotation object attached on the parameter for which this handler is configured. Never null
      type - The type of the parameter. Any value returned from this method must be assignable to this type. Never null.
      parameterName - Name of the parameter.
    • convert

      protected final Object convert(Class targetType, String value)
      Helper method for parse(StaplerRequest, Annotation, Class, String) to convert to the right type from String.