T7021650.java revision 892
2265N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1472N/A * or visit www.oracle.com if you need additional information or have any 1879N/A * @summary Fix Context issues 1879N/A * @build JavacTestingAbstractProcessor T7021650 0N/A * Perform a compilation with custom factories registered in the context, 0N/A * and verify that corresponding objects are created in each round. 0N/A // Use a custom file manager which creates classloaders for annotation 0N/A // processors with a sensible delegation parent, so that all instances 0N/A // of test classes come from the same class loader. This is important 0N/A // because the test performs class checks on the instances of classes 0N/A // found in the context for each round or processing. 0N/A // Expect to create Demo for initial round, then MAX_ROUNDS in which 0N/A // GenX files are generated, then standard final round of processing. 0N/A // Expect to create MyAttr for same processing rounds as for Demo, 0N/A // plus additional context for final compilation. 0N/A * A custom class unknown to javac but nonetheless registered in the context. 2062N/A * A custom version of a standard javac component. 2062N/A // verify items in context as expected 2062N/A // For a few rounds, generate new source files, so that we can check whether 2062N/A // values in the context are correctly handled in subsequent processing rounds