[forge-issues] [JBoss JIRA] (ROASTER-125) Add APIs for class and member initializers

George Gastaldi (JIRA) issues at jboss.org
Mon Sep 11 09:09:00 EDT 2017


    [ https://issues.jboss.org/browse/ROASTER-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462047#comment-13462047 ] 

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}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the forge-issues mailing list