-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
Conversation
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); |
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.
assert on ctTypeParameter.getSuperclass().getActualTypeArguments().get(0).toString()
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.
in all "old" add assert on typeParamRef.getDeclaration() and getTypeDeclaration() |
@@ -27,27 +27,57 @@ | |||
public interface CtFormalTypeDeclarer extends CtElement { |
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.
This abstract element defines a declaration that accepts formal type
- parameters (aka generics), such as a CtType (
class A
), CtMethod or CtConstructor
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.
@monperrus PR ok. |
Closes #606