test/tools/javac/processing/model/element/TestElement.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, 2010, 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.
*** 24,34 **** /* * @test * @bug 6453386 * @summary Test basic properties of javax.lang.element.Element * @author Joseph D. Darcy ! * @build TestElement * @compile -processor TestElement -proc:only TestElement.java */ import java.util.Set; import javax.annotation.processing.*; --- 24,35 ---- /* * @test * @bug 6453386 * @summary Test basic properties of javax.lang.element.Element * @author Joseph D. Darcy ! * @library ../../../lib ! * @build JavacTestingAbstractProcessor TestElement * @compile -processor TestElement -proc:only TestElement.java */ import java.util.Set; import javax.annotation.processing.*;
*** 41,52 **** import static javax.tools.StandardLocation.*; /** * Test basic workings of javax.lang.element.Element */ ! @SupportedAnnotationTypes("*") ! public class TestElement extends AbstractProcessor { /** * For now, just check that constructors have a simple name of * "<init>". */ public boolean process(Set<? extends TypeElement> annotations, --- 42,52 ---- import static javax.tools.StandardLocation.*; /** * Test basic workings of javax.lang.element.Element */ ! public class TestElement extends JavacTestingAbstractProcessor { /** * For now, just check that constructors have a simple name of * "<init>". */ public boolean process(Set<? extends TypeElement> annotations,
*** 64,74 **** if (!hasRun) throw new RuntimeException("No constructors!"); } return true; } - - public SourceVersion getSupportedSourceVersion() { - return SourceVersion.latest(); - } - } --- 64,69 ----