[
https://issues.jboss.org/browse/ROASTER-72?page=com.atlassian.jira.plugin...
]
Shoji Kuzukami commented on ROASTER-72:
---------------------------------------
Hi George.
As you said, the complexity of API apparently grows up.
But it comes merely for the complexity of java language, not for a verbosity or a
confusing in API.
I think it is better that the in-memory-tree (so not visiting) stable model must be
established quickly as well as possible
because an in-memory tree model is easier in many point of view than a visitor model
and a beautiful visitor pattern depends on stability and preciseness of the underlying
model.
If we once get the precise model of tree, an API of visitor pattern can be easily built
because a lack of memory would not happen in a one-file source code analysis.
In the view point for me, I want to say
'How do I process such a multiple declaration .java file until the fixing of API you
mentioned?'
Adds a new API to parse the multiple declarations of type in a file.
--------------------------------------------------------------------
Key: ROASTER-72
URL:
https://issues.jboss.org/browse/ROASTER-72
Project: Roaster
Issue Type: Feature Request
Components: API, JDT, Tests
Affects Versions: 2.14.0.Final
Environment: Java 8, Windows 8.1 64 bit, Eclipse mars 64bit
Reporter: Shoji Kuzukami
Fix For: 2.x Future
Although the java language permits multiple type declarations of top level in a java
file, the 'roaster' cannot support this function in the API level. Therefore, I
tentatively hack and create an API for the support of multiple declarations.
Please refine and refactor the API until the next release because I cannot devote more
efforts on this. The new API is initially marked as @Deprecated for such reasons.
--comments--
Adds a new API and data structure to parse the multiple declarations of
classes in a java file.
An instance of the 'JavaSourceUnit' represents a java source file which
contains multiple declarations of type.
An API named Roaster.parse2(String encoding, InputStream data) is
tentatively created to extract the JavaSourceUnit result.
Some tests for the new function are created at
'JavaClassMultiDeclsInAFile.java'.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)