com.sun.faces.vendor
public class WebContainerInjectionProvider extends java.lang.Object implements InjectionProvider
This InjectionProvider
will be used if the
PostConstruct
and PreDestroy
annotations
are present, but no specific InjectionProvider
has
been configured.
It's important to note that this will not provide resource injection.
Modifier and Type | Class and Description |
---|---|
private static class |
WebContainerInjectionProvider.MethodHolder |
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER |
private static java.util.concurrent.ConcurrentHashMap<java.lang.Class,java.util.concurrent.ConcurrentHashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,WebContainerInjectionProvider.MethodHolder>> |
methodsPerClazz |
Constructor and Description |
---|
WebContainerInjectionProvider() |
Modifier and Type | Method and Description |
---|---|
private static java.lang.reflect.Method |
getAnnotatedMethod(java.lang.Object managedBean,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
private static java.lang.reflect.Method |
getAnnotatedMethodForMethodArr(java.lang.reflect.Method[] methods,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
void |
inject(java.lang.Object managedBean)
The implementation of this method must perform the following
steps:
Inject the supported resources per the Servlet 2.5
specification into the provided object
|
private static void |
invokeAnnotatedMethod(java.lang.reflect.Method method,
java.lang.Object managedBean) |
void |
invokePostConstruct(java.lang.Object managedBean)
The implemenation of this method must invoke any
method marked with the
@PostConstruct annotation
(per the Common Annotations Specification). |
void |
invokePreDestroy(java.lang.Object managedBean)
The implemenation of this method must invoke any
method marked with the
@PreDestroy annotation
(per the Common Annotations Specification). |
private static final java.util.logging.Logger LOGGER
private static java.util.concurrent.ConcurrentHashMap<java.lang.Class,java.util.concurrent.ConcurrentHashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,WebContainerInjectionProvider.MethodHolder>> methodsPerClazz
public void inject(java.lang.Object managedBean) throws InjectionProviderException
InjectionProvider
The implementation of this method must perform the following steps:
This method must not invoke any methods
annotated with @PostConstruct
inject
in interface InjectionProvider
managedBean
- the target managed beanInjectionProviderException
- if an error occurs during
resource injectionpublic void invokePreDestroy(java.lang.Object managedBean) throws InjectionProviderException
InjectionProvider
The implemenation of this method must invoke any
method marked with the @PreDestroy
annotation
(per the Common Annotations Specification).
invokePreDestroy
in interface InjectionProvider
managedBean
- the target managed beanInjectionProviderException
- if an error occurs when invoking
the method annotated by the @PreDestroy
annotationpublic void invokePostConstruct(java.lang.Object managedBean) throws InjectionProviderException
InjectionProvider
The implemenation of this method must invoke any
method marked with the @PostConstruct
annotation
(per the Common Annotations Specification).
invokePostConstruct
in interface InjectionProvider
managedBean
- the target managed beanInjectionProviderException
- if an error occurs when invoking
the method annotated by the @PostConstruct
annotationprivate static void invokeAnnotatedMethod(java.lang.reflect.Method method, java.lang.Object managedBean) throws InjectionProviderException
InjectionProviderException
private static java.lang.reflect.Method getAnnotatedMethod(java.lang.Object managedBean, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
private static java.lang.reflect.Method getAnnotatedMethodForMethodArr(java.lang.reflect.Method[] methods, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.