-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
refactor(role): add CtRole ARGUMENT_TYPE and TYPE_ARGUMENT #1622
Conversation
Why is the change of PARAMETER to PARAMETER_TYPE necessary? Is there a confusion with another role PARAMETER? The proposed TYPE_PARAMETER_TYPE is good. I propose to rename it to TYPE_ARGUMENT (following the convention parameter (definition)/argument (usage) used in Spoon) |
In #1582 you already suggested this change by this comment:
There are two ways:
W2) to have different roles there
I can imagine that both ways has same advantage, but W2 seems to be more consistent with other roles. |
8344ca1
to
12045e1
Compare
W2) to have different roles there
|CtExecutable CtRole.PARAMETER ItemType:
java.util.List<spoon.reflect.declaration.CtParameter<?>> get:
getParameters() :
java.util.List<spoon.reflect.declaration.CtParameter<?>> set:
setParameters(java.util.List) add:
addParameter(spoon.reflect.declaration.CtParameter)
----------------------------------------------------------
CtExecutableReference CtRole.PARAMETER_TYPE ItemType:
java.util.List<spoon.reflect.reference.CtTypeReference<?>> get:
getParameters() :
java.util.List<spoon.reflect.reference.CtTypeReference<?>> set:
setParameters(java.util.List)|
|I prefer W2. Instead of PARAMETER_TYPE it should be ARGUMENT_TYPE.|
|
12045e1
to
8bc569c
Compare
I am finished. It is ready for merge. |
This PR introduces new CtRole.PARAMETER_TYPE and CtRole.TYPE_PARAMETER_TYPE_TYPE
CtRole.PARAMETER has values of type CtParameter and CtCatchVariable
CtRole.PARAMETER_TYPE has values of type CtTypeReference
CtRole.TYPE_PARAMETER has values of type CtTypeParameter
CtRole.TYPE_PARAMETER_TYPE_TYPE has values of type CtTypeReference