public class ShadowServiceIOCExtension extends IOCDecoratorExtension<ShadowService>
Constructor and Description |
---|
ShadowServiceIOCExtension(Class<ShadowService> decoratesWith) |
Modifier and Type | Method and Description |
---|---|
List<? extends Statement> |
generateDecorator(InjectableInstance<ShadowService> ctx)
The generateDecorator() method is called at the point the container has finished constructing a
reference to an element annotated with the configured annotation.
|
decoratesWith
public ShadowServiceIOCExtension(Class<ShadowService> decoratesWith)
public List<? extends Statement> generateDecorator(InjectableInstance<ShadowService> ctx)
IOCDecoratorExtension
Note:
This method returns List<Object> instead of List<Statement> because this method is
always called with a raw type. To be applicable an unchecked conversion is necessary which causes the erasure
of the return type (JLS, Java SE 7 Edition, section 15.12.2.6).
This compiles with warnings with a JDK7 but fails regardless of the source-level with JDK 8.
See: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7144506
TODO: Remove calls with raw types to this method
generateDecorator
in class IOCDecoratorExtension<ShadowService>
ctx
- the InjectableInstance
reference, representing
the value of the element which is annotated.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.