Package org.omnifaces.cdi
Class InjectionTargetWrapper<T>
- java.lang.Object
-
- org.omnifaces.cdi.InjectionTargetWrapper<T>
-
- All Implemented Interfaces:
InjectionTarget<T>,Producer<T>,FacesWrapper<InjectionTarget<T>>
public class InjectionTargetWrapper<T> extends Object implements InjectionTarget<T>, FacesWrapper<InjectionTarget<T>>
Provides a simple implementation of
InjectionTargetthat can be sub-classed by developers wishing to provide specialized behavior to an existingInjectionTargetinstance. The default implementation of all methods is to call through to the wrappedInjectionTarget.Usage: extend this class and provide the instance we are wrapping to the overloaded constructor.
- Since:
- 3.6
- Author:
- Bauke Scholtz
-
-
Constructor Summary
Constructors Constructor Description InjectionTargetWrapper(InjectionTarget<T> wrapped)Construct a injection target wrapper which wraps the given injection target.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose(T instance)Set<InjectionPoint>getInjectionPoints()InjectionTarget<T>getWrapped()voidinject(T instance, CreationalContext<T> ctx)voidpostConstruct(T instance)voidpreDestroy(T instance)Tproduce(CreationalContext<T> ctx)
-
-
-
Constructor Detail
-
InjectionTargetWrapper
public InjectionTargetWrapper(InjectionTarget<T> wrapped)
Construct a injection target wrapper which wraps the given injection target.- Parameters:
wrapped- The injection target to be wrapped.
-
-
Method Detail
-
getWrapped
public InjectionTarget<T> getWrapped()
- Specified by:
getWrappedin interfaceFacesWrapper<T>
-
getInjectionPoints
public Set<InjectionPoint> getInjectionPoints()
- Specified by:
getInjectionPointsin interfaceProducer<T>
-
inject
public void inject(T instance, CreationalContext<T> ctx)
- Specified by:
injectin interfaceInjectionTarget<T>
-
postConstruct
public void postConstruct(T instance)
- Specified by:
postConstructin interfaceInjectionTarget<T>
-
preDestroy
public void preDestroy(T instance)
- Specified by:
preDestroyin interfaceInjectionTarget<T>
-
-