Skip to content
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

feat(ast): Creates CtTypeParameter which represents a type parameter. #798

Merged
merged 5 commits into from
Aug 24, 2016
Merged

feat(ast): Creates CtTypeParameter which represents a type parameter. #798

merged 5 commits into from
Aug 24, 2016

Conversation

GerardPaligot
Copy link
Contributor

Closes #606

CtTypeParameter ctTypeParameter = aType.getFormalCtTypeParameters().get(0);
assertEquals("E extends java.lang.Comparable<? super E>", ctTypeParameter.toString());
assertEquals(1, ctTypeParameter.getSuperclass().getActualTypeArguments().size());
assertTrue(ctTypeParameter.getSuperclass().getActualTypeArguments().get(0) instanceof CtTypeParameterReference);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert on ctTypeParameter.getSuperclass().getActualTypeArguments().get(0).toString()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@monperrus
Copy link
Collaborator

in all "old" add assert on typeParamRef.getDeclaration() and getTypeDeclaration()

@@ -27,27 +27,57 @@
public interface CtFormalTypeDeclarer extends CtElement {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This abstract element defines a declaration that accepts formal type

  • parameters (aka generics), such as a CtType (class A), CtMethod or CtConstructor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@GerardPaligot
Copy link
Contributor Author

@monperrus PR ok.

@monperrus monperrus merged commit 25f9202 into INRIA:master Aug 24, 2016
@GerardPaligot GerardPaligot deleted the feat_606 branch August 24, 2016 09:58
@tdurieux tdurieux mentioned this pull request Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants