-
-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support java 7 #98
Support java 7 #98
Conversation
Creates CtTryWithResource/Impl to represent a try-with-resource and adds posibility to visit it. Improves tests to use the new interface CtTryWithResource when it used the old one, CtTry.
Creates MultiTypedElement interface and extended by CtLocalVariable to add the possibility to have multi types for a local variable. For example, it is used in multi catch in Java 7: there is one variable and several types.
This PR is now finished. It supports all java 7 concepts (see below) and all tests run. Java 7 concepts:
This PR is now ready to be merged. |
@@ -17,6 +17,7 @@ | |||
|
|||
package spoon.reflect.code; | |||
|
|||
import spoon.reflect.declaration.CtMultiTypedElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this import ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Creates a new concept in the model, CtCatchVariable. This interface defines an exception variable in a catch and can be visitable. Now, CtCatch are returning a CtCatchVariable with getParameter and not CtLocalVariable.
This PR includes all my contributions about the support of java 7 (for now, only test cases because spoon supports a lot of things about this version of java).
Some questions must to be discuss in the community. These questions are explained in these issues: #96 and #97.