8076583: move jdk.Exported from langtools to jdk
authorjjg
Fri, 03 Apr 2015 15:23:02 -0700
changeset 29781 a0cae57ff045
parent 29780 8f8e54a1fa20
child 29782 85d4f5471a74
8076583: move jdk.Exported from langtools to jdk Reviewed-by: darcy, alanb, tbell, mchung, jlahoda
langtools/make/CompileInterim.gmk
langtools/make/build.properties
langtools/make/build.xml
langtools/make/intellij/langtools.iml
langtools/make/intellij/workspace.xml
langtools/make/netbeans/langtools/nbproject/project.xml
langtools/src/java.base/share/classes/jdk/Exported.java
--- a/langtools/make/CompileInterim.gmk	Thu Apr 02 15:56:07 2015 -0700
+++ b/langtools/make/CompileInterim.gmk	Fri Apr 03 15:23:02 2015 -0700
@@ -43,7 +43,6 @@
       $(LANGTOOLS_TOPDIR)/src/jdk.compiler/share/classes \
       $(LANGTOOLS_TOPDIR)/src/jdk.dev/share/classes \
       $(LANGTOOLS_TOPDIR)/src/jdk.javadoc/share/classes \
-      $(LANGTOOLS_TOPDIR)/src/java.base/share/classes \
       $(SUPPORT_OUTPUTDIR)/gensrc/jdk.compiler \
       $(SUPPORT_OUTPUTDIR)/gensrc/jdk.dev \
       $(SUPPORT_OUTPUTDIR)/gensrc/jdk.javadoc, \
--- a/langtools/make/build.properties	Thu Apr 02 15:56:07 2015 -0700
+++ b/langtools/make/build.properties	Fri Apr 03 15:23:02 2015 -0700
@@ -47,12 +47,11 @@
 boot.javac.target = 8
 
 #configuration of submodules (share by both the bootstrap and normal compilation):
-langtools.modules=java.base:java.compiler:jdk.compiler:jdk.dev:jdk.javadoc
-java.base.dependencies=
-java.compiler.dependencies=java.base
-jdk.compiler.dependencies=java.base:java.compiler
-jdk.javadoc.dependencies=java.base:java.compiler:jdk.compiler
-jdk.dev.dependencies=java.base:java.compiler:jdk.compiler
+langtools.modules=java.compiler:jdk.compiler:jdk.dev:jdk.javadoc
+java.compiler.dependencies=
+jdk.compiler.dependencies=java.compiler
+jdk.javadoc.dependencies=java.compiler:jdk.compiler
+jdk.dev.dependencies=java.compiler:jdk.compiler
 
 javac.resource.includes = \
         com/sun/tools/javac/resources/compiler.properties
--- a/langtools/make/build.xml	Thu Apr 02 15:56:07 2015 -0700
+++ b/langtools/make/build.xml	Fri Apr 03 15:23:02 2015 -0700
@@ -254,7 +254,6 @@
             warningsProperty="findbugs.all.warnings"
             jvm="${target.java.home}/bin/java"
             jvmargs="-Xmx512M">
-            <class location="${build.dir}/java.base/classes"/>
             <class location="${build.dir}/java.compiler/classes"/>
             <class location="${build.dir}/jdk.compiler/classes"/>
             <class location="${build.dir}/jdk.javadoc/classes"/>
@@ -461,7 +460,6 @@
         <macrodef name="build-all-module-jars">
             <attribute name="compilation.kind" default=""/>
             <sequential>
-                <build-module-jar module.name="java.base" compilation.kind="@{compilation.kind}" />
                 <build-module-jar module.name="java.compiler" compilation.kind="@{compilation.kind}" />
                 <build-module-jar module.name="jdk.compiler" compilation.kind="@{compilation.kind}" />
                 <build-module-jar module.name="jdk.javadoc" compilation.kind="@{compilation.kind}" />
@@ -522,8 +520,6 @@
         <macrodef name="build-all-module-classes">
             <attribute name="compilation.kind" default=""/>
             <sequential>
-                <build-module-classes module.name="java.base"
-                                      compilation.kind="@{compilation.kind}" />
                 <build-module-classes module.name="java.compiler"
                                       compilation.kind="@{compilation.kind}" />
                 <build-module-classes module.name="jdk.compiler"
--- a/langtools/make/intellij/langtools.iml	Thu Apr 02 15:56:07 2015 -0700
+++ b/langtools/make/intellij/langtools.iml	Fri Apr 03 15:23:02 2015 -0700
@@ -4,13 +4,11 @@
     <output url="file://$MODULE_DIR$/build" />
     <output-test url="file://$MODULE_DIR$/build" />
     <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/java.base/share/classes" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/java.compiler/share/classes" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/jdk.compiler/share/classes" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/jdk.dev/share/classes" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/jdk.javadoc/share/classes" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/bootstrap/java.base/gensrc" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/build/bootstrap/java.compiler/gensrc" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/build/bootstrap/jdk.compiler/gensrc" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/build/bootstrap/jdk.dev/gensrc" isTestSource="false" />
--- a/langtools/make/intellij/workspace.xml	Thu Apr 02 15:56:07 2015 -0700
+++ b/langtools/make/intellij/workspace.xml	Fri Apr 03 15:23:02 2015 -0700
@@ -10,7 +10,7 @@
     <!-- standard tools -->
     <configuration default="false" name="javac" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
-      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@java.base@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
       <option name="PROGRAM_PARAMETERS" value="" />
       <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -29,7 +29,7 @@
     </configuration>
     <configuration default="false" name="javadoc" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
-      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@java.base@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
       <option name="PROGRAM_PARAMETERS" value="" />
       <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -48,7 +48,7 @@
     </configuration>
     <configuration default="false" name="javap" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
-      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@java.base@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
       <option name="PROGRAM_PARAMETERS" value="" />
       <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -67,7 +67,7 @@
     </configuration>
     <configuration default="false" name="javah" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
-      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@java.base@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
       <option name="PROGRAM_PARAMETERS" value="" />
       <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -86,7 +86,7 @@
     </configuration>
     <configuration default="false" name="sjavac" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
-      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@java.base@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@jdk.dev@FILE_SEP@classes" />
       <option name="PROGRAM_PARAMETERS" value="" />
       <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -106,7 +106,7 @@
     <!-- bootstrap javac -->
     <configuration default="false" name="javac (bootstrap)" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
-      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@bootstrap@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@bootstrap@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@bootstrap@FILE_SEP@java.base@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@bootstrap@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@bootstrap@FILE_SEP@jdk.dev@FILE_SEP@classes" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build@FILE_SEP@bootstrap@FILE_SEP@java.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@bootstrap@FILE_SEP@jdk.compiler@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@bootstrap@FILE_SEP@jdk.javadoc@FILE_SEP@classes@PATH_SEP@build@FILE_SEP@bootstrap@FILE_SEP@jdk.dev@FILE_SEP@classes" />
       <option name="PROGRAM_PARAMETERS" value="" />
       <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
--- a/langtools/make/netbeans/langtools/nbproject/project.xml	Thu Apr 02 15:56:07 2015 -0700
+++ b/langtools/make/netbeans/langtools/nbproject/project.xml	Fri Apr 03 15:23:02 2015 -0700
@@ -57,11 +57,6 @@
                     <location>${root}/make</location>
                 </source-folder>
                 <source-folder>
-                    <label>Source files - java.base</label>
-                    <type>java</type>
-                    <location>${root}/src/java.base/share/classes</location>
-                </source-folder>
-                <source-folder>
                     <label>Source files - java.compiler</label>
                     <type>java</type>
                     <location>${root}/src/java.compiler/share/classes</location>
@@ -107,19 +102,6 @@
                 </action>
                 <action name="compile.single">
                     <target>compile-single</target>
-                    <property name="module.name">java.base</property>
-                    <context>
-                        <property>includes</property>
-                        <folder>${root}/src/java.base/share/classes</folder>
-                        <pattern>\.java$</pattern>
-                        <format>relative-path</format>
-                        <arity>
-                            <separated-files>,</separated-files>
-                        </arity>
-                    </context>
-                </action>
-                <action name="compile.single">
-                    <target>compile-single</target>
                     <property name="module.name">java.compiler</property>
                     <context>
                         <property>includes</property>
@@ -259,18 +241,6 @@
                     <target>debug-single</target>
                     <context>
                         <property>debug.classname</property>
-                        <folder>${root}/src/java.base/share/classes</folder>
-                        <pattern>\.java$</pattern>
-                        <format>java-name</format>
-                        <arity>
-                            <one-file-only/>
-                        </arity>
-                    </context>
-                </action>
-                <action name="debug.single">
-                    <target>debug-single</target>
-                    <context>
-                        <property>debug.classname</property>
                         <folder>${root}/src/java.compiler/share/classes</folder>
                         <pattern>\.java$</pattern>
                         <format>java-name</format>
@@ -333,19 +303,6 @@
                 </action>
                 <action name="debug.fix">
                     <target>debug-fix</target>
-                    <property name="module.name">java.base</property>
-                    <context>
-                        <property>class</property>
-                        <folder>${root}/src/java.base/share/classes</folder>
-                        <pattern>\.java$</pattern>
-                        <format>relative-path-noext</format>
-                        <arity>
-                            <one-file-only/>
-                        </arity>
-                    </context>
-                </action>
-                <action name="debug.fix">
-                    <target>debug-fix</target>
                     <property name="module.name">java.compiler</property>
                     <context>
                         <property>class</property>
@@ -417,10 +374,6 @@
             <view>
                 <items>
                     <source-folder style="tree">
-                        <label>Source files - java.base</label>
-                        <location>${root}/src/java.base/share/classes</location>
-                    </source-folder>
-                    <source-folder style="tree">
                         <label>Source files - java.compiler</label>
                         <location>${root}/src/java.compiler/share/classes</location>
                     </source-folder>
@@ -477,36 +430,29 @@
         </general-data>
         <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4">
             <compilation-unit>
-                <package-root>${root}/src/java.base/share/classes</package-root>
-                <package-root>${root}/build/bootstrap/java.base/gensrc</package-root>
-                <built-to>${root}/build/java.base/classes</built-to>
-                <source-level>1.8</source-level>
-            </compilation-unit>
-            <compilation-unit>
                 <package-root>${root}/src/java.compiler/share/classes</package-root>
                 <package-root>${root}/build/bootstrap/java.compiler/gensrc</package-root>
-                <classpath mode="compile">${root}/build/java.base/classes</classpath>
                 <built-to>${root}/build/java.compiler/classes</built-to>
                 <source-level>1.8</source-level>
             </compilation-unit>
             <compilation-unit>
                 <package-root>${root}/src/jdk.compiler/share/classes</package-root>
                 <package-root>${root}/build/bootstrap/jdk.compiler/gensrc</package-root>
-                <classpath mode="compile">${root}/build/java.base/classes:${root}/build/java.compiler/classes</classpath>
+                <classpath mode="compile">${root}/build/java.compiler/classes</classpath>
                 <built-to>${root}/build/jdk.compiler/classes</built-to>
                 <source-level>1.8</source-level>
             </compilation-unit>
             <compilation-unit>
                 <package-root>${root}/src/jdk.dev/share/classes</package-root>
                 <package-root>${root}/build/bootstrap/jdk.dev/gensrc</package-root>
-                <classpath mode="compile">${root}/build/java.base/classes:${root}/build/java.compiler/classes:${root}/build/jdk.compiler/classes</classpath>
+                <classpath mode="compile">${root}/build/java.compiler/classes:${root}/build/jdk.compiler/classes</classpath>
                 <built-to>${root}/build/jdk.dev/classes</built-to>
                 <source-level>1.8</source-level>
             </compilation-unit>
             <compilation-unit>
                 <package-root>${root}/src/jdk.javadoc/share/classes</package-root>
                 <package-root>${root}/build/bootstrap/jdk.javadoc/gensrc</package-root>
-                <classpath mode="compile">${root}/build/java.base/classes:${root}/build/java.compiler/classes:${root}/build/jdk.compiler/classes</classpath>
+                <classpath mode="compile">${root}/build/java.compiler/classes:${root}/build/jdk.compiler/classes</classpath>
                 <built-to>${root}/build/jdk.javadoc/classes</built-to>
                 <source-level>1.8</source-level>
             </compilation-unit>
--- a/langtools/src/java.base/share/classes/jdk/Exported.java	Thu Apr 02 15:56:07 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-package jdk;
-
-import java.lang.annotation.*;
-
-/**
-  * Indicates whether or not a JDK specific type or package is an
-  * exported part of the JDK suitable for use outside of the JDK
-  * implementation itself.
-  *
-  * This annotation should only be applied to types and packages
-  * <em>outside</em> of the Java SE namespaces of {@code java.*} and
-  * {@code javax.*} packages.  For example, certain portions of {@code
-  * com.sun.*} are official parts of the JDK meant to be generally
-  * usable while other portions of {@code com.sun.*} are not.  This
-  * annotation type allows those portions to be easily and
-  * programmatically distinguished.
-  *
-  * <p>If in one release a type or package is
-  * <code>@Exported(true)</code>, in a subsequent major release such a
-  * type or package can transition to <code>@Exported(false)</code>.
-  *
-  * <p>If a type or package is <code>@Exported(false)</code> in a
-  * release, it may be removed in a subsequent major release.
-  *
-  * <p>If a top-level type has an <code>@Exported</code> annotation,
-  * any nested member types with the top-level type should have an
-  * <code>@Exported</code> annotation with the same value.
-  *
-  * (In exceptional cases, if a nested type is going to be removed
-  * before its enclosing type, the nested type's could be
-  * <code>@Exported(false)</code> while its enclosing type was
-  * <code>@Exported(true)</code>.)
-  *
-  * Likewise, if a package has an <code>@Exported</code> annotation,
-  * top-level types within that package should also have an
-  * <code>@Exported</code> annotation.
-  *
-  * Sometimes a top-level type may have a different
-  * <code>@Exported</code> value than its package.
-  *
-  * @since 1.8
-  */
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.PACKAGE})
-@Exported
-public @interface Exported {
-    /**
-     * Whether or not the annotated type or package is an exported
-     * part of the JDK.
-     * @return whether or not the annotated type or package is an exported
-     * part of the JDK
-     */
-    boolean value() default true;
-}