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

public Class NamedEventConfigHandler

extends Object
implements ConfigAnnotationHandler
Class Inheritance
All Implemented Interfaces
com.sun.faces.application.annotation.ConfigAnnotationHandler
Imports
com.sun.faces.application.ApplicationAssociate, .NamedEventManager, java.lang.annotation.Annotation, java.util.ArrayList, .Collection, .Collections, .HashMap, .Map, javax.faces.context.FacesContext, javax.faces.event.NamedEvent, .SystemEvent

This class handles the processing the NamedEvent annotation. For each class with this annotation, the following logic is applied:
  1. Get the unqualified class name (e.g., UserLoginEvent)
  2. Strip off the trailing "Event", if present (e.g., UserLogin)
  3. Convert the first character to lower-case (e.g., userLogin)
  4. Prepend the package name to the lower-cased name
  5. If the shortName attribute is specified, register the event by that name as well.

Field Summary

Modifier and TypeField and Description
private static final Collection<Class<? extends Annotation>>
private Map<Class<?>, Annotation>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
collect(Class<?>
annotated class
target
,
Annotation
Annotation to process
annotation
)

Implements com.sun.faces.application.annotation.ConfigAnnotationHandler.collect.

Collect metadata based on the provided Class and Annotation to be processed later by push(javax.faces.context.FacesContext).

public Collection<Class<? extends Annotation>>
private void
process(NamedEventManager nem, Class<?> annotatedClass, Annotation annotation)

public void
push(FacesContext ctx)

Implements com.sun.faces.application.annotation.ConfigAnnotationHandler.push.

Push the configuration based on the collected metadata to the current application.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HANDLESback to summary
private static final Collection<Class<? extends Annotation>> HANDLES
namedEventsback to summary
private Map<Class<?>, Annotation> namedEvents

Constructor Detail

NamedEventConfigHandlerback to summary
public NamedEventConfigHandler()

Method Detail

collectback to summary
public void collect(Class<?> target, Annotation annotation)

Implements com.sun.faces.application.annotation.ConfigAnnotationHandler.collect.

Doc from com.sun.faces.application.annotation.ConfigAnnotationHandler.collect.

Collect metadata based on the provided Class and Annotation to be processed later by push(javax.faces.context.FacesContext).

Note

This method may be called more than once.

Parameters
target:Class<?>

annotated class

annotation:Annotation

Annotation to process

Annotations
@Override
getHandledAnnotationsback to summary
public Collection<Class<? extends Annotation>> getHandledAnnotations()

Implements com.sun.faces.application.annotation.ConfigAnnotationHandler.getHandledAnnotations.

Returns:Collection<Class<? extends Annotation>>

Doc from com.sun.faces.application.annotation.ConfigAnnotationHandler.getHandledAnnotations.

a Collection of annotations handled by this ConfigAnnotationHandler implementation

Annotations
@Override
processback to summary
private void process(NamedEventManager nem, Class<?> annotatedClass, Annotation annotation)
pushback to summary
public void push(FacesContext ctx)

Implements com.sun.faces.application.annotation.ConfigAnnotationHandler.push.

Doc from com.sun.faces.application.annotation.ConfigAnnotationHandler.push.

Push the configuration based on the collected metadata to the current application.

Annotations
@Override