[
https://issues.jboss.org/browse/ROASTER-44?page=com.atlassian.jira.plugin...
]
Matt Benson commented on ROASTER-44:
------------------------------------
Okay, I think to manage something this relatively complex warrants a new interface. What
about something like:
1.
{code}
interface AnnotationArray<O> {
Annotation<O>[] getValues();
}
interface AnnotationArraySource<O> extends AnnotationArray<O> {
void setName(String className);
AnnotationSource<O>[] getValues();
AnnotationSource<O> addValue();
}
{code}
2. modify {{Annotation}}:
{code}
@Deprecated
Annotation<O>[] getAnnotationArrayValue();
@Deprecated
Annotation<O>[] getAnnotationArrayValue(String name);
AnnotationArray<O> getAnnotationArray();
AnnotationArray<O> getAnnotationArray(String name);
{code}
3. modify {{AnnotationSource}}:
{code}
@Deprecated
AnnotationSource<O>[] getAnnotationArrayValue();
@Deprecated
AnnotationSource<O>[] getAnnotationArrayValue(String name);
AnnotationArraySource<O> getAnnotationArray();
AnnotationArraySource<O> getAnnotationArray(String name);
{code}
Support writing of nested annotation arrays
-------------------------------------------
Key: ROASTER-44
URL:
https://issues.jboss.org/browse/ROASTER-44
Project: Roaster
Issue Type: Feature Request
Components: API, JDT
Affects Versions: 2.9.0.Final
Reporter: George Gastaldi
Fix For: 2.x Future
Roaster should allow annotation nesting, like:
{code}
@NamedQueries({
@NamedQuery(name="Customer.findAll", query="select C from Customer
C"),
@NamedQuery(name="Customer.findByName", query="select C from Customer
C where C.name = :name"),
@NamedQuery(name="Customer.findById", query="select C from Customer C
where C.id = :id")
})
@Entity
public class Customer {...}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)