test/tools/javac/enum/6350057/T6350057.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 21,48 ****
* questions.
*/
/*
* @test
! * @bug 6350057
* @summary Test that parameters on implicit enum methods have the right kind
* @author Joseph D. Darcy
! * @compile T6350057.java
* @compile -processor T6350057 -proc:only TestEnum.java
*/
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.element.*;
import javax.lang.model.util.*;
import static javax.tools.Diagnostic.Kind.*;
! @SupportedAnnotationTypes("*")
! public class T6350057 extends AbstractProcessor {
! static class LocalVarAllergy extends ElementKindVisitor6<Boolean, Void> {
@Override
public Boolean visitTypeAsEnum(TypeElement e, Void v) {
System.out.println("visitTypeAsEnum: " + e.getSimpleName().toString());
for(Element el: e.getEnclosedElements() )
this.visit(el);
--- 21,49 ----
* questions.
*/
/*
* @test
! * @bug 6350057 7025809
* @summary Test that parameters on implicit enum methods have the right kind
* @author Joseph D. Darcy
! * @library ../../lib
! * @build JavacTestingAbstractProcessor T6350057
* @compile -processor T6350057 -proc:only TestEnum.java
*/
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.element.*;
import javax.lang.model.util.*;
import static javax.tools.Diagnostic.Kind.*;
+ import static JavacTestingAbstractProcessor.*;
! public class T6350057 extends JavacTestingAbstractProcessor {
! static class LocalVarAllergy extends ElementKindVisitor<Boolean, Void> {
@Override
public Boolean visitTypeAsEnum(TypeElement e, Void v) {
System.out.println("visitTypeAsEnum: " + e.getSimpleName().toString());
for(Element el: e.getEnclosedElements() )
this.visit(el);