public class DataFieldCodeDecorator extends IOCDecoratorExtension<DataField>
DataField
Statement
instances into the
aggregate Map
for this composite Template
.Constructor and Description |
---|
DataFieldCodeDecorator(Class<DataField> decoratesWith) |
Modifier and Type | Method and Description |
---|---|
static Map<String,Statement> |
aggregateDataFieldMap(InjectableInstance<?> ctx,
MetaClass componentType)
Get the aggregate map of
DataField names and Statement
instances for the given MetaClass type and all ancestors returned
by MetaClass.getSuperClass() . |
static Map<String,MetaClass> |
aggregateDataFieldTypeMap(InjectableInstance<?> ctx,
MetaClass componentType)
Get the aggregate map of
DataField names and MetaClass
types for the given MetaClass component type and all ancestors
returned by MetaClass.getSuperClass() . |
List<? extends Statement> |
generateDecorator(InjectableInstance<DataField> 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 List<? extends Statement> generateDecorator(InjectableInstance<DataField> 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<DataField>
ctx
- the InjectableInstance
reference, representing
the value of the element which is annotated.public static Map<String,Statement> aggregateDataFieldMap(InjectableInstance<?> ctx, MetaClass componentType)
DataField
names and Statement
instances for the given MetaClass
type and all ancestors returned
by MetaClass.getSuperClass()
.public static Map<String,MetaClass> aggregateDataFieldTypeMap(InjectableInstance<?> ctx, MetaClass componentType)
DataField
names and MetaClass
types for the given MetaClass
component type and all ancestors
returned by MetaClass.getSuperClass()
.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.