mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
6933147: Provided new utility visitors supporting SourceVersion.RELEASE_7
Reviewed-by: jjg
This commit is contained in:
parent
2592bab72c
commit
fa91c4b435
32 changed files with 829 additions and 22 deletions
|
@ -43,7 +43,7 @@ public class T6194785 extends AbstractProcessor {
|
|||
{
|
||||
final Messager log = processingEnv.getMessager();
|
||||
final Elements elements = processingEnv.getElementUtils();
|
||||
class Scan extends ElementScanner6<Void,Void> {
|
||||
class Scan extends ElementScanner7<Void,Void> {
|
||||
@Override
|
||||
public Void visitExecutable(ExecutableElement e, Void ignored) {
|
||||
for (VariableElement p : e.getParameters())
|
||||
|
|
|
@ -89,7 +89,7 @@ public class NoTypes extends AbstractProcessor {
|
|||
verifyKind(NONE, types.getNoType(NONE));
|
||||
|
||||
// The return type of a constructor or void method is VOID.
|
||||
class Scanner extends ElementScanner6<Void, Void> {
|
||||
class Scanner extends ElementScanner7<Void, Void> {
|
||||
@Override
|
||||
public Void visitExecutable(ExecutableElement e, Void p) {
|
||||
verifyKind(VOID, e.getReturnType());
|
||||
|
@ -104,10 +104,10 @@ public class NoTypes extends AbstractProcessor {
|
|||
|
||||
/**
|
||||
* Verify that a NoType instance is of a particular kind,
|
||||
* and that TypeKindVisitor6 properly dispatches on it.
|
||||
* and that TypeKindVisitor7 properly dispatches on it.
|
||||
*/
|
||||
private void verifyKind(TypeKind kind, TypeMirror type) {
|
||||
class Vis extends TypeKindVisitor6<TypeKind, Void> {
|
||||
class Vis extends TypeKindVisitor7<TypeKind, Void> {
|
||||
@Override
|
||||
public TypeKind visitNoTypeAsVoid(NoType t, Void p) {
|
||||
return VOID;
|
||||
|
|
|
@ -67,7 +67,7 @@ public class TestDeprecation extends AbstractProcessor {
|
|||
return true;
|
||||
}
|
||||
|
||||
private class DeprecationChecker extends ElementScanner6<Boolean,Void> {
|
||||
private class DeprecationChecker extends ElementScanner7<Boolean,Void> {
|
||||
private Elements elementUtils;
|
||||
private boolean failure;
|
||||
DeprecationChecker() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue