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

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


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

George Gastaldi commented on ROASTER-125:
-----------------------------------------

Kevin, 

Thanks for taking this issue. We really appreciate it. 

About #1, are you introducing any API changes? If so, you can leave the implementation in the common class and expose the interface with this new API only in the JavaClass and JavaEnum interfaces.


> 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