]
Lincoln Baxter III updated FORGE-436:
-------------------------------------
Fix Version/s: 1.0.7.Final
(was: 2.0.0.Alpha1)
Affects Version/s: 1.0.6.Final
(was: 1.0.7.Final)
JavaSource needs a way to parse nested annotations
--------------------------------------------------
Key: FORGE-436
URL:
https://issues.jboss.org/browse/FORGE-436
Project: Forge
Issue Type: Feature Request
Components: Parsers / File Manipulation
Affects Versions: 1.0.6.Final
Reporter: Richard Kennard
Fix For: 1.0.7.Final
Currently, if presented with a Java file like this:
public class MockAnnotatedMethod {
@MockAnnotation( anAnnotation = @AnotherMockAnnotation(43)),
public MockAnnotatedMethod() {
}
}
JavaSource can easily parse @MockAnnotation into org.jboss.forge.parser.java.Annotation.
But then calling...
annotationSource.getLiteralValue("anAnnotation")
...results in the String...
"@AnotherMockAnnotation(43)"
There doesn't appear to be a good way to parse this String into another
org.jboss.forge.parser.java.Annotation, complete with initializing its value to be
'43'.
This is needed for Metawidget. Metawidget's inspectors can be written to inspect
arbitrary metadata. It is feasible (though not currently required) that someone might want
to parse:
@AttributeOverride( name = "name", column = @Column( name = "name",
nullable = false ) )
public class Person {
...
}
This is a JPA annotation that makes the 'name' field a 'required' field,
but to do so it uses nested annotations.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: