Top Description Fields Constructors Methods
com.sun.faces.application.annotation

pack-priv Class ResourceHandler

extends JndiHandler
Class Inheritance
Imports
java.lang.reflect.Field, .Method, jakarta.annotation.Resource, jakarta.faces.context.FacesContext

RuntimeAnnotationHandler responsible for processing Resource annotations.

Field Summary

Modifier and TypeField and Description
private final Resource[]
private final Field[]
private final Resource[]
private final Method[]
Inherited from com.sun.faces.application.annotation.JndiHandler:
JAVA_COMP_ENV

Constructor Summary

AccessConstructor and Description
public
ResourceHandler(Field[] fields, Resource[] fieldAnnotations, Method[] methods, Resource[] methodAnnotations)

Method Summary

Modifier and TypeMethod and Description
public void
apply(FacesContext
the jakarta.faces.context.FacesContext for the current request
ctx
,
Object...
one or more arguments to the handler instance. The type and number may vary.
params
)

Implements com.sun.faces.application.annotation.RuntimeAnnotationHandler.apply.

Apply the java.lang.annotation.Annotation(s).

private void
applyToField(FacesContext facesContext, Field field, Resource resource, Object instance)

private void
applyToMethod(FacesContext facesContext, Method method, Resource resource, Object instance)

Inherited from com.sun.faces.application.annotation.JndiHandler:
invokeMethodlookupsetField

Field Detail

fieldAnnotationsback to summary
private final Resource[] fieldAnnotations
fieldsback to summary
private final Field[] fields
methodAnnotationsback to summary
private final Resource[] methodAnnotations
methodsback to summary
private final Method[] methods

Constructor Detail

ResourceHandlerback to summary
public ResourceHandler(Field[] fields, Resource[] fieldAnnotations, Method[] methods, Resource[] methodAnnotations)

Method Detail

applyback to summary
public void apply(FacesContext ctx, Object... params)

Implements com.sun.faces.application.annotation.RuntimeAnnotationHandler.apply.

Doc from com.sun.faces.application.annotation.RuntimeAnnotationHandler.apply.

Apply the java.lang.annotation.Annotation(s). The act of doing so should affect the Faces runtime in some fashion (see the spec for the specific annotation types).

Note

when adding new types of components that can be annotated, the fact that we expose varargs here should be hidden. Type-safe methods should be added to AnnotationManager to clarify the contract.

Parameters
ctx:FacesContext

the jakarta.faces.context.FacesContext for the current request

params:Object[]

one or more arguments to the handler instance. The type and number may vary.

Annotations
@SuppressWarnings:UnusedDeclaration
@Override
applyToFieldback to summary
private void applyToField(FacesContext facesContext, Field field, Resource resource, Object instance)
applyToMethodback to summary
private void applyToMethod(FacesContext facesContext, Method method, Resource resource, Object instance)