-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Allows replacement of any reference with another one. #391
Conversation
Thanks for this PR. I disagree with the introduction of CtObject:
What about a simple CtReplaceable interface for both elements and references? |
I can replace it by
I agree but necessary. Now, it is possible to have a
It's already the case but named |
If continuous integrations are ok, I'm okay too. But if we merge this PR, I vote to make a major version at the next release. |
} | ||
|
||
for (CtTypeReference<?> reference : references) { | ||
reference.replace(factory.Type().createReference(reference.getQualifiedName())); |
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.
replace only one reference.
TODO: Change to 5.0.0-SNAPSHOT in pom.xml |
TODO: Adds some test for parent of a CtReference. |
final CtParameterReference<?> aParameterReference = (CtParameterReference<?>) variableRead.getVariable(); | ||
final CtFieldReference<?> aFieldReference = aTacos.getField("field").getReference(); | ||
|
||
assertEquals(variableRead.getVariable(), aParameterReference); |
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.
Flip expected, actual
I agree with the jump to 5.0.0-SNAPSHOT, even if the tests show that nothing specified is broken, it may impact client processors of CtElement |
TODO: Updates documentation |
@monperrus PR ok. |
Closes #240