]
George Gastaldi commented on ROASTER-125:
-----------------------------------------
Ah I ignore my question. I see you have introduced InitializerSource and
InitializerHolderSource. That looks cool
Add APIs for class and member initializers
-------------------------------------------
Key: ROASTER-125
URL:
https://issues.jboss.org/browse/ROASTER-125
Project: Roaster
Issue Type: Feature Request
Reporter: Aaron Tull
There are gaps in the API JavaClassSource for finding the body of static and member
initializers. For instance, the following class shows 3 code blocks which cannot be
accessed from the API without delving into the AST internals.
{code:java}
public class TestSource {
{
// ... instance initialization block
}
static {
// ... static initialization block
}
private Runnable innerMember = new Runnable() {
@Override
public void run() {
// ... member field initialization to anonymous class instance
}
}
// class definition not found
private static Runnable nestedMember = new Runnable() {
@Override
public void run() {
// ... static field initialization to anonymous class instance
}
}
}
{code}