/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6930507
* @summary Symbols for anonymous and local classes made too late for use by java tree API
*/
@SupportedAnnotationTypes("*")
new TestGetElement().run();
}
public TestGetElement() { }
for (int i = 1; i <= NUM_TESTS; i++) {
classesDir.mkdirs();
"-processorpath", testClasses,
"-processor", myClassName,
"-proc:only",
"-Atest=" + i,
"-Alast=" + (i == NUM_TESTS),
};
// System.err.println("compile: " + Arrays.asList(args));
if (rc != 0) {
errors++;
}
}
if (errors > 0)
}
int errors;
{
if (roundEnvironment.processingOver())
return true;
int nelems = 0;
}
int EXPECT = 1;
}
return true;
}
return SourceVersion.latest();
}
final boolean last;
int count;
}
}
}
}
return i2;
return i1;
}
count++;
return 0;
TreePath p = getCurrentPath();
int MAXLEN = 40;
if (e == null) {
return 0;
}
+ e.getSimpleName() + ", expected: last");
}
return 1;
}
}
// following are all fodder for the test
class MemberClass {
class NestedMemberClass { }
}
{
class InnerClassInInit { }
}
class InnerClassInConstr { }
}
void m() {
class InnerClassInMethod { }
class C {
class MemberClass {
class NestedMemberClass { }
}
{
class InnerClassInInit { }
}
class InnerClassInConstr { }
}
void m() {
class InnerClassInMethod { }
}
}
}
}