Package org.kohsuke.stapler
Class AnnotationHandler<T extends Annotation>
java.lang.Object
org.kohsuke.stapler.AnnotationHandler<T>
- Direct Known Subclasses:
AncestorInPath.HandlerImpl
,Header.HandlerImpl
,JsonBody.Handler
,QueryParameter.HandlerImpl
,SubmittedForm.Handler
Handles stapler parameter annotations by determining what values to inject for a method call.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final Object
Helper method forparse(StaplerRequest2, Annotation, Class, String)
to convert to the right type from String.parse
(StaplerRequest2 request, T a, Class type, String parameterName) parse
(StaplerRequest request, T a, Class type, String parameterName) Deprecated.
-
Constructor Details
-
AnnotationHandler
public AnnotationHandler()
-
-
Method Details
-
parse
public Object parse(StaplerRequest2 request, T a, Class type, String parameterName) throws jakarta.servlet.ServletException - Parameters:
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 nulltype
- The type of the parameter. Any value returned from this method must be assignable to this type. Never null.parameterName
- Name of the parameter.- Throws:
jakarta.servlet.ServletException
-
parse
@Deprecated public Object parse(StaplerRequest request, T a, Class type, String parameterName) throws javax.servlet.ServletException Deprecated.- Throws:
javax.servlet.ServletException
-
convert
Helper method forparse(StaplerRequest2, Annotation, Class, String)
to convert to the right type from String.
-
parse(StaplerRequest2, Annotation, Class, String)