Top Description Fields Constructors Methods
org.apache.catalina.startup

public Class WebAnnotationSet

extends Object
Class Inheritance
Imports
java.lang.reflect.Field, .Method, jakarta.annotation.Resource, .Resources, jakarta.annotation.security.DeclareRoles, .RunAs, jakarta.servlet.ServletSecurityElement, jakarta.servlet.annotation.ServletSecurity, org.apache.catalina.Container, .Context, .Wrapper, org.apache.catalina.core.ApplicationServletRegistration, org.apache.catalina.util.Introspection, org.apache.tomcat.util.descriptor.web.ContextEnvironment, .ContextResource, .ContextResourceEnvRef, .ContextService, .FilterDef, .MessageDestinationRef, org.apache.tomcat.util.res.StringManager

AnnotationSet for processing the annotations of the web application classes (/WEB-INF/classes and /WEB-INF/lib).

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
protected static final StringManager
sm

The string resources for this package.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static void
addResource(Context
The context which will have its annotations processed
context
,
Resource
The annotation that was found
annotation
)

Process a Resource annotation to set up a Resource.

protected static void
addResource(Context context, Resource annotation, String defaultName, Class<?> defaultType)

private static String
getName(Resource annotation, String defaultName)

private static String
getType(Resource annotation, Class<?> defaultType)

public static void
loadApplicationAnnotations(Context
The context which will have its annotations processed
context
)

Process the annotations on a context.

protected static void
loadApplicationFilterAnnotations(Context
The context which will have its annotations processed
context
)

Process the annotations for the filters.

protected static void
loadApplicationListenerAnnotations(Context
The context which will have its annotations processed
context
)

Process the annotations for the listeners.

protected static void
loadApplicationServletAnnotations(Context
The context which will have its annotations processed
context
)

Process the annotations for the servlets.

protected static void
loadClassAnnotation(Context
The context which will have its annotations processed
context
,
Class<?>
The class to examine for Servlet annotations
clazz
)

Process the annotations on a context for a given className.

protected static void
loadFieldsAnnotation(Context context, Class<?> clazz)

protected static void
loadMethodsAnnotation(Context context, Class<?> clazz)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MAPPED_NAME_PROPERTYback to summary
private static final String MAPPED_NAME_PROPERTY
SEPARATORback to summary
private static final String SEPARATOR
smback to summary
protected static final StringManager sm

The string resources for this package.

Constructor Detail

WebAnnotationSetback to summary
public WebAnnotationSet()

Method Detail

addResourceback to summary
protected static void addResource(Context context, Resource annotation)

Process a Resource annotation to set up a Resource. Ref JSR 250, equivalent to the resource-ref, message-destination-ref, env-ref, resource-env-ref or service-ref element in the deployment descriptor.

Parameters
context:Context

The context which will have its annotations processed

annotation:Resource

The annotation that was found

addResourceback to summary
protected static void addResource(Context context, Resource annotation, String defaultName, Class<?> defaultType)
getNameback to summary
private static String getName(Resource annotation, String defaultName)
getTypeback to summary
private static String getType(Resource annotation, Class<?> defaultType)
loadApplicationAnnotationsback to summary
public static void loadApplicationAnnotations(Context context)

Process the annotations on a context.

Parameters
context:Context

The context which will have its annotations processed

loadApplicationFilterAnnotationsback to summary
protected static void loadApplicationFilterAnnotations(Context context)

Process the annotations for the filters.

Parameters
context:Context

The context which will have its annotations processed

loadApplicationListenerAnnotationsback to summary
protected static void loadApplicationListenerAnnotations(Context context)

Process the annotations for the listeners.

Parameters
context:Context

The context which will have its annotations processed

loadApplicationServletAnnotationsback to summary
protected static void loadApplicationServletAnnotations(Context context)

Process the annotations for the servlets.

Parameters
context:Context

The context which will have its annotations processed

loadClassAnnotationback to summary
protected static void loadClassAnnotation(Context context, Class<?> clazz)

Process the annotations on a context for a given className.

Parameters
context:Context

The context which will have its annotations processed

clazz:Class<?>

The class to examine for Servlet annotations

loadFieldsAnnotationback to summary
protected static void loadFieldsAnnotation(Context context, Class<?> clazz)
loadMethodsAnnotationback to summary
protected static void loadMethodsAnnotation(Context context, Class<?> clazz)