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

pack-priv Class ResourceDependencyHandler

extends Object
implements RuntimeAnnotationHandler
Class Inheritance
All Implemented Interfaces
com.sun.faces.application.annotation.RuntimeAnnotationHandler
Imports
java.util.Map, .HashMap, .Set, .HashSet, javax.el.ValueExpression, javax.faces.application.ResourceDependency, .Application, javax.faces.component.UIComponent, javax.faces.context.FacesContext, com.sun.faces.el.ELUtils, com.sun.faces.util.RequestStateManager

RuntimeAnnotationHandler responsible for processing ResourceDependency annotations.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ResourceDependencyHandler.Expressions

This helper class hides expression evaluation complexity.

Field Summary

Modifier and TypeField and Description
private ResourceDependency[]
private Map<ResourceDependency, ResourceDependencyHandler.Expressions>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
apply(FacesContext
the javax.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 UIComponent

Returns:

a new component resource based of the provided annotation
createComponentResource
(FacesContext
the FacesContext for the current request
ctx
,
ResourceDependency
the ResourceDependency that the component resource will be constructed from
dep
)

Construct a new component resource based off the provided ValueExpressions.

private boolean

Returns:

true if the ResourceDependency has been processed, otherwise false
hasBeenProcessed
(FacesContext
the FacesContext for the current request
ctx
,
ResourceDependency
the ResourceDependency in question
dep
)

Determines of the specified ResourceDependency has already been previously processed.

private void
markProcssed(FacesContext
the FacesContext for the current request
ctx
,
ResourceDependency dep)

Indicates that the specified ResourceDependency has been processed.

private void
pushResourceToRoot(FacesContext
the FacesContext for the current request
ctx
,
UIComponent
the component resource
c
)

Adds the specified UIComponent as a component resource to the javax.faces.component.UIViewRoot

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dependenciesback to summary
private ResourceDependency[] dependencies
expressionsMapback to summary
private Map<ResourceDependency, ResourceDependencyHandler.Expressions> expressionsMap

Constructor Detail

ResourceDependencyHandlerback to summary
public ResourceDependencyHandler(ResourceDependency[] dependencies)

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 JSF 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 javax.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
createComponentResourceback to summary
private UIComponent createComponentResource(FacesContext ctx, ResourceDependency dep)

Construct a new component resource based off the provided ValueExpressions.

Parameters
ctx:FacesContext

the FacesContext for the current request

dep:ResourceDependency

the ResourceDependency that the component resource will be constructed from

Returns:UIComponent

a new component resource based of the provided annotation

hasBeenProcessedback to summary
private boolean hasBeenProcessed(FacesContext ctx, ResourceDependency dep)

Determines of the specified ResourceDependency has already been previously processed.

Parameters
ctx:FacesContext

the FacesContext for the current request

dep:ResourceDependency

the ResourceDependency in question

Returns:boolean

true if the ResourceDependency has been processed, otherwise false

Annotations
@SuppressWarnings:unchecked
markProcssedback to summary
private void markProcssed(FacesContext ctx, ResourceDependency dep)

Indicates that the specified ResourceDependency has been processed.

Parameters
ctx:FacesContext

the FacesContext for the current request

dep:ResourceDependency

the ResourceDependency

Annotations
@SuppressWarnings:unchecked
pushResourceToRootback to summary
private void pushResourceToRoot(FacesContext ctx, UIComponent c)

Adds the specified UIComponent as a component resource to the javax.faces.component.UIViewRoot

Parameters
ctx:FacesContext

the FacesContext for the current request

c:UIComponent

the component resource

com.sun.faces.application.annotation back to summary

private final Class ResourceDependencyHandler.Expressions

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.faces.application.annotation.ResourceDependencyHandler.Expressions

This helper class hides expression evaluation complexity.

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv ValueExpression
pack-priv String
pack-priv ValueExpression
pack-priv String
pack-priv ValueExpression

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv String
pack-priv String
pack-priv String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

libraryback to summary
pack-priv String library
libraryExpressionback to summary
pack-priv ValueExpression libraryExpression
nameback to summary
pack-priv String name
nameExpressionback to summary
pack-priv ValueExpression nameExpression
targetback to summary
pack-priv String target
targetExpressionback to summary
pack-priv ValueExpression targetExpression

Constructor Detail

Expressionsback to summary
private Expressions()

Method Detail

getLibraryback to summary
pack-priv String getLibrary(FacesContext ctx)
getNameback to summary
pack-priv String getName(FacesContext ctx)
getTargetback to summary
pack-priv String getTarget(FacesContext ctx)