test/tools/javac/processing/model/util/elements/TestGetConstantExpression.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2009, 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) 2009, 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,33 ****
--- 24,35 ----
/*
* @test
* @bug 6471577 6517779
* @summary Test Elements.getConstantExpression
* @author Joseph D. Darcy
+ * @library ../../../../lib
+ * @build JavacTestingAbstractProcessor
* @build TestGetConstantExpression
* @compile -processor TestGetConstantExpression Foo.java
*/
import java.util.Set;
*** 42,55 ****
import java.io.*;
/**
* Test basic workings of Elements.getConstantExpression.
*/
! @SupportedAnnotationTypes("*")
! public class TestGetConstantExpression extends AbstractProcessor {
! private Elements eltUtils;
! private Filer filer;
private int round = 1;
/**
* Check expected behavior on classes and packages.
*/
--- 44,54 ----
import java.io.*;
/**
* Test basic workings of Elements.getConstantExpression.
*/
! public class TestGetConstantExpression extends JavacTestingAbstractProcessor {
private int round = 1;
/**
* Check expected behavior on classes and packages.
*/
*** 128,143 ****
return 1;
} catch (IllegalArgumentException iae) {
return 0;
}
}
-
- public SourceVersion getSupportedSourceVersion() {
- return SourceVersion.latest();
- }
-
- public void init(ProcessingEnvironment processingEnv) {
- super.init(processingEnv);
- eltUtils = processingEnv.getElementUtils();
- filer = processingEnv.getFiler();
- }
}
--- 127,132 ----