提交 2994b504 编写于 作者: L lana

Merge

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2007, 2013, 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
......@@ -432,6 +432,31 @@
</zip>
</target>
<target name="doclint-api" depends="build-all-classes">
<delete dir="${build.dir}/doclint/classes"/>
<mkdir dir="${build.dir}/doclint/classes"/>
<javac fork="true"
executable="${boot.javac}"
srcdir="${src.classes.dir}:${build.gensrc.dir}"
destdir="${build.dir}/doclint/classes"
includes="javax/lang/model/** com/sun/javadoc/** com/sun/source/**"
excludes=""
sourcepath="${javac.sourcepath}"
classpath="${javac.classpath}"
includeAntRuntime="no"
source="${javac.source}"
target="${javac.target}"
debug="${javac.debug}"
debuglevel="${javac.debuglevel}">
<compilerarg value="-implicit:none"/>
<compilerarg value="-Xprefer:source"/>
<compilerarg value="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
<compilerarg line="${javac.no.jdk.warnings}"/>
<compilerarg line="${javac.version.opt}"/>
<compilerarg line="-Xdoclint:all/protected,-missing"/>
</javac>
</target>
<!--
**** Debugging/diagnostic targets.
-->
......@@ -678,7 +703,7 @@
jarclasspath="sjavac.jar"/>
<build-tool name="sjavac"/>
</target>
<!-- (no javadoc for javap) -->
<target name="jtreg-sjavac" depends="build-sjavac,-def-jtreg">
......
......@@ -29,15 +29,13 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!DOCTYPE project [
<!ENTITY standard-ide-actions SYSTEM "standard-ide-actions.ent">
<!ENTITY standard-context-menu-items SYSTEM "standard-context-menu-items.ent">
]>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.ant.freeform</type>
<configuration>
<general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
<name>langtools</name>
</general-data>
<general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
<!-- Do not use Project Properties customizer when editing this file manually. -->
<name>langtools</name>
<properties>
......@@ -48,11 +46,6 @@
<label>langtools</label>
<location>${root}</location>
</source-folder>
<source-folder>
<label>Source files</label>
<type>java</type>
<location>${root}/src/share/classes</location>
</source-folder>
<source-folder>
<label>Test files</label>
<type>tests</type>
......@@ -63,9 +56,169 @@
<type>build</type>
<location>${root}/make</location>
</source-folder>
<source-folder>
<label>Source files</label>
<type>java</type>
<location>${root}/src/share/classes</location>
</source-folder>
<build-file>
<location>${root}/build/classes</location>
</build-file>
</folders>
<ide-actions>
&standard-ide-actions;
<!--
Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of Oracle nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!--
This file defines the standard actions accepted by langtools projects.
It is normally included as an entity into a project's project.xml file.
For information on these actions, see
- NetBeans: Setting Up Projects
at http://www.netbeans.org/kb/55/using-netbeans/project_setup.html
- NetBeans: Advanced Freeform Project Configuration
at http://www.netbeans.org/kb/41/freeform-config.html
-->
<action name="build">
<target>build</target>
</action>
<action name="clean">
<target>clean</target>
</action>
<action name="rebuild">
<target>clean</target>
<target>build</target>
</action>
<action name="compile.single">
<target>compile-single</target>
<property name="srcdir">${root}/src/share/classes</property>
<context>
<property>includes</property>
<folder>${root}/src/share/classes</folder>
<pattern>\.java$</pattern>
<format>relative-path</format>
<arity>
<separated-files>,</separated-files>
</arity>
</context>
</action>
<action name="run">
<target>run</target>
</action>
<action name="run.single">
<target>run-single</target>
<context>
<property>run.classname</property>
<folder>${root}/src/share/classes</folder>
<pattern>\.java$</pattern>
<format>java-name</format>
<arity>
<one-file-only/>
</arity>
</context>
</action>
<!--
Note: NetBeans does not appear to support context menu items
on shell scripts :-(
-->
<action name="run.single">
<target>jtreg</target>
<context>
<property>jtreg.tests</property>
<folder>${root}/test</folder>
<pattern>\.(java|sh)$</pattern>
<format>relative-path</format>
<arity>
<separated-files>,</separated-files>
</arity>
</context>
</action>
<action name="test">
<target>jtreg</target>
</action>
<action name="debug">
<target>debug</target>
</action>
<action name="debug.single">
<target>debug-single</target>
<context>
<property>debug.classname</property>
<folder>${root}/src/share/classes</folder>
<pattern>\.java$</pattern>
<format>java-name</format>
<arity>
<one-file-only/>
</arity>
</context>
</action>
<!--
Note: NetBeans does not appear to support context menu items
on shell scripts :-(
-->
<action name="debug.single">
<target>debug-jtreg</target>
<context>
<property>jtreg.tests</property>
<folder>${root}/test</folder>
<pattern>\.(java|sh)$</pattern>
<format>relative-path</format>
<arity>
<one-file-only/>
</arity>
</context>
</action>
<action name="debug.fix">
<target>debug-fix</target>
<property name="srcdir">${root}/src/share/classes</property>
<context>
<property>class</property>
<folder>${root}/src/share/classes</folder>
<pattern>\.java$</pattern>
<format>relative-path-noext</format>
<arity>
<one-file-only/>
</arity>
</context>
</action>
<action name="javadoc">
<target>javadoc</target>
</action>
<action name="select-tool">
<target>select-tool</target>
</action>
<action name="test-select-tool-1">
<target>test-select-tool-1</target>
</action>
<action name="test-select-tool-2">
<target>test-select-tool-2</target>
</action>
</ide-actions>
<export>
<type>folder</type>
......@@ -86,13 +239,68 @@
<label>Build files</label>
<location>${root}/make</location>
</source-folder>
<source-folder style="packages">
<label>Source files</label>
<location>${root}/src/share/classes</location>
</source-folder>
<source-file>
<label>README</label>
<location>README</location>
</source-file>
</items>
<context-menu>
&standard-context-menu-items;
<!--
Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of Oracle nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!--
This file defines the actions that will appear on the project's context
menu, in the Projects viewer.
It is normally included as an entity into a project's project.xml file.
For information on these actions, see
- NetBeans: Setting Up Projects
at http://www.netbeans.org/kb/55/using-netbeans/project_setup.html
- NetBeans: Advanced Freeform Project Configuration
at http://www.netbeans.org/kb/41/freeform-config.html
-->
<ide-action name="select-tool"/>
<separator/>
<ide-action name="build"/>
<ide-action name="rebuild"/>
<ide-action name="clean"/>
<ide-action name="javadoc"/>
<separator/>
<ide-action name="run"/>
<ide-action name="debug"/>
<separator/>
<ide-action name="test"/>
</context-menu>
</view>
<subprojects/>
......@@ -101,7 +309,7 @@
<compilation-unit>
<package-root>${root}/src/share/classes</package-root>
<built-to>${root}/build/classes</built-to>
<source-level>1.5</source-level> <!-- FIXME -->
<source-level>1.5</source-level>
</compilation-unit>
</java-data>
</configuration>
......
......@@ -53,7 +53,7 @@ import com.sun.source.doctree.*;
*
* <p>Here is an example to count the number of erroneous nodes in a tree:
* <pre>
* class CountErrors extends DocTreeScanner<Integer,Void> {
* class CountErrors extends DocTreeScanner&lt;Integer,Void&gt; {
* {@literal @}Override
* public Integer visitErroneous(ErroneousTree node, Void p) {
* return 1;
......
......@@ -56,7 +56,7 @@ public abstract class JavacTask implements CompilationTask {
* If the compiler is being invoked using a
* {@link javax.tools.JavaCompiler.CompilationTask CompilationTask},
* then that task will be returned.
* @param processingEnvironment
* @param processingEnvironment the processing environment
* @return the {@code JavacTask} for a {@code ProcessingEnvironment}
* @since 1.8
*/
......
......@@ -38,7 +38,7 @@ import javax.tools.StandardLocation;
*
* <p>Plug-ins are located via a {@link ServiceLoader},
* using the same class path as annotation processors (i.e.
* {@link StandardLocation#PROCESSOR_PATH PROCESSOR_PATH} or
* {@link StandardLocation#ANNOTATION_PROCESSOR_PATH ANNOTATION_PROCESSOR_PATH} or
* {@code -processorpath}).
*
* <p>It is expected that a typical plug-in will simply register a
......
/*
* Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2013, 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
......@@ -38,7 +38,7 @@ import java.util.NoSuchElementException;
* deletion without notice.</b>
*/
public class Code_attribute extends Attribute {
public class InvalidIndex extends AttributeException {
public static class InvalidIndex extends AttributeException {
private static final long serialVersionUID = -8904527774589382802L;
InvalidIndex(int index) {
this.index = index;
......@@ -143,7 +143,7 @@ public class Code_attribute extends Attribute {
public final Exception_data[] exception_table;
public final Attributes attributes;
public class Exception_data {
public static class Exception_data {
Exception_data(ClassReader cr) throws IOException {
start_pc = cr.readUnsignedShort();
end_pc = cr.readUnsignedShort();
......
/*
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2013, 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
......@@ -37,7 +37,7 @@ import java.io.IOException;
* deletion without notice.</b>
*/
public class Descriptor {
public class InvalidDescriptor extends DescriptorException {
public static class InvalidDescriptor extends DescriptorException {
private static final long serialVersionUID = 1L;
InvalidDescriptor(String desc) {
this.desc = desc;
......
......@@ -135,13 +135,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
protected Content getFrameDetails() {
HtmlTree frameset = HtmlTree.FRAMESET("20%,80%", null, "Documentation frame",
"top.loadFrames()");
if (configuration.showProfiles) {
HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
"top.loadFrames()");
addAllProfilesFrameTag(leftFrameset);
addAllClassesFrameTag(leftFrameset);
frameset.addContent(leftFrameset);
} else if (noOfPackages <= 1) {
if (noOfPackages <= 1) {
addAllClassesFrameTag(frameset);
} else if (noOfPackages > 1) {
HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
......@@ -155,17 +149,6 @@ public class FrameOutputWriter extends HtmlDocletWriter {
return frameset;
}
/**
* Add the FRAME tag for the frame that lists all profiles.
*
* @param contentTree the content tree to which the information will be added
*/
private void addAllProfilesFrameTag(Content contentTree) {
HtmlTree frame = HtmlTree.FRAME(DocPaths.PROFILE_OVERVIEW_FRAME.getPath(),
"profileListFrame", configuration.getText("doclet.All_Profiles"));
contentTree.addContent(frame);
}
/**
* Add the FRAME tag for the frame that lists all packages.
*
......
......@@ -162,7 +162,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
*/
protected void addAllProfilesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
allprofilesLabel, "", "profileListFrame");
allprofilesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
}
......
......@@ -107,7 +107,7 @@ public class ProfileIndexFrameWriter extends AbstractProfileIndexWriter {
String profileName = (Profile.lookup(profile)).name;
profileLabel = new StringContent(profileName);
profileLinkContent = getHyperLink(DocPaths.profileFrame(profileName), profileLabel, "",
"profileListFrame");
"packageListFrame");
Content li = HtmlTree.LI(profileLinkContent);
return li;
}
......@@ -154,7 +154,7 @@ public class ProfileIndexFrameWriter extends AbstractProfileIndexWriter {
*/
protected void addAllPackagesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
allpackagesLabel, "", "profileListFrame");
allpackagesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
}
......
......@@ -172,7 +172,7 @@ public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter {
*/
protected void addAllPackagesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
allpackagesLabel, "", "profileListFrame");
allpackagesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
}
......@@ -185,7 +185,7 @@ public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter {
*/
protected void addAllProfilesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
allprofilesLabel, "", "profileListFrame");
allprofilesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
}
......
......@@ -41,33 +41,23 @@ doclet.Window_Split_Index={0} - \u7D22\u5F15
doclet.Help=\u5E2E\u52A9
doclet.Skip_navigation_links=\u8DF3\u8FC7\u5BFC\u822A\u94FE\u63A5
doclet.New_Page=NewPage
doclet.None=\u65E0
doclet.Factory_Method_Detail=\u9759\u6001\u5DE5\u5382\u65B9\u6CD5\u8BE6\u7EC6\u8D44\u6599
doclet.navDeprecated=\u5DF2\u8FC7\u65F6
doclet.Deprecated_List=\u5DF2\u8FC7\u65F6\u7684\u5217\u8868
doclet.Window_Deprecated_List=\u5DF2\u8FC7\u65F6\u7684\u5217\u8868
doclet.Note_0_is_deprecated=\u6CE8: {0}\u5DF2\u8FC7\u65F6\u3002
doclet.Overrides=\u8986\u76D6:
doclet.in_class=\u5728\u7C7B\u4E2D
doclet.0_Fields_and_Methods=&quot;{0}&quot; \u5B57\u6BB5\u548C\u65B9\u6CD5
doclet.Index_of_Fields_and_Methods=\u5B57\u6BB5\u548C\u65B9\u6CD5\u7684\u7D22\u5F15
doclet.Static_variable_in={0}\u4E2D\u7684\u9759\u6001\u53D8\u91CF
doclet.Variable_in={0}\u4E2D\u7684\u53D8\u91CF
doclet.Constructor_for={0}\u7684\u6784\u9020\u5668
doclet.Static_method_in={0}\u4E2D\u7684\u9759\u6001\u65B9\u6CD5
doclet.Method_in={0}\u4E2D\u7684\u65B9\u6CD5
doclet.throws=\u629B\u51FA
doclet.package=\u7A0B\u5E8F\u5305
doclet.MalformedURL=\u683C\u5F0F\u9519\u8BEF\u7684 URL: {0}
doclet.File_error=\u8BFB\u53D6\u6587\u4EF6\u65F6\u51FA\u9519: {0}
doclet.URL_error=\u83B7\u53D6 URL \u65F6\u51FA\u9519: {0}
doclet.No_Package_Comment_File=\u5BF9\u4E8E\u7A0B\u5E8F\u5305{0}, \u627E\u4E0D\u5230 Package.Comment \u6587\u4EF6
doclet.No_Source_For_Class=\u7C7B{0}\u7684\u6E90\u4FE1\u606F\u4E0D\u53EF\u7528\u3002
doclet.see.class_or_package_not_found=\u6807\u8BB0{0}: \u627E\u4E0D\u5230\u5F15\u7528: {1}
doclet.see.class_or_package_not_accessible=\u6807\u8BB0{0}: \u65E0\u6CD5\u8BBF\u95EE\u5F15\u7528: {1}
doclet.see.malformed_tag=\u6807\u8BB0{0}: \u683C\u5F0F\u9519\u8BEF: {1}
doclet.Inherited_API_Summary=\u7EE7\u627F\u7684 API \u6982\u8981
doclet.Deprecated_API=\u5DF2\u8FC7\u65F6\u7684 API
doclet.Deprecated_Packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305
doclet.Deprecated_Classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B
doclet.Deprecated_Enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E
doclet.Deprecated_Interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3
......@@ -79,6 +69,7 @@ doclet.Deprecated_Constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668
doclet.Deprecated_Methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5
doclet.Deprecated_Enum_Constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF
doclet.Deprecated_Annotation_Type_Members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
doclet.deprecated_packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305
doclet.deprecated_classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B
doclet.deprecated_enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E
doclet.deprecated_interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3
......@@ -90,10 +81,7 @@ doclet.deprecated_constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668
doclet.deprecated_methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5
doclet.deprecated_enum_constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF
doclet.deprecated_annotation_type_members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
doclet.Frame_Output=\u6846\u67B6\u8F93\u51FA
doclet.Docs_generated_by_Javadoc=\u7531 Javadoc \u751F\u6210\u7684\u6587\u6863\u3002
doclet.Generated_Docs_Untitled=\u751F\u6210\u7684\u6587\u6863 (\u65E0\u6807\u9898)
doclet.Blank=\u7A7A\u767D
doclet.Other_Packages=\u5176\u4ED6\u7A0B\u5E8F\u5305
doclet.Package_Description=\u7A0B\u5E8F\u5305{0}\u7684\u8BF4\u660E
doclet.Description=\u8BF4\u660E
......@@ -102,33 +90,25 @@ doclet.in_interface=\u5728\u63A5\u53E3\u4E2D
doclet.Subclasses=\u76F4\u63A5\u5DF2\u77E5\u5B50\u7C7B:
doclet.Subinterfaces=\u6240\u6709\u5DF2\u77E5\u5B50\u63A5\u53E3:
doclet.Implementing_Classes=\u6240\u6709\u5DF2\u77E5\u5B9E\u73B0\u7C7B:
doclet.Functional_Interface=\u51FD\u6570\u63A5\u53E3:
doclet.Functional_Interface_Message=\u8FD9\u662F\u4E00\u4E2A\u51FD\u6570\u63A5\u53E3, \u56E0\u6B64\u53EF\u7528\u4F5C lambda \u8868\u8FBE\u5F0F\u6216\u65B9\u6CD5\u5F15\u7528\u7684\u8D4B\u503C\u76EE\u6807\u3002
doclet.also=\u5E76
doclet.Option=\u9009\u9879
doclet.Or=\u6216
doclet.Frames=\u6846\u67B6
doclet.No_Frames=\u65E0\u6846\u67B6
doclet.Package_Hierarchies=\u7A0B\u5E8F\u5305\u5206\u5C42\u7ED3\u6784:
doclet.Hierarchy_For_Package=\u7A0B\u5E8F\u5305{0}\u7684\u5206\u5C42\u7ED3\u6784
doclet.Source_Code=\u6E90\u4EE3\u7801:
doclet.Hierarchy_For_All_Packages=\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784
doclet.Cannot_handle_no_packages=\u65E0\u6CD5\u5904\u7406\u6CA1\u6709\u7A0B\u5E8F\u5305\u7684\u60C5\u51B5\u3002
doclet.Frame_Alert=\u6846\u67B6\u9884\u8B66
doclet.Overview-Member-Frame=\u6210\u5458\u6846\u67B6\u6982\u89C8
doclet.Frame_Warning_Message=\u8BF7\u4F7F\u7528\u6846\u67B6\u529F\u80FD\u67E5\u770B\u6B64\u6587\u6863\u3002\u5982\u679C\u770B\u5230\u6B64\u6D88\u606F, \u5219\u8868\u660E\u60A8\u4F7F\u7528\u7684\u662F\u4E0D\u652F\u6301\u6846\u67B6\u7684 Web \u5BA2\u6237\u673A\u3002\u94FE\u63A5\u5230{0}\u3002
doclet.No_Script_Message=\u60A8\u7684\u6D4F\u89C8\u5668\u5DF2\u7981\u7528 JavaScript\u3002
doclet.Non_Frame_Version=\u975E\u6846\u67B6\u7248\u672C
doclet.Frame_Version=\u6846\u67B6\u7248\u672C
doclet.Following_From_Class=\u4EE5\u4E0B\u5185\u5BB9\u662F\u4ECE\u7C7B{0}\u590D\u5236\u7684
doclet.Following_From_Interface=\u4EE5\u4E0B\u5185\u5BB9\u662F\u4ECE\u63A5\u53E3{0}\u590D\u5236\u7684
doclet.Description_From_Interface=\u4ECE\u63A5\u53E3\u590D\u5236\u7684\u8BF4\u660E:
doclet.Description_From_Class=\u4ECE\u7C7B\u590D\u5236\u7684\u8BF4\u660E:
doclet.Standard_doclet_invoked=\u5DF2\u8C03\u7528\u7684\u6807\u51C6 doclet...
doclet.No_Non_Deprecated_Classes_To_Document=\u627E\u4E0D\u5230\u53EF\u4EE5\u6587\u6863\u5316\u7684\u672A\u8FC7\u65F6\u7684\u7C7B\u3002
doclet.Interfaces_Italic=\u63A5\u53E3 (\u659C\u4F53)
doclet.Enclosing_Class=\u5C01\u95ED\u7C7B:
doclet.Enclosing_Interface=\u5C01\u95ED\u63A5\u53E3:
doclet.Window_Source_title=\u6E90\u4EE3\u7801
doclet.Help_title=API \u5E2E\u52A9
doclet.Window_Help_title=API \u5E2E\u52A9
doclet.Help_line_1=\u6B64 API \u6587\u6863\u7684\u7EC4\u7EC7\u65B9\u5F0F
doclet.Help_line_2=\u6B64 API (\u5E94\u7528\u7A0B\u5E8F\u7F16\u7A0B\u63A5\u53E3) \u6587\u6863\u5305\u542B\u5BF9\u5E94\u4E8E\u5BFC\u822A\u680F\u4E2D\u7684\u9879\u76EE\u7684\u9875\u9762, \u5982\u4E0B\u6240\u8FF0\u3002
......@@ -158,7 +138,7 @@ doclet.Help_line_25=\u6846\u67B6/\u65E0\u6846\u67B6
doclet.Help_line_26=\u8FD9\u4E9B\u94FE\u63A5\u7528\u4E8E\u663E\u793A\u548C\u9690\u85CF HTML \u6846\u67B6\u3002\u6240\u6709\u9875\u9762\u5747\u5177\u6709\u6709\u6846\u67B6\u548C\u65E0\u6846\u67B6\u4E24\u79CD\u663E\u793A\u65B9\u5F0F\u3002
doclet.Help_line_27={0}\u94FE\u63A5\u663E\u793A\u6240\u6709\u7C7B\u548C\u63A5\u53E3 (\u9664\u4E86\u975E\u9759\u6001\u5D4C\u5957\u7C7B\u578B)\u3002
doclet.Help_line_28=\u6BCF\u4E2A\u53EF\u5E8F\u5217\u5316\u6216\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u90FD\u6709\u5176\u5E8F\u5217\u5316\u5B57\u6BB5\u548C\u65B9\u6CD5\u7684\u8BF4\u660E\u3002\u6B64\u4FE1\u606F\u5BF9\u91CD\u65B0\u5B9E\u73B0\u8005\u6709\u7528, \u800C\u5BF9\u4F7F\u7528 API \u7684\u5F00\u53D1\u8005\u5219\u6CA1\u6709\u4EC0\u4E48\u7528\u5904\u3002\u5C3D\u7BA1\u5BFC\u822A\u680F\u4E2D\u6CA1\u6709\u94FE\u63A5, \u4F46\u60A8\u53EF\u4EE5\u901A\u8FC7\u4E0B\u5217\u65B9\u5F0F\u83B7\u53D6\u6B64\u4FE1\u606F: \u8F6C\u81F3\u4EFB\u4F55\u5E8F\u5217\u5316\u7C7B, \u7136\u540E\u5355\u51FB\u7C7B\u8BF4\u660E\u7684 "\u53E6\u8BF7\u53C2\u9605" \u90E8\u5206\u4E2D\u7684 "\u5E8F\u5217\u5316\u8868\u683C"\u3002
doclet.Help_line_29=<a href="constant-values.html">\u5E38\u91CF\u5B57\u6BB5\u503C</a>\u9875\u9762\u5217\u51FA\u4E86\u9759\u6001\u6700\u7EC8\u5B57\u6BB5\u53CA\u5176\u503C\u3002
doclet.Help_line_29={0}\u9875\u9762\u5217\u51FA\u4E86\u9759\u6001\u6700\u7EC8\u5B57\u6BB5\u53CA\u5176\u503C\u3002
doclet.Help_line_30=\u6B64\u5E2E\u52A9\u6587\u4EF6\u9002\u7528\u4E8E\u4F7F\u7528\u6807\u51C6 doclet \u751F\u6210\u7684 API \u6587\u6863\u3002
doclet.Help_enum_line_1=\u6BCF\u4E2A\u679A\u4E3E\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206:
doclet.Help_enum_line_2=\u679A\u4E3E\u58F0\u660E
......@@ -166,19 +146,6 @@ doclet.Help_enum_line_3=\u679A\u4E3E\u8BF4\u660E
doclet.Help_annotation_type_line_1=\u6BCF\u4E2A\u6CE8\u91CA\u7C7B\u578B\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206:
doclet.Help_annotation_type_line_2=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E
doclet.Help_annotation_type_line_3=\u6CE8\u91CA\u7C7B\u578B\u8BF4\u660E
doclet.Style_line_1=Javadoc \u6837\u5F0F\u8868
doclet.Style_line_2=\u5728\u6B64\u5904\u5B9A\u4E49\u989C\u8272, \u5B57\u4F53\u548C\u5176\u4ED6\u6837\u5F0F\u5C5E\u6027\u4EE5\u8986\u76D6\u9ED8\u8BA4\u503C
doclet.Style_line_3=\u9875\u9762\u80CC\u666F\u989C\u8272
doclet.Style_Headings=\u6807\u9898
doclet.Style_line_4=\u8868\u683C\u989C\u8272
doclet.Style_line_5=\u6DF1\u7D2B\u8272
doclet.Style_line_6=\u6DE1\u7D2B\u8272
doclet.Style_line_7=\u767D\u8272
doclet.Style_line_8=\u5DE6\u4FA7\u7684\u6846\u67B6\u5217\u8868\u4E2D\u4F7F\u7528\u7684\u5B57\u4F53
doclet.Style_line_9=\u6846\u67B6\u4E2D\u5C0F\u53F7 sans-serif \u5B57\u4F53\u7684\u793A\u4F8B
doclet.Style_line_10=\u5BFC\u822A\u680F\u5B57\u4F53\u548C\u989C\u8272
doclet.Style_line_11=\u6DF1\u84DD\u8272
doclet.Style_line_12=\u8868\u6807\u9898\u6837\u5F0F
doclet.ClassUse_Packages.that.use.0=\u4F7F\u7528{0}\u7684\u7A0B\u5E8F\u5305
doclet.ClassUse_Uses.of.0.in.1={1}\u4E2D{0}\u7684\u4F7F\u7528
doclet.ClassUse_Classes.in.0.used.by.1={1}\u4F7F\u7528\u7684{0}\u4E2D\u7684\u7C7B
......@@ -208,13 +175,11 @@ doclet.ClassUse_No.usage.of.0=\u6CA1\u6709{0}\u7684\u7528\u6CD5
doclet.Window_ClassUse_Header={0} {1}\u7684\u4F7F\u7528
doclet.ClassUse_Title={0} {1}<br>\u7684\u4F7F\u7528
doclet.navClassUse=\u4F7F\u7528
doclet.link_option_twice=\u5916\u90E8 URL \u94FE\u63A5\u9009\u9879 (link \u6216 linkoffline) \u4F7F\u7528\u4E86\u4E24\u6B21\u3002
doclet.Error_in_packagelist=\u4F7F\u7528 -group \u9009\u9879\u65F6\u51FA\u9519: {0} {1}
doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0}
doclet.Same_package_name_used=\u7A0B\u5E8F\u5305\u540D\u79F0\u5F62\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0}
doclet.Serialization.Excluded_Class=\u975E\u77AC\u6001\u5B57\u6BB5{1}\u4F7F\u7528\u4E86\u6392\u9664\u7684\u7C7B{0}\u3002
doclet.Serialization.Nonexcluded_Class=\u975E\u77AC\u6001\u5B57\u6BB5{1}\u4F7F\u7528\u4E86\u9690\u85CF\u7684, \u672A\u5305\u542B\u7684\u7C7B{0}\u3002
doclet.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n-d <directory> \u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55\n-use \u521B\u5EFA\u7C7B\u548C\u7A0B\u5E8F\u5305\u7528\u6CD5\u9875\u9762\n-version \u5305\u542B @version \u6BB5\n-author \u5305\u542B @author \u6BB5\n-docfilessubdirs \u9012\u5F52\u590D\u5236\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\n-splitindex \u5C06\u7D22\u5F15\u5206\u4E3A\u6BCF\u4E2A\u5B57\u6BCD\u5BF9\u5E94\u4E00\u4E2A\u6587\u4EF6\n-windowtitle <text> \u6587\u6863\u7684\u6D4F\u89C8\u5668\u7A97\u53E3\u6807\u9898\n-doctitle <html-code> \u5305\u542B\u6982\u89C8\u9875\u9762\u7684\u6807\u9898\n-header <html-code> \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u7709\u6587\u672C\n-footer <html-code> \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u811A\u6587\u672C\n-top <html-code> \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9876\u90E8\u6587\u672C\n-bottom <html-code> \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u5E95\u90E8\u6587\u672C\n-link <url> \u521B\u5EFA\u6307\u5411\u4F4D\u4E8E <url> \u7684 javadoc \u8F93\u51FA\u7684\u94FE\u63A5\n-linkoffline <url> <url2> \u5229\u7528\u4F4D\u4E8E <url2> \u7684\u7A0B\u5E8F\u5305\u5217\u8868\u94FE\u63A5\u81F3\u4F4D\u4E8E <url> \u7684\u6587\u6863\n-excludedocfilessubdir <name1>:..\u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\u3002\n-group <name> <p1>:<p2>..\u5728\u6982\u89C8\u9875\u9762\u4E2D, \u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5206\u7EC4\n-nocomment \u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E\u3002\n-nodeprecated \u4E0D\u5305\u542B @deprecated \u4FE1\u606F\n-noqualifier <name1>:<name2>:...\u8F93\u51FA\u4E2D\u4E0D\u5305\u62EC\u6307\u5B9A\u9650\u5B9A\u7B26\u7684\u5217\u8868\u3002\n-nosince \u4E0D\u5305\u542B @since \u4FE1\u606F\n-notimestamp \u4E0D\u5305\u542B\u9690\u85CF\u65F6\u95F4\u6233\n-nodeprecatedlist \u4E0D\u751F\u6210\u5DF2\u8FC7\u65F6\u7684\u5217\u8868\n-notree \u4E0D\u751F\u6210\u7C7B\u5206\u5C42\u7ED3\u6784\n-noindex \u4E0D\u751F\u6210\u7D22\u5F15\n-nohelp \u4E0D\u751F\u6210\u5E2E\u52A9\u94FE\u63A5\n-nonavbar \u4E0D\u751F\u6210\u5BFC\u822A\u680F\n-serialwarn \u751F\u6210\u6709\u5173 @serial \u6807\u8BB0\u7684\u8B66\u544A\n-tag <name>:<locations>:<header> \u6307\u5B9A\u5355\u4E2A\u53C2\u6570\u5B9A\u5236\u6807\u8BB0\n-taglet \u8981\u6CE8\u518C\u7684 Taglet \u7684\u5168\u9650\u5B9A\u540D\u79F0\n-tagletpath Taglet \u7684\u8DEF\u5F84\n-charset <charset> \u7528\u4E8E\u8DE8\u5E73\u53F0\u67E5\u770B\u751F\u6210\u7684\u6587\u6863\u7684\u5B57\u7B26\u96C6\u3002\n-helpfile <file> \u5305\u542B\u5E2E\u52A9\u94FE\u63A5\u6240\u94FE\u63A5\u5230\u7684\u6587\u4EF6\n-linksource \u4EE5 HTML \u683C\u5F0F\u751F\u6210\u6E90\u6587\u4EF6\n-sourcetab <tab length> \u6307\u5B9A\u6E90\u4E2D\u6BCF\u4E2A\u5236\u8868\u7B26\u5360\u636E\u7684\u7A7A\u683C\u6570\n-keywords \u4F7F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u9644\u5E26 HTML \u5143\u6807\u8BB0\n-stylesheetfile <path> \u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6\n-docencoding <name> \u8F93\u51FA\u7F16\u7801\u540D\u79F0
doclet.exception_encountered=\u5904\u7406{1}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\n{0}
doclet.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n-d <directory> \u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55\n-use \u521B\u5EFA\u7C7B\u548C\u7A0B\u5E8F\u5305\u7528\u6CD5\u9875\u9762\n-version \u5305\u542B @version \u6BB5\n-author \u5305\u542B @author \u6BB5\n-docfilessubdirs \u9012\u5F52\u590D\u5236\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\n-splitindex \u5C06\u7D22\u5F15\u5206\u4E3A\u6BCF\u4E2A\u5B57\u6BCD\u5BF9\u5E94\u4E00\u4E2A\u6587\u4EF6\n-windowtitle <text> \u6587\u6863\u7684\u6D4F\u89C8\u5668\u7A97\u53E3\u6807\u9898\n-doctitle <html-code> \u5305\u542B\u6982\u89C8\u9875\u9762\u7684\u6807\u9898\n-header <html-code> \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u7709\u6587\u672C\n-footer <html-code> \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u811A\u6587\u672C\n-top <html-code> \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9876\u90E8\u6587\u672C\n-bottom <html-code> \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u5E95\u90E8\u6587\u672C\n-link <url> \u521B\u5EFA\u6307\u5411\u4F4D\u4E8E <url> \u7684 javadoc \u8F93\u51FA\u7684\u94FE\u63A5\n-linkoffline <url> <url2> \u5229\u7528\u4F4D\u4E8E <url2> \u7684\u7A0B\u5E8F\u5305\u5217\u8868\u94FE\u63A5\u81F3\u4F4D\u4E8E <url> \u7684\u6587\u6863\n-excludedocfilessubdir <name1>:.. \u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\u3002\n-group <name> <p1>:<p2>.. \u5728\u6982\u89C8\u9875\u9762\u4E2D, \u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5206\u7EC4\n-nocomment \u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E\u3002\n-nodeprecated \u4E0D\u5305\u542B @deprecated \u4FE1\u606F\n-noqualifier <name1>:<name2>:... \u8F93\u51FA\u4E2D\u4E0D\u5305\u62EC\u9650\u5B9A\u7B26\u7684\u5217\u8868\u3002\n-nosince \u4E0D\u5305\u542B @since \u4FE1\u606F\n-notimestamp \u4E0D\u5305\u542B\u9690\u85CF\u65F6\u95F4\u6233\n-nodeprecatedlist \u4E0D\u751F\u6210\u5DF2\u8FC7\u65F6\u7684\u5217\u8868\n-notree \u4E0D\u751F\u6210\u7C7B\u5206\u5C42\u7ED3\u6784\n-noindex \u4E0D\u751F\u6210\u7D22\u5F15\n-nohelp \u4E0D\u751F\u6210\u5E2E\u52A9\u94FE\u63A5\n-nonavbar \u4E0D\u751F\u6210\u5BFC\u822A\u680F\n-serialwarn \u751F\u6210\u6709\u5173 @serial \u6807\u8BB0\u7684\u8B66\u544A\n-tag <name>:<locations>:<header> \u6307\u5B9A\u5355\u4E2A\u53C2\u6570\u5B9A\u5236\u6807\u8BB0\n-taglet \u8981\u6CE8\u518C\u7684 Taglet \u7684\u5168\u9650\u5B9A\u540D\u79F0\n-tagletpath Taglet \u7684\u8DEF\u5F84\n-Xdocrootparent <url> \u5C06\u6587\u6863\u6CE8\u91CA\u4E2D\u51FA\u73B0\u7684\u6240\u6709\u540E\u8DDF /.. \u7684 @docRoot \u66FF\u6362\u4E3A <url>\n-charset <charset> \u7528\u4E8E\u8DE8\u5E73\u53F0\u67E5\u770B\u751F\u6210\u7684\u6587\u6863\u7684\u5B57\u7B26\u96C6\u3002\n-helpfile <file> \u5305\u542B\u5E2E\u52A9\u94FE\u63A5\u6240\u94FE\u63A5\u5230\u7684\u6587\u4EF6\n-linksource \u4EE5 HTML \u683C\u5F0F\u751F\u6210\u6E90\u6587\u4EF6\n-sourcetab <tab length> \u6307\u5B9A\u6E90\u4E2D\u6BCF\u4E2A\u5236\u8868\u7B26\u5360\u636E\u7684\u7A7A\u683C\u6570\n-keywords \u4F7F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u9644\u5E26 HTML \u5143\u6807\u8BB0\n-stylesheetfile <path> \u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6\n-docencoding <name> \u8F93\u51FA\u7F16\u7801\u540D\u79F0
......
......@@ -56,7 +56,7 @@ public abstract class Configuration {
/**
* Exception used to report a problem during setOptions.
*/
public class Fault extends Exception {
public static class Fault extends Exception {
private static final long serialVersionUID = 0;
Fault(String msg) {
......
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2013, 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
......@@ -116,9 +116,9 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* @param contentTree the content tree to which the documentation will be added
*/
public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception {
contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") +
contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") +
" " + annotationTypeDoc.name());
Content annotationContentTree = writer.getAnnotationContentHeader();
Content annotationContentTree = writer.getAnnotationContentHeader();
buildChildren(node, annotationContentTree);
contentTree.addContent(annotationContentTree);
writer.addFooter(contentTree);
......
......@@ -11,6 +11,8 @@ doclet.Class_0_implements_serializable=Class {0} implements Serializable
doclet.Class_0_extends_implements_serializable=Class {0} extends {1} implements Serializable
doclet.Option_conflict=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u304C{1}\u3068\u77DB\u76FE\u3057\u307E\u3059
doclet.Option_reuse=\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u518D\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
doclet.Option_doclint_no_qualifiers=\u30A2\u30AF\u30BB\u30B9\u4FEE\u98FE\u5B50\u306F-Xdoclint\u306E\u5F15\u6570\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
doclet.Option_doclint_invalid_arg=-Xdoclint\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059
doclet.exception_encountered= {0}\u3092\u691C\u51FA\n\t\u30D5\u30A1\u30A4\u30EB\u306E\u4F5C\u6210\u4E2D: {1}
doclet.perform_copy_exception_encountered= \u30B3\u30D4\u30FC\u5B9F\u884C\u4E2D\u306B{0}\u3092\n\u691C\u51FA\u3057\u307E\u3057\u305F\u3002
doclet.File_not_found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
......@@ -19,10 +21,8 @@ doclet.Copying_File_0_To_Dir_1=\u30D5\u30A1\u30A4\u30EB{0}\u3092\u30C7\u30A3\u30
doclet.Copying_File_0_To_File_1=\u30D5\u30A1\u30A4\u30EB{0}\u3092\u30D5\u30A1\u30A4\u30EB{1}\u306B\u30B3\u30D4\u30FC\u4E2D...
doclet.No_Public_Classes_To_Document=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308Bpublic\u307E\u305F\u306Fprotected\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
doclet.Unable_to_create_directory_0=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
doclet.destination_directory_not_found_0=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
doclet.destination_directory_not_directory_0=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093
doclet.destination_directory_not_writable_0=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u306F\u66F8\u8FBC\u307F\u53EF\u80FD\u3067\u306F\u3042\u308A\u307E\u305B\u3093
doclet.Error_creating_tmp_file=\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3057\u3066\u4E00\u6642\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
doclet.Encoding_not_supported=\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
doclet.Building_Tree=\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u30AF\u30E9\u30B9\u306E\u968E\u5C64\u30C4\u30EA\u30FC\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059...
doclet.Building_Index=\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059...
......@@ -72,7 +72,6 @@ doclet.Field_Summary=\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u6982\u8981
doclet.Enum_Constant_Summary=\u5217\u6319\u578B\u5B9A\u6570\u306E\u6982\u8981
doclet.Constructor_Summary=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u6982\u8981
doclet.Method_Summary=\u30E1\u30BD\u30C3\u30C9\u306E\u6982\u8981
doclet.Factory_Method_Summary=static\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30E1\u30BD\u30C3\u30C9\u306E\u6982\u8981
doclet.Interfaces=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
doclet.Enums=\u5217\u6319\u578B
doclet.AnnotationTypes=\u6CE8\u91C8\u578B
......@@ -86,15 +85,14 @@ doclet.All_Superinterfaces=\u3059\u3079\u3066\u306E\u30B9\u30FC\u30D1\u30FC\u30A
doclet.All_Implemented_Interfaces=\u3059\u3079\u3066\u306E\u5B9F\u88C5\u3055\u308C\u305F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9:
doclet.All_classes_and_interfaces=\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u975Estatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u578B\u3092\u9664\u304F)
doclet.Package_class_and_interface_descriptions=\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E
doclet.Members=\u30E1\u30F3\u30D0\u30FC
doclet.Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
doclet.Class=\u30AF\u30E9\u30B9
doclet.AnnotationType=\u6CE8\u91C8\u578B
doclet.annotationtype=\u6CE8\u91C8\u578B
doclet.annotationtypes=\u6CE8\u91C8\u578B
doclet.Enum=\u5217\u6319\u578B
doclet.enum=\u5217\u6319
doclet.enums=\u5217\u6319
doclet.enum=\u5217\u6319\u578B
doclet.enums=\u5217\u6319\u578B
doclet.interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
doclet.interfaces=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
doclet.class=\u30AF\u30E9\u30B9
......@@ -105,26 +103,20 @@ doclet.errors=\u30A8\u30E9\u30FC
doclet.Exception=\u4F8B\u5916
doclet.exception=\u4F8B\u5916
doclet.exceptions=\u4F8B\u5916
doclet.extended_by=\u4E0A\u4F4D\u3092\u62E1\u5F35
doclet.extends=extends
doclet.Package_private=(package private)
doclet.implements=implementsdoclet.Same_package_name_used=\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u5F62\u5F0F\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
doclet.Nested_Classes_Interfaces_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
doclet.Nested_Classes_Interface_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
doclet.Methods_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9
doclet.Methods_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9
doclet.Fields_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
doclet.Fields_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
doclet.Serializable=\u76F4\u5217\u5316\u53EF\u80FD
doclet.Externalizable=\u5916\u90E8\u5316\u53EF\u80FD
doclet.Annotation_Type_Member_Detail=\u8981\u7D20\u306E\u8A73\u7D30
doclet.Enum_Constant_Detail=\u5217\u6319\u578B\u5B9A\u6570\u306E\u8A73\u7D30
doclet.Constants_Summary=\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u5024
doclet.Field_Detail=\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u8A73\u7D30
doclet.Method_Detail=\u30E1\u30BD\u30C3\u30C9\u306E\u8A73\u7D30
doclet.Constructor_Detail=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u8A73\u7D30
doclet.Deprecated=\u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
doclet.Deprecated_class=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
doclet.Deprecated=\u975E\u63A8\u5968\u3067\u3059\u3002
doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
doclet.value_tag_invalid_reference={0}(@value\u30BF\u30B0\u306B\u3088\u308A\u53C2\u7167\u3055\u308C\u3066\u3044\u308B)\u306F\u4E0D\u660E\u306A\u53C2\u7167\u3067\u3059\u3002
doclet.value_tag_invalid_constant=@value\u30BF\u30B0({0}\u3092\u53C2\u7167\u3057\u3066\u3044\u308B)\u306F\u5B9A\u6570\u5185\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
......@@ -144,7 +136,7 @@ doclet.Annotation_Type_Optional_Members=\u4EFB\u610F\u8981\u7D20
doclet.annotation_type_required_members=\u5FC5\u9808\u8981\u7D20
doclet.Annotation_Type_Required_Members=\u5FC5\u9808\u8981\u7D20
doclet.enum_constants=\u5217\u6319\u578B\u5B9A\u6570
doclet.Enum_Constants=\u5217\u6319\u5B9A\u6570
doclet.Enum_Constants=\u5217\u6319\u578B\u5B9A\u6570
doclet.nested_classes=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9
doclet.Nested_Classes=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9
doclet.subclasses=\u30B5\u30D6\u30AF\u30E9\u30B9
......@@ -167,4 +159,4 @@ doclet.0_and_1={0}\u3068{1}
#Documentation for Enums
doclet.enum_values_doc=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n<pre>\nfor({0} c: {0}.values())\n&nbsp; System.out.println(c);\n</pre>\n@return\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\n\u542B\u3080\u914D\u5217
doclet.enum_valueof_doc=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068\u53B3\u5BC6\u306B\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n\n@param name\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\n@return\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5217\u6319\u578B\u5B9A\u6570\n@throws IllegalArgumentException\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5B9A\u6570\u3092\n\u3053\u306E\u5217\u6319\u578B\u304C\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\n@throws NullPointerException\u5F15\u6570\u304Cnull\u306E\u5834\u5408
doclet.enum_valueof_doc=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068<i>\u6B63\u78BA\u306B</i>\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n\n@param name\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\n@return\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5217\u6319\u578B\u5B9A\u6570\n@throws IllegalArgumentException\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5B9A\u6570\u3092\n\u3053\u306E\u5217\u6319\u578B\u304C\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\n@throws NullPointerException\u5F15\u6570\u304Cnull\u306E\u5834\u5408
......@@ -11,6 +11,8 @@ doclet.Class_0_implements_serializable=\u7C7B{0}\u5B9E\u73B0\u53EF\u5E8F\u5217\u
doclet.Class_0_extends_implements_serializable=\u7C7B{0}\u6269\u5C55{1}\u5B9E\u73B0\u53EF\u5E8F\u5217\u5316
doclet.Option_conflict=\u9009\u9879{0}\u4E0E{1}\u51B2\u7A81
doclet.Option_reuse=\u91CD\u590D\u4F7F\u7528\u7684\u9009\u9879: {0}
doclet.Option_doclint_no_qualifiers=-Xdoclint \u53C2\u6570\u4E0D\u5141\u8BB8\u4F7F\u7528\u8BBF\u95EE\u9650\u5B9A\u7B26
doclet.Option_doclint_invalid_arg=-Xdoclint \u9009\u9879\u7684\u53C2\u6570\u65E0\u6548
doclet.exception_encountered= \u5C1D\u8BD5\u521B\u5EFA\u6587\u4EF6{1}\u65F6 \n\t\u9047\u5230{0}
doclet.perform_copy_exception_encountered= \u6267\u884C\u590D\u5236\u65F6 \n\u9047\u5230{0}\u3002
doclet.File_not_found=\u627E\u4E0D\u5230\u6587\u4EF6: {0}
......@@ -19,10 +21,8 @@ doclet.Copying_File_0_To_Dir_1=\u6B63\u5728\u5C06\u6587\u4EF6{0}\u590D\u5236\u52
doclet.Copying_File_0_To_File_1=\u6B63\u5728\u5C06\u6587\u4EF6{0}\u590D\u5236\u5230\u6587\u4EF6{1}...
doclet.No_Public_Classes_To_Document=\u627E\u4E0D\u5230\u53EF\u4EE5\u6587\u6863\u5316\u7684\u516C\u5171\u6216\u53D7\u4FDD\u62A4\u7684\u7C7B\u3002
doclet.Unable_to_create_directory_0=\u65E0\u6CD5\u521B\u5EFA\u76EE\u5F55 {0}
doclet.destination_directory_not_found_0=\u627E\u4E0D\u5230\u76EE\u6807\u76EE\u5F55 {0}
doclet.destination_directory_not_directory_0=\u76EE\u6807\u76EE\u5F55\u4E0D\u662F\u76EE\u5F55 {0}
doclet.destination_directory_not_writable_0=\u76EE\u6807\u76EE\u5F55\u4E0D\u53EF\u5199\u5165 {0}
doclet.Error_creating_tmp_file=\u4F7F\u7528\u9ED8\u8BA4\u5E73\u53F0\u7F16\u7801\u521B\u5EFA\u4E34\u65F6\u6587\u4EF6\u65F6\u51FA\u9519\u3002
doclet.Encoding_not_supported=\u4E0D\u652F\u6301\u7F16\u7801: {0}
doclet.Building_Tree=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7A0B\u5E8F\u5305\u548C\u7C7B\u7684\u6811...
doclet.Building_Index=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7A0B\u5E8F\u5305\u548C\u7C7B\u7684\u7D22\u5F15...
......@@ -72,7 +72,6 @@ doclet.Field_Summary=\u5B57\u6BB5\u6982\u8981
doclet.Enum_Constant_Summary=\u679A\u4E3E\u5E38\u91CF\u6982\u8981
doclet.Constructor_Summary=\u6784\u9020\u5668\u6982\u8981
doclet.Method_Summary=\u65B9\u6CD5\u6982\u8981
doclet.Factory_Method_Summary=\u9759\u6001\u5DE5\u5382\u65B9\u6CD5\u6982\u8981
doclet.Interfaces=\u63A5\u53E3
doclet.Enums=\u679A\u4E3E
doclet.AnnotationTypes=\u6CE8\u91CA\u7C7B\u578B
......@@ -86,7 +85,6 @@ doclet.All_Superinterfaces=\u6240\u6709\u8D85\u7EA7\u63A5\u53E3:
doclet.All_Implemented_Interfaces=\u6240\u6709\u5DF2\u5B9E\u73B0\u7684\u63A5\u53E3:
doclet.All_classes_and_interfaces=\u6240\u6709\u7C7B\u548C\u63A5\u53E3 (\u9664\u4E86\u975E\u9759\u6001\u5D4C\u5957\u7C7B\u578B)
doclet.Package_class_and_interface_descriptions=\u7A0B\u5E8F\u5305, \u7C7B\u548C\u63A5\u53E3\u8BF4\u660E
doclet.Members=\u6210\u5458
doclet.Interface=\u63A5\u53E3
doclet.Class=\u7C7B
doclet.AnnotationType=\u6CE8\u91CA\u7C7B\u578B
......@@ -105,18 +103,13 @@ doclet.errors=\u9519\u8BEF
doclet.Exception=\u5F02\u5E38\u9519\u8BEF
doclet.exception=\u5F02\u5E38\u9519\u8BEF
doclet.exceptions=\u5F02\u5E38\u9519\u8BEF
doclet.extended_by=\u6269\u5C55\u8005
doclet.extends=\u6269\u5C55
doclet.Package_private=(\u4E13\u7528\u7A0B\u5E8F\u5305)
doclet.implements=implementsdoclet.Same_package_name_used=\u7A0B\u5E8F\u5305\u540D\u79F0\u5F62\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0}
doclet.Nested_Classes_Interfaces_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
doclet.Nested_Classes_Interface_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
doclet.Methods_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u65B9\u6CD5
doclet.Methods_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u65B9\u6CD5
doclet.Fields_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5B57\u6BB5
doclet.Fields_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5B57\u6BB5
doclet.Serializable=\u53EF\u5E8F\u5217\u5316
doclet.Externalizable=\u53EF\u5916\u90E8\u5316
doclet.Annotation_Type_Member_Detail=\u5143\u7D20\u8BE6\u7EC6\u8D44\u6599
doclet.Enum_Constant_Detail=\u679A\u4E3E\u5E38\u91CF\u8BE6\u7EC6\u8D44\u6599
doclet.Constants_Summary=\u5E38\u91CF\u5B57\u6BB5\u503C
......@@ -124,7 +117,6 @@ doclet.Field_Detail=\u5B57\u6BB5\u8BE6\u7EC6\u8D44\u6599
doclet.Method_Detail=\u65B9\u6CD5\u8BE6\u7EC6\u8D44\u6599
doclet.Constructor_Detail=\u6784\u9020\u5668\u8BE6\u7EC6\u8D44\u6599
doclet.Deprecated=\u5DF2\u8FC7\u65F6\u3002
doclet.Deprecated_class=\u8BE5\u7C7B\u5DF2\u8FC7\u65F6\u3002
doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0}
doclet.value_tag_invalid_reference={0} (\u7531 @value \u6807\u8BB0\u5F15\u7528) \u4E3A\u672A\u77E5\u5F15\u7528\u3002
doclet.value_tag_invalid_constant=@value \u6807\u8BB0 (\u5F15\u7528{0}) \u53EA\u80FD\u5728\u5E38\u91CF\u4E2D\u4F7F\u7528\u3002
......@@ -167,4 +159,4 @@ doclet.0_and_1={0}\u548C{1}
#Documentation for Enums
doclet.enum_values_doc=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n<pre>\nfor ({0} c : {0}.values())\n&nbsp; System.out.println(c);\n</pre>\n@\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4
doclet.enum_valueof_doc=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26<i>\u5B8C\u5168</i>\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)\n\n@param name \u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002\n@return \u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF\n@throws \u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF, \n\u5219\u629B\u51FA IllegalArgumentException\n@throws \u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C, \u5219\u629B\u51FA NullPointerException
doclet.enum_valueof_doc=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26<i>\u5B8C\u5168</i>\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)\n\n@param name \u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002\n@\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF\n@\u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF, \n\u5219\u629B\u51FA IllegalArgumentException\n@\u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C, \u5219\u629B\u51FA NullPointerException
......@@ -25,20 +25,18 @@
package com.sun.tools.doclint;
import com.sun.source.doctree.LiteralTree;
import java.util.regex.Matcher;
import com.sun.source.doctree.LinkTree;
import java.net.URI;
import java.util.regex.Pattern;
import java.io.IOException;
import com.sun.tools.javac.tree.DocPretty;
import java.io.StringWriter;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Deque;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
......@@ -52,12 +50,15 @@ import javax.tools.Diagnostic.Kind;
import com.sun.source.doctree.AttributeTree;
import com.sun.source.doctree.AuthorTree;
import com.sun.source.doctree.DocCommentTree;
import com.sun.source.doctree.DocRootTree;
import com.sun.source.doctree.DocTree;
import com.sun.source.doctree.EndElementTree;
import com.sun.source.doctree.EntityTree;
import com.sun.source.doctree.ErroneousTree;
import com.sun.source.doctree.IdentifierTree;
import com.sun.source.doctree.InheritDocTree;
import com.sun.source.doctree.LinkTree;
import com.sun.source.doctree.LiteralTree;
import com.sun.source.doctree.ParamTree;
import com.sun.source.doctree.ReferenceTree;
import com.sun.source.doctree.ReturnTree;
......@@ -67,11 +68,12 @@ import com.sun.source.doctree.SinceTree;
import com.sun.source.doctree.StartElementTree;
import com.sun.source.doctree.TextTree;
import com.sun.source.doctree.ThrowsTree;
import com.sun.source.doctree.ValueTree;
import com.sun.source.doctree.VersionTree;
import com.sun.source.util.DocTreeScanner;
import com.sun.source.util.TreePath;
import com.sun.tools.doclint.HtmlTag.AttrKind;
import java.net.URISyntaxException;
import com.sun.tools.javac.tree.DocPretty;
import static com.sun.tools.doclint.Messages.Group.*;
......@@ -95,6 +97,7 @@ public class Checker extends DocTreeScanner<Void, Void> {
public enum Flag {
TABLE_HAS_CAPTION,
HAS_ELEMENT,
HAS_INLINE_TAG,
HAS_TEXT,
REPORTED_BAD_INLINE
}
......@@ -418,7 +421,8 @@ public class Checker extends DocTreeScanner<Void, Void> {
}
if (t.flags.contains(HtmlTag.Flag.EXPECT_CONTENT)
&& !top.flags.contains(Flag.HAS_TEXT)
&& !top.flags.contains(Flag.HAS_ELEMENT)) {
&& !top.flags.contains(Flag.HAS_ELEMENT)
&& !top.flags.contains(Flag.HAS_INLINE_TAG)) {
env.messages.warning(HTML, tree, "dc.tag.empty", treeName);
}
tagStack.pop();
......@@ -570,8 +574,15 @@ public class Checker extends DocTreeScanner<Void, Void> {
return super.visitAuthor(tree, ignore);
}
@Override
public Void visitDocRoot(DocRootTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
return super.visitDocRoot(tree, ignore);
}
@Override
public Void visitInheritDoc(InheritDocTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
// TODO: verify on overridden method
foundInheritDoc = true;
return super.visitInheritDoc(tree, ignore);
......@@ -579,6 +590,7 @@ public class Checker extends DocTreeScanner<Void, Void> {
@Override
public Void visitLink(LinkTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
// simulate inline context on tag stack
HtmlTag t = (tree.getKind() == DocTree.Kind.LINK)
? HtmlTag.CODE : HtmlTag.SPAN;
......@@ -592,6 +604,7 @@ public class Checker extends DocTreeScanner<Void, Void> {
@Override
public Void visitLiteral(LiteralTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
if (tree.getKind() == DocTree.Kind.CODE) {
for (TagStackItem tsi: tagStack) {
if (tsi.tag == HtmlTag.CODE) {
......@@ -745,6 +758,12 @@ public class Checker extends DocTreeScanner<Void, Void> {
}
}
@Override
public Void visitValue(ValueTree tree, Void ignore) {
markEnclosingTag(Flag.HAS_INLINE_TAG);
return super.visitValue(tree, ignore);
}
@Override
public Void visitVersion(VersionTree tree, Void ignore) {
warnIfEmpty(tree, tree.getBody());
......
/*
* Copyright (c) 2005, 2012, 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 com.sun.tools.javac;
import java.io.*;
import java.net.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.logging.Logger;
import javax.tools.*;
/**
* Java Compiler Server. Can be used to speed up a set of (small)
* compilation tasks by caching jar files between compilations.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p>
*
* @author Peter von der Ah&eacute;
* @since 1.6
*/
@jdk.Supported(false)
class Server implements Runnable {
private final BufferedReader in;
private final OutputStream out;
private final boolean isSocket;
private static final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
private static final Logger logger = Logger.getLogger("com.sun.tools.javac");
static class CwdFileManager extends ForwardingJavaFileManager<JavaFileManager> {
String cwd;
CwdFileManager(JavaFileManager fileManager) {
super(fileManager);
}
String getAbsoluteName(String name) {
if (new File(name).isAbsolute()) {
return name;
} else {
return new File(cwd,name).getPath();
}
}
// public JavaFileObject getFileForInput(String name)
// throws IOException
// {
// return super.getFileForInput(getAbsoluteName(name));
// }
}
// static CwdFileManager fm = new CwdFileManager(tool.getStandardFileManager());
static final StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null);
static {
// Use the same file manager for all compilations. This will
// cache jar files in the standard file manager. Use
// tool.getStandardFileManager().close() to release.
// FIXME tool.setFileManager(fm);
logger.setLevel(java.util.logging.Level.SEVERE);
}
private Server(BufferedReader in, OutputStream out, boolean isSocket) {
this.in = in;
this.out = out;
this.isSocket = isSocket;
}
private Server(BufferedReader in, OutputStream out) {
this(in, out, false);
}
private Server(Socket socket) throws IOException, UnsupportedEncodingException {
this(new BufferedReader(new InputStreamReader(socket.getInputStream(), "utf-8")),
socket.getOutputStream(),
true);
}
public void run() {
List<String> args = new ArrayList<String>();
int res = -1;
try {
String line = null;
try {
line = in.readLine();
} catch (IOException e) {
System.err.println(e.getLocalizedMessage());
System.exit(0);
line = null;
}
// fm.cwd=null;
String cwd = null;
while (line != null) {
if (line.startsWith("PWD:")) {
cwd = line.substring(4);
} else if (line.equals("END")) {
break;
} else if (!"-XDstdout".equals(line)) {
args.add(line);
}
try {
line = in.readLine();
} catch (IOException e) {
System.err.println(e.getLocalizedMessage());
System.exit(0);
line = null;
}
}
Iterable<File> path = cwd == null ? null : Arrays.<File>asList(new File(cwd));
// try { in.close(); } catch (IOException e) {}
long msec = System.currentTimeMillis();
try {
synchronized (tool) {
for (StandardLocation location : StandardLocation.values())
fm.setLocation(location, path);
res = compile(out, fm, args);
// FIXME res = tool.run((InputStream)null, null, out, args.toArray(new String[args.size()]));
}
} catch (Throwable ex) {
logger.log(java.util.logging.Level.SEVERE, args.toString(), ex);
PrintWriter p = new PrintWriter(out, true);
ex.printStackTrace(p);
p.flush();
}
if (res >= 3) {
logger.severe(String.format("problem: %s", args));
} else {
logger.info(String.format("success: %s", args));
}
// res = compile(args.toArray(new String[args.size()]), out);
msec -= System.currentTimeMillis();
logger.info(String.format("Real time: %sms", -msec));
} finally {
if (!isSocket) {
try { in.close(); } catch (IOException e) {}
}
try {
out.write(String.format("EXIT: %s%n", res).getBytes());
} catch (IOException ex) {
logger.log(java.util.logging.Level.SEVERE, args.toString(), ex);
}
try {
out.flush();
out.close();
} catch (IOException ex) {
logger.log(java.util.logging.Level.SEVERE, args.toString(), ex);
}
logger.info(String.format("EXIT: %s", res));
}
}
public static void main(String... args) throws FileNotFoundException {
if (args.length == 2) {
for (;;) {
throw new UnsupportedOperationException("TODO");
// BufferedReader in = new BufferedReader(new FileReader(args[0]));
// PrintWriter out = new PrintWriter(args[1]);
// new Server(in, out).run();
// System.out.flush();
// System.err.flush();
}
} else {
ExecutorService pool = Executors.newCachedThreadPool();
try
{
ServerSocket socket = new ServerSocket(0xcafe, -1, null);
for (;;) {
pool.execute(new Server(socket.accept()));
}
}
catch (IOException e) {
System.err.format("Error: %s%n", e.getLocalizedMessage());
pool.shutdown();
}
}
}
private int compile(OutputStream out, StandardJavaFileManager fm, List<String> args) {
// FIXME parse args and use getTask
// System.err.println("Running " + args);
return tool.run(null, null, out, args.toArray(new String[args.size()]));
}
}
......@@ -311,9 +311,9 @@ public abstract class Printer implements Type.Visitor<String, Locale>, Symbol.Vi
}
if (args.head.unannotatedType().getKind() == TypeKind.ARRAY) {
buf.append(visit(((ArrayType) args.head.unannotatedType()).elemtype, locale));
if (args.head.getAnnotations().nonEmpty()) {
if (args.head.getAnnotationMirrors().nonEmpty()) {
buf.append(' ');
buf.append(args.head.getAnnotations());
buf.append(args.head.getAnnotationMirrors());
buf.append(' ');
}
buf.append("...");
......
......@@ -483,12 +483,12 @@ public abstract class Symbol implements Element {
*/
@Deprecated
public <A extends java.lang.annotation.Annotation> A getAnnotation(Class<A> annoType) {
return JavacElements.getAnnotation(this, annoType);
return JavacAnnoConstructs.getAnnotation(this, annoType);
}
// This method is part of the javax.lang.model API, do not use this in javac code.
public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(Class<A> annoType) {
return JavacElements.getAnnotations(this, annoType);
return JavacAnnoConstructs.getAnnotations(this, annoType);
}
// TODO: getEnclosedElements should return a javac List, fix in FilteredMemberList
......@@ -935,11 +935,12 @@ public abstract class Symbol implements Element {
}
/**
* @deprecated this method should never be used by javac internally.
* Since this method works in terms of the runtime representation
* of annotations, it should never be used by javac internally.
*/
@Override @Deprecated
@Override
public <A extends java.lang.annotation.Annotation> A getAnnotation(Class<A> annoType) {
return JavacElements.getAnnotation(this, annoType);
return JavacAnnoConstructs.getAnnotation(this, annoType);
}
public <R, P> R accept(ElementVisitor<R, P> v, P p) {
......@@ -1444,6 +1445,10 @@ public abstract class Symbol implements Element {
return v.visitMethodSymbol(this, p);
}
public Type getReceiverType() {
return asType().getReceiverType();
}
public Type getReturnType() {
return asType().getReturnType();
}
......
......@@ -25,6 +25,9 @@
package com.sun.tools.javac.code;
import com.sun.tools.javac.model.JavacAnnoConstructs;
import com.sun.tools.javac.model.JavacTypes;
import java.lang.annotation.Annotation;
import java.util.Collections;
import java.util.EnumMap;
import java.util.EnumSet;
......@@ -246,6 +249,10 @@ public class Type implements PrimitiveType {
return this;
}
public boolean isAnnotated() {
return false;
}
/**
* If this is an annotated type, return the underlying type.
* Otherwise, return the type itself.
......@@ -254,6 +261,23 @@ public class Type implements PrimitiveType {
return this;
}
@Override
public List<? extends Attribute.TypeCompound> getAnnotationMirrors() {
return List.nil();
}
@Override
public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
return null;
}
@Override
public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
@SuppressWarnings("unchecked")
A[] tmp = (A[]) java.lang.reflect.Array.newInstance(annotationType, 0);
return tmp;
}
/** Return the base types of a list of types.
*/
public static List<Type> baseTypes(List<Type> ts) {
......@@ -350,8 +374,8 @@ public class Type implements PrimitiveType {
}
if (args.head.unannotatedType().tag == ARRAY) {
buf.append(((ArrayType)args.head.unannotatedType()).elemtype);
if (args.head.getAnnotations().nonEmpty()) {
buf.append(args.head.getAnnotations());
if (args.head.getAnnotationMirrors().nonEmpty()) {
buf.append(args.head.getAnnotationMirrors());
}
buf.append("...");
} else {
......@@ -362,7 +386,6 @@ public class Type implements PrimitiveType {
/** Access methods.
*/
public List<? extends AnnotationMirror> getAnnotations() { return List.nil(); }
public List<Type> getTypeArguments() { return List.nil(); }
public Type getEnclosingType() { return null; }
public List<Type> getParameterTypes() { return List.nil(); }
......@@ -1539,7 +1562,12 @@ public class Type implements PrimitiveType {
}
public static class AnnotatedType extends Type
implements javax.lang.model.type.AnnotatedType {
implements
javax.lang.model.type.ArrayType,
javax.lang.model.type.DeclaredType,
javax.lang.model.type.PrimitiveType,
javax.lang.model.type.TypeVariable,
javax.lang.model.type.WildcardType {
/** The type annotations on this type.
*/
public List<Attribute.TypeCompound> typeAnnotations;
......@@ -1552,7 +1580,7 @@ public class Type implements PrimitiveType {
super(underlyingType.tag, underlyingType.tsym);
this.typeAnnotations = List.nil();
this.underlyingType = underlyingType;
Assert.check(underlyingType.getKind() != TypeKind.ANNOTATED,
Assert.check(!underlyingType.isAnnotated(),
"Can't annotate already annotated type: " + underlyingType);
}
......@@ -1561,24 +1589,34 @@ public class Type implements PrimitiveType {
super(underlyingType.tag, underlyingType.tsym);
this.typeAnnotations = typeAnnotations;
this.underlyingType = underlyingType;
Assert.check(underlyingType.getKind() != TypeKind.ANNOTATED,
Assert.check(!underlyingType.isAnnotated(),
"Can't annotate already annotated type: " + underlyingType +
"; adding: " + typeAnnotations);
}
@Override
public TypeKind getKind() {
return TypeKind.ANNOTATED;
public boolean isAnnotated() {
return true;
}
@Override
public List<? extends AnnotationMirror> getAnnotations() {
public List<? extends Attribute.TypeCompound> getAnnotationMirrors() {
return typeAnnotations;
}
@Override
public TypeMirror getUnderlyingType() {
return underlyingType;
public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
return JavacAnnoConstructs.getAnnotation(this, annotationType);
}
@Override
public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
return JavacAnnoConstructs.getAnnotationsByType(this, annotationType);
}
@Override
public TypeKind getKind() {
return underlyingType.getKind();
}
@Override
......@@ -1593,7 +1631,7 @@ public class Type implements PrimitiveType {
@Override
public <R, P> R accept(TypeVisitor<R, P> v, P p) {
return v.visitAnnotated(this, p);
return underlyingType.accept(v, p);
}
@Override
......
......@@ -233,7 +233,7 @@ public class TypeAnnotations {
Type.ArrayType arType;
{
Type touse = type;
if (type.getKind() == TypeKind.ANNOTATED) {
if (type.isAnnotated()) {
Type.AnnotatedType atype = (Type.AnnotatedType)type;
toreturn = new Type.AnnotatedType(atype.underlyingType);
((Type.AnnotatedType)toreturn).typeAnnotations = atype.typeAnnotations;
......@@ -252,7 +252,7 @@ public class TypeAnnotations {
ListBuffer<TypePathEntry> depth = ListBuffer.lb();
depth = depth.append(TypePathEntry.ARRAY);
while (arType.elemtype.hasTag(TypeTag.ARRAY)) {
if (arType.elemtype.getKind() == TypeKind.ANNOTATED) {
if (arType.elemtype.isAnnotated()) {
Type.AnnotatedType aelemtype = (Type.AnnotatedType) arType.elemtype;
Type.AnnotatedType newAT = new Type.AnnotatedType(aelemtype.underlyingType);
tomodify.elemtype = newAT;
......
......@@ -1178,6 +1178,17 @@ public class Types {
protected boolean containsTypes(List<Type> ts1, List<Type> ts2) {
return isSameTypes(ts1, ts2, true);
}
@Override
public Boolean visitWildcardType(WildcardType t, Type s) {
if (!s.hasTag(WILDCARD)) {
return false;
} else {
WildcardType t2 = (WildcardType)s;
return t.kind == t2.kind &&
isSameType(t.type, t2.type, true);
}
}
};
// </editor-fold>
......@@ -1418,23 +1429,10 @@ public class Types {
}
}
if (t.isCompound()) {
Warner oldWarner = warnStack.head;
warnStack.head = noWarnings;
if (!visit(supertype(t), s))
return false;
for (Type intf : interfaces(t)) {
if (!visit(intf, s))
return false;
}
if (warnStack.head.hasLint(LintCategory.UNCHECKED))
oldWarner.warn(LintCategory.UNCHECKED);
return true;
}
if (s.isCompound()) {
// call recursively to reuse the above code
return visitClassType((ClassType)s, t);
if (t.isCompound() || s.isCompound()) {
return !t.isCompound() ?
visitIntersectionType((IntersectionClassType)s, t, true) :
visitIntersectionType((IntersectionClassType)t, s, false);
}
if (s.tag == CLASS || s.tag == ARRAY) {
......@@ -1512,6 +1510,18 @@ public class Types {
return false;
}
boolean visitIntersectionType(IntersectionClassType ict, Type s, boolean reverse) {
Warner warn = noWarnings;
for (Type c : ict.getComponents()) {
warn.clear();
if (reverse ? !isCastable(s, c, warn) : !isCastable(c, s, warn))
return false;
}
if (warn.hasLint(LintCategory.UNCHECKED))
warnStack.head.warn(LintCategory.UNCHECKED);
return true;
}
@Override
public Boolean visitArrayType(ArrayType t, Type s) {
switch (s.tag) {
......@@ -2091,7 +2101,7 @@ public class Types {
@Override
public Type visitAnnotatedType(AnnotatedType t, Boolean recurse) {
Type erased = erasure(t.underlyingType, recurse);
if (erased.getKind() == TypeKind.ANNOTATED) {
if (erased.isAnnotated()) {
// This can only happen when the underlying type is a
// type variable and the upper bound of it is annotated.
// The annotation on the type variable overrides the one
......@@ -3889,11 +3899,18 @@ public class Types {
}
private boolean giveWarning(Type from, Type to) {
Type subFrom = asSub(from, to.tsym);
return to.isParameterized() &&
(!(isUnbounded(to) ||
isSubtype(from, to) ||
((subFrom != null) && containsType(to.allparams(), subFrom.allparams()))));
List<Type> bounds = to.isCompound() ?
((IntersectionClassType)to).getComponents() : List.of(to);
for (Type b : bounds) {
Type subFrom = asSub(from, b.tsym);
if (b.isParameterized() &&
(!(isUnbounded(b) ||
isSubtype(from, b) ||
((subFrom != null) && containsType(b.allparams(), subFrom.allparams()))))) {
return true;
}
}
return false;
}
private List<Type> superClosure(Type t, Type s) {
......
......@@ -3362,7 +3362,7 @@ public class Attr extends JCTree.Visitor {
Type normOuter = site;
if (normOuter.hasTag(CLASS)) {
normOuter = types.asEnclosingSuper(site, ownOuter.tsym);
if (site.getKind() == TypeKind.ANNOTATED) {
if (site.isAnnotated()) {
// Propagate any type annotations.
// TODO: should asEnclosingSuper do this?
// Note that the type annotations in site will be updated
......@@ -4009,8 +4009,7 @@ public class Attr extends JCTree.Visitor {
// Enums may not be extended by source-level classes
if (st.tsym != null &&
((st.tsym.flags_field & Flags.ENUM) != 0) &&
((c.flags_field & (Flags.ENUM | Flags.COMPOUND)) == 0) &&
!target.compilerBootstrap(c)) {
((c.flags_field & (Flags.ENUM | Flags.COMPOUND)) == 0)) {
log.error(env.tree.pos(), "enum.types.not.extensible");
}
attribClassBody(env, c);
......@@ -4279,7 +4278,7 @@ public class Attr extends JCTree.Visitor {
validateAnnotatedType(errtree, type);
if (type.tsym != null &&
type.tsym.isStatic() &&
type.getAnnotations().nonEmpty()) {
type.getAnnotationMirrors().nonEmpty()) {
// Enclosing static classes cannot have type annotations.
log.error(errtree.pos(), "cant.annotate.static.class");
}
......
......@@ -2779,25 +2779,17 @@ public class Check {
}
private void validateTarget(Symbol container, Symbol contained, DiagnosticPosition pos) {
Attribute.Array containedTarget = getAttributeTargetAttribute(contained);
// If contained has no Target, we are done
if (containedTarget == null) {
return;
}
// If contained has Target m1, container must have a Target
// annotation, m2, and m2 must be a subset of m1. (This is
// trivially true if contained has no target as per above).
// The set of targets the container is applicable to must be a subset
// (with respect to annotation target semantics) of the set of targets
// the contained is applicable to. The target sets may be implicit or
// explicit.
// contained has target, but container has not, error
Set<Name> containerTargets;
Attribute.Array containerTarget = getAttributeTargetAttribute(container);
if (containerTarget == null) {
log.error(pos, "invalid.repeatable.annotation.incompatible.target", container, contained);
return;
}
Set<Name> containerTargets = new HashSet<Name>();
containerTargets = getDefaultTargetSet();
} else {
containerTargets = new HashSet<Name>();
for (Attribute app : containerTarget.values) {
if (!(app instanceof Attribute.Enum)) {
continue; // recovery
......@@ -2805,8 +2797,14 @@ public class Check {
Attribute.Enum e = (Attribute.Enum)app;
containerTargets.add(e.value.name);
}
}
Set<Name> containedTargets = new HashSet<Name>();
Set<Name> containedTargets;
Attribute.Array containedTarget = getAttributeTargetAttribute(contained);
if (containedTarget == null) {
containedTargets = getDefaultTargetSet();
} else {
containedTargets = new HashSet<Name>();
for (Attribute app : containedTarget.values) {
if (!(app instanceof Attribute.Enum)) {
continue; // recovery
......@@ -2814,20 +2812,42 @@ public class Check {
Attribute.Enum e = (Attribute.Enum)app;
containedTargets.add(e.value.name);
}
}
if (!isTargetSubset(containedTargets, containerTargets)) {
if (!isTargetSubsetOf(containerTargets, containedTargets)) {
log.error(pos, "invalid.repeatable.annotation.incompatible.target", container, contained);
}
}
/** Checks that t is a subset of s, with respect to ElementType
/* get a set of names for the default target */
private Set<Name> getDefaultTargetSet() {
if (defaultTargets == null) {
Set<Name> targets = new HashSet<Name>();
targets.add(names.ANNOTATION_TYPE);
targets.add(names.CONSTRUCTOR);
targets.add(names.FIELD);
targets.add(names.LOCAL_VARIABLE);
targets.add(names.METHOD);
targets.add(names.PACKAGE);
targets.add(names.PARAMETER);
targets.add(names.TYPE);
defaultTargets = java.util.Collections.unmodifiableSet(targets);
}
return defaultTargets;
}
private Set<Name> defaultTargets;
/** Checks that s is a subset of t, with respect to ElementType
* semantics, specifically {ANNOTATION_TYPE} is a subset of {TYPE}
*/
private boolean isTargetSubset(Set<Name> s, Set<Name> t) {
// Check that all elements in t are present in s
for (Name n2 : t) {
private boolean isTargetSubsetOf(Set<Name> s, Set<Name> t) {
// Check that all elements in s are present in t
for (Name n2 : s) {
boolean currentElementOk = false;
for (Name n1 : s) {
for (Name n1 : t) {
if (n1 == n2) {
currentElementOk = true;
break;
......
......@@ -229,9 +229,9 @@ public class DeferredAttr extends JCTree.Visitor {
public Type complete(DeferredType dt, ResultInfo resultInfo, DeferredAttrContext deferredAttrContext) {
switch (deferredAttrContext.mode) {
case SPECULATIVE:
Assert.check(dt.mode == null ||
(dt.mode == AttrMode.SPECULATIVE &&
dt.speculativeType(deferredAttrContext.msym, deferredAttrContext.phase).hasTag(NONE)));
//Note: if a symbol is imported twice we might do two identical
//speculative rounds...
Assert.check(dt.mode == null || dt.mode == AttrMode.SPECULATIVE);
JCTree speculativeTree = attribSpeculative(dt.tree, dt.env, resultInfo);
dt.speculativeCache.put(deferredAttrContext.msym, speculativeTree, deferredAttrContext.phase);
return speculativeTree.type;
......
......@@ -585,11 +585,7 @@ public class Infer {
Infer infer = inferenceContext.infer();
for (Type b1 : uv.getBounds(InferenceBound.UPPER)) {
for (Type b2 : uv.getBounds(InferenceBound.LOWER)) {
if (!inferenceContext.inferenceVars().contains(b1) &&
!inferenceContext.inferenceVars().contains(b2) &&
infer.types.asSuper(b2, b1.tsym) != null) {
infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1));
}
infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1));
}
}
}
......@@ -603,11 +599,7 @@ public class Infer {
Infer infer = inferenceContext.infer();
for (Type b1 : uv.getBounds(InferenceBound.UPPER)) {
for (Type b2 : uv.getBounds(InferenceBound.EQ)) {
if (!inferenceContext.inferenceVars().contains(b1) &&
!inferenceContext.inferenceVars().contains(b2) &&
infer.types.asSuper(b2, b1.tsym) != null) {
infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1));
}
infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1));
}
}
}
......@@ -621,10 +613,22 @@ public class Infer {
Infer infer = inferenceContext.infer();
for (Type b1 : uv.getBounds(InferenceBound.EQ)) {
for (Type b2 : uv.getBounds(InferenceBound.LOWER)) {
if (!inferenceContext.inferenceVars().contains(b1) &&
!inferenceContext.inferenceVars().contains(b2) &&
infer.types.asSuper(b2, b1.tsym) != null) {
infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1));
infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1));
}
}
}
},
/**
* Given a bound set containing {@code alpha == S} and {@code alpha == T}
* perform {@code S == T} (which could lead to new bounds).
*/
CROSS_EQ_EQ() {
public void apply(UndetVar uv, InferenceContext inferenceContext, Warner warn) {
Infer infer = inferenceContext.infer();
for (Type b1 : uv.getBounds(InferenceBound.EQ)) {
for (Type b2 : uv.getBounds(InferenceBound.EQ)) {
if (b1 != b2) {
infer.types.isSameType(inferenceContext.asFree(b2), inferenceContext.asFree(b1));
}
}
}
......
......@@ -1019,14 +1019,14 @@ public class LambdaToMethod extends TreeTranslator {
} else if (refSym.enclClass().isInterface()) {
return ClassFile.REF_invokeInterface;
} else {
return ClassFile.REF_invokeVirtual;
return (refSym.flags() & PRIVATE) != 0 ?
ClassFile.REF_invokeSpecial :
ClassFile.REF_invokeVirtual;
}
}
}
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Lambda/reference analyzer">\
// <editor-fold defaultstate="collapsed" desc="Lambda/reference analyzer">
/**
* This visitor collects information about translation of a lambda expression.
* More specifically, it keeps track of the enclosing contexts and captured locals
......@@ -1293,9 +1293,16 @@ public class LambdaToMethod extends TreeTranslator {
return names.lambda.append(names.fromString("" + lambdaCount++));
}
/**
* For a serializable lambda, generate a name which maximizes name
* stability across deserialization.
* @param owner
* @return Name to use for the synthetic lambda method name
*/
private Name serializedLambdaName(Symbol owner) {
StringBuilder buf = new StringBuilder();
buf.append(names.lambda);
// Append the name of the method enclosing the lambda.
String methodName = owner.name.toString();
if (methodName.equals("<clinit>"))
methodName = "static";
......@@ -1303,9 +1310,18 @@ public class LambdaToMethod extends TreeTranslator {
methodName = "new";
buf.append(methodName);
buf.append('$');
int methTypeHash = methodSig(owner.type).hashCode();
buf.append(Integer.toHexString(methTypeHash));
// Append a hash of the enclosing method signature to differentiate
// overloaded enclosing methods. For lambdas enclosed in lambdas,
// the generated lambda method will not have type yet, but the
// enclosing method's name will have been generated with this same
// method, so it will be unique and never be overloaded.
if (owner.type != null) {
int methTypeHash = methodSig(owner.type).hashCode();
buf.append(Integer.toHexString(methTypeHash));
}
buf.append('$');
// The above appended name components may not be unique, append a
// count based on the above name components.
String temp = buf.toString();
Integer count = serializableLambdaCounts.get(temp);
if (count == null) {
......@@ -1619,16 +1635,16 @@ public class LambdaToMethod extends TreeTranslator {
* Translate a symbol of a given kind into something suitable for the
* synthetic lambda body
*/
Symbol translate(String name, final Symbol sym, LambdaSymbolKind skind) {
Symbol translate(Name name, final Symbol sym, LambdaSymbolKind skind) {
switch (skind) {
case CAPTURED_THIS:
return sym; // self represented
case TYPE_VAR:
// Just erase the type var
return new VarSymbol(sym.flags(), names.fromString(name),
return new VarSymbol(sym.flags(), name,
types.erasure(sym.type), sym.owner);
case CAPTURED_VAR:
return new VarSymbol(SYNTHETIC | FINAL, names.fromString(name), types.erasure(sym.type), translatedSym) {
return new VarSymbol(SYNTHETIC | FINAL, name, types.erasure(sym.type), translatedSym) {
@Override
public Symbol baseSymbol() {
//keep mapping with original captured symbol
......@@ -1642,27 +1658,27 @@ public class LambdaToMethod extends TreeTranslator {
void addSymbol(Symbol sym, LambdaSymbolKind skind) {
Map<Symbol, Symbol> transMap = null;
String preferredName;
Name preferredName;
switch (skind) {
case CAPTURED_THIS:
transMap = capturedThis;
preferredName = "encl$" + capturedThis.size();
preferredName = names.fromString("encl$" + capturedThis.size());
break;
case CAPTURED_VAR:
transMap = capturedLocals;
preferredName = "cap$" + capturedLocals.size();
preferredName = names.fromString("cap$" + capturedLocals.size());
break;
case LOCAL_VAR:
transMap = lambdaLocals;
preferredName = sym.name.toString();
preferredName = sym.name;
break;
case PARAM:
transMap = lambdaParams;
preferredName = sym.name.toString();
preferredName = sym.name;
break;
case TYPE_VAR:
transMap = typeVars;
preferredName = sym.name.toString();
preferredName = sym.name;
break;
default: throw new AssertionError();
}
......
......@@ -2604,11 +2604,6 @@ public class Lower extends TreeTranslator {
enumDefs.appendList(otherDefs.toList());
tree.defs = enumDefs.toList();
// Add the necessary members for the EnumCompatibleMode
if (target.compilerBootstrap(tree.sym)) {
addEnumCompatibleMembers(tree);
}
}
// where
private MethodSymbol systemArraycopyMethod;
......@@ -2657,30 +2652,6 @@ public class Lower extends TreeTranslator {
olderasure.getReturnType(),
olderasure.getThrownTypes(),
syms.methodClass);
if (target.compilerBootstrap(m.owner)) {
// Initialize synthetic name field
Symbol nameVarSym = lookupSynthetic(names.fromString("$name"),
tree.sym.owner.members());
JCIdent nameIdent = make.Ident(nameParam.sym);
JCIdent id1 = make.Ident(nameVarSym);
JCAssign newAssign = make.Assign(id1, nameIdent);
newAssign.type = id1.type;
JCExpressionStatement nameAssign = make.Exec(newAssign);
nameAssign.type = id1.type;
tree.body.stats = tree.body.stats.prepend(nameAssign);
// Initialize synthetic ordinal field
Symbol ordinalVarSym = lookupSynthetic(names.fromString("$ordinal"),
tree.sym.owner.members());
JCIdent ordIdent = make.Ident(ordParam.sym);
id1 = make.Ident(ordinalVarSym);
newAssign = make.Assign(id1, ordIdent);
newAssign.type = id1.type;
JCExpressionStatement ordinalAssign = make.Exec(newAssign);
ordinalAssign.type = id1.type;
tree.body.stats = tree.body.stats.prepend(ordinalAssign);
}
}
JCMethodDecl prevMethodDef = currentMethodDef;
......@@ -3434,14 +3405,16 @@ public class Lower extends TreeTranslator {
tree.expr = make.TypeCast(types.erasure(iterableType), tree.expr);
Symbol iterator = lookupMethod(tree.expr.pos(),
names.iterator,
types.erasure(syms.iterableType),
eType,
List.<Type>nil());
VarSymbol itvar = new VarSymbol(0, names.fromString("i" + target.syntheticNameChar()),
types.erasure(iterator.type.getReturnType()),
currentMethodSym);
JCStatement init = make.
VarDef(itvar,
make.App(make.Select(tree.expr, iterator)));
JCStatement init = make.
VarDef(itvar, make.App(make.Select(tree.expr, iterator)
.setType(types.erasure(iterator.type))));
Symbol hasNext = lookupMethod(tree.expr.pos(),
names.hasNext,
itvar.type,
......@@ -3886,168 +3859,4 @@ public class Lower extends TreeTranslator {
}
return translated.toList();
}
//////////////////////////////////////////////////////////////
// The following contributed by Borland for bootstrapping purposes
//////////////////////////////////////////////////////////////
private void addEnumCompatibleMembers(JCClassDecl cdef) {
make_at(null);
// Add the special enum fields
VarSymbol ordinalFieldSym = addEnumOrdinalField(cdef);
VarSymbol nameFieldSym = addEnumNameField(cdef);
// Add the accessor methods for name and ordinal
MethodSymbol ordinalMethodSym = addEnumFieldOrdinalMethod(cdef, ordinalFieldSym);
MethodSymbol nameMethodSym = addEnumFieldNameMethod(cdef, nameFieldSym);
// Add the toString method
addEnumToString(cdef, nameFieldSym);
// Add the compareTo method
addEnumCompareTo(cdef, ordinalFieldSym);
}
private VarSymbol addEnumOrdinalField(JCClassDecl cdef) {
VarSymbol ordinal = new VarSymbol(PRIVATE|FINAL|SYNTHETIC,
names.fromString("$ordinal"),
syms.intType,
cdef.sym);
cdef.sym.members().enter(ordinal);
cdef.defs = cdef.defs.prepend(make.VarDef(ordinal, null));
return ordinal;
}
private VarSymbol addEnumNameField(JCClassDecl cdef) {
VarSymbol name = new VarSymbol(PRIVATE|FINAL|SYNTHETIC,
names.fromString("$name"),
syms.stringType,
cdef.sym);
cdef.sym.members().enter(name);
cdef.defs = cdef.defs.prepend(make.VarDef(name, null));
return name;
}
private MethodSymbol addEnumFieldOrdinalMethod(JCClassDecl cdef, VarSymbol ordinalSymbol) {
// Add the accessor methods for ordinal
Symbol ordinalSym = lookupMethod(cdef.pos(),
names.ordinal,
cdef.type,
List.<Type>nil());
Assert.check(ordinalSym instanceof MethodSymbol);
JCStatement ret = make.Return(make.Ident(ordinalSymbol));
cdef.defs = cdef.defs.append(make.MethodDef((MethodSymbol)ordinalSym,
make.Block(0L, List.of(ret))));
return (MethodSymbol)ordinalSym;
}
private MethodSymbol addEnumFieldNameMethod(JCClassDecl cdef, VarSymbol nameSymbol) {
// Add the accessor methods for name
Symbol nameSym = lookupMethod(cdef.pos(),
names._name,
cdef.type,
List.<Type>nil());
Assert.check(nameSym instanceof MethodSymbol);
JCStatement ret = make.Return(make.Ident(nameSymbol));
cdef.defs = cdef.defs.append(make.MethodDef((MethodSymbol)nameSym,
make.Block(0L, List.of(ret))));
return (MethodSymbol)nameSym;
}
private MethodSymbol addEnumToString(JCClassDecl cdef,
VarSymbol nameSymbol) {
Symbol toStringSym = lookupMethod(cdef.pos(),
names.toString,
cdef.type,
List.<Type>nil());
JCTree toStringDecl = null;
if (toStringSym != null)
toStringDecl = TreeInfo.declarationFor(toStringSym, cdef);
if (toStringDecl != null)
return (MethodSymbol)toStringSym;
JCStatement ret = make.Return(make.Ident(nameSymbol));
JCTree resTypeTree = make.Type(syms.stringType);
MethodType toStringType = new MethodType(List.<Type>nil(),
syms.stringType,
List.<Type>nil(),
cdef.sym);
toStringSym = new MethodSymbol(PUBLIC,
names.toString,
toStringType,
cdef.type.tsym);
toStringDecl = make.MethodDef((MethodSymbol)toStringSym,
make.Block(0L, List.of(ret)));
cdef.defs = cdef.defs.prepend(toStringDecl);
cdef.sym.members().enter(toStringSym);
return (MethodSymbol)toStringSym;
}
private MethodSymbol addEnumCompareTo(JCClassDecl cdef, VarSymbol ordinalSymbol) {
Symbol compareToSym = lookupMethod(cdef.pos(),
names.compareTo,
cdef.type,
List.of(cdef.sym.type));
Assert.check(compareToSym instanceof MethodSymbol);
JCMethodDecl compareToDecl = (JCMethodDecl) TreeInfo.declarationFor(compareToSym, cdef);
ListBuffer<JCStatement> blockStatements = new ListBuffer<JCStatement>();
JCModifiers mod1 = make.Modifiers(0L);
Name oName = names.fromString("o");
JCVariableDecl par1 = make.Param(oName, cdef.type, compareToSym);
JCIdent paramId1 = make.Ident(names.java_lang_Object);
paramId1.type = cdef.type;
paramId1.sym = par1.sym;
((MethodSymbol)compareToSym).params = List.of(par1.sym);
JCIdent par1UsageId = make.Ident(par1.sym);
JCIdent castTargetIdent = make.Ident(cdef.sym);
JCTypeCast cast = make.TypeCast(castTargetIdent, par1UsageId);
cast.setType(castTargetIdent.type);
Name otherName = names.fromString("other");
VarSymbol otherVarSym = new VarSymbol(mod1.flags,
otherName,
cdef.type,
compareToSym);
JCVariableDecl otherVar = make.VarDef(otherVarSym, cast);
blockStatements.append(otherVar);
JCIdent id1 = make.Ident(ordinalSymbol);
JCIdent fLocUsageId = make.Ident(otherVarSym);
JCExpression sel = make.Select(fLocUsageId, ordinalSymbol);
JCBinary bin = makeBinary(MINUS, id1, sel);
JCReturn ret = make.Return(bin);
blockStatements.append(ret);
JCMethodDecl compareToMethod = make.MethodDef((MethodSymbol)compareToSym,
make.Block(0L,
blockStatements.toList()));
compareToMethod.params = List.of(par1);
cdef.defs = cdef.defs.append(compareToMethod);
return (MethodSymbol)compareToSym;
}
//////////////////////////////////////////////////////////////
// The above contributed by Borland for bootstrapping purposes
//////////////////////////////////////////////////////////////
}
......@@ -473,44 +473,6 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
null, //make.Block(0, Tree.emptyList.prepend(make.Return(make.Ident(names._null)))),
null);
memberEnter(valueOf, env);
// the remaining members are for bootstrapping only
if (!target.compilerBootstrap(tree.sym)) return;
// public final int ordinal() { return ???; }
JCMethodDecl ordinal = make.at(tree.pos).
MethodDef(make.Modifiers(Flags.PUBLIC|Flags.FINAL),
names.ordinal,
make.Type(syms.intType),
List.<JCTypeParameter>nil(),
List.<JCVariableDecl>nil(),
List.<JCExpression>nil(),
null,
null);
memberEnter(ordinal, env);
// public final String name() { return ???; }
JCMethodDecl name = make.
MethodDef(make.Modifiers(Flags.PUBLIC|Flags.FINAL),
names._name,
make.Type(syms.stringType),
List.<JCTypeParameter>nil(),
List.<JCVariableDecl>nil(),
List.<JCExpression>nil(),
null,
null);
memberEnter(name, env);
// public int compareTo(E other) { return ???; }
MethodSymbol compareTo = new
MethodSymbol(Flags.PUBLIC,
names.compareTo,
new MethodType(List.of(tree.sym.type),
syms.intType,
List.<Type>nil(),
syms.methodClass),
tree.sym);
memberEnter(make.MethodDef(compareTo, null), env);
}
public void visitTopLevel(JCCompilationUnit tree) {
......@@ -936,7 +898,7 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
Type supertype =
(tree.extending != null)
? attr.attribBase(tree.extending, baseEnv, true, false, true)
: ((tree.mods.flags & Flags.ENUM) != 0 && !target.compilerBootstrap(c))
: ((tree.mods.flags & Flags.ENUM) != 0)
? attr.attribBase(enumBase(tree.pos, c), baseEnv,
true, false, false)
: (c.fullname == names.java_lang_Object)
......@@ -949,16 +911,6 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
ListBuffer<Type> all_interfaces = null; // lazy init
Set<Type> interfaceSet = new HashSet<Type>();
List<JCExpression> interfaceTrees = tree.implementing;
if ((tree.mods.flags & Flags.ENUM) != 0 && target.compilerBootstrap(c)) {
// add interface Comparable<T>
interfaceTrees =
interfaceTrees.prepend(make.Type(new ClassType(syms.comparableType.getEnclosingType(),
List.of(c.type),
syms.comparableType.tsym)));
// add interface Serializable
interfaceTrees =
interfaceTrees.prepend(make.Type(syms.serializableType));
}
for (JCExpression iface : interfaceTrees) {
Type i = attr.attribBase(iface, baseEnv, false, true, true);
if (i.hasTag(CLASS)) {
......@@ -1401,8 +1353,7 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
if (c.type != syms.objectType)
stats = stats.prepend(SuperCall(make, typarams, params, based));
if ((c.flags() & ENUM) != 0 &&
(types.supertype(c.type).tsym == syms.enumSym ||
target.compilerBootstrap(c))) {
(types.supertype(c.type).tsym == syms.enumSym)) {
// constructors of true enums are private
flags = (flags & ~AccessFlags) | PRIVATE | GENERATEDCONSTR;
} else
......
/*
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2013, 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
......@@ -48,17 +48,6 @@ public enum Target {
/** J2SE1.4 = Merlin. */
JDK1_4("1.4", 48, 0),
/** Support for the JSR14 prototype compiler (targeting 1.4 VMs
* augmented with a few support classes). This is a transitional
* option that will not be supported in the product. */
JSR14("jsr14", 48, 0),
/** The following are undocumented transitional targets that we
* had used to test VM fixes in update releases. We do not
* promise to retain support for them. */
JDK1_4_1("1.4.1", 48, 0),
JDK1_4_2("1.4.2", 48, 0),
/** Tiger. */
JDK1_5("1.5", 49, 0),
......@@ -175,23 +164,23 @@ public enum Target {
return compareTo(JDK1_5) >= 0;
}
/** Beginning in -target 1.4.2, we make synthetic variables
/** Beginning in -target 1.5, we make synthetic variables
* package-private instead of private. This is to prevent the
* necessity of access methods, which effectively relax the
* protection of the field but bloat the class files and affect
* execution.
*/
public boolean usePrivateSyntheticFields() {
return compareTo(JDK1_4_2) < 0;
return compareTo(JDK1_5) < 0;
}
/** Sometimes we need to create a field to cache a value like a
* class literal of the assertions flag. In -target 1.4.2 and
* class literal of the assertions flag. In -target 1.5 and
* later we create a new synthetic class for this instead of
* using the outermost class. See 4401576.
*/
public boolean useInnerCacheClass() {
return compareTo(JDK1_4_2) >= 0;
return compareTo(JDK1_5) >= 0;
}
/** Return true if cldc-style stack maps need to be generated. */
......@@ -276,7 +265,7 @@ public enum Target {
* See 4468823
*/
public boolean classLiteralsNoInit() {
return compareTo(JDK1_4_2) >= 0;
return compareTo(JDK1_5) >= 0;
}
/** Although we may not have support for class literals, when we
......@@ -300,22 +289,10 @@ public enum Target {
return compareTo(JDK1_5) >= 0;
}
/** For bootstrapping javac only, we do without java.lang.Enum if
* necessary.
*/
public boolean compilerBootstrap(Symbol c) {
return
this == JSR14 &&
(c.flags() & Flags.ENUM) != 0 &&
c.flatName().toString().startsWith("com.sun.tools.")
// && !Target.class.getSuperclass().getName().equals("java.lang.Enum")
;
}
/** In J2SE1.5.0, we introduced the "EnclosingMethod" attribute
* for improved reflection support.
*/
public boolean hasEnclosingMethodAttribute() {
return compareTo(JDK1_5) >= 0 || this == JSR14;
return compareTo(JDK1_5) >= 0;
}
}
/*
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, 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
......@@ -273,7 +273,7 @@ public class AnnotationProxyMaker {
/**
* ExceptionProxy for MirroredTypeException.
* The toString, hashCode, and equals methods foward to the underlying
* The toString, hashCode, and equals methods forward to the underlying
* type.
*/
private static final class MirroredTypeExceptionProxy extends ExceptionProxy {
......
/*
* Copyright (c) 2005, 2013, 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 com.sun.tools.javac.model;
import java.lang.annotation.Annotation;
import java.lang.annotation.Inherited;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import com.sun.tools.javac.code.Attribute;
import com.sun.tools.javac.code.Kinds;
import com.sun.tools.javac.code.Symbol;
import com.sun.tools.javac.code.Symbol.ClassSymbol;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.Type.AnnotatedType;
import com.sun.tools.javac.util.ListBuffer;
import static com.sun.tools.javac.code.TypeTag.CLASS;
/**
* Utility methods for operating on annotated constructs.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p>
*/
public class JavacAnnoConstructs {
// <editor-fold defaultstate="collapsed" desc="Symbols">
/**
* An internal-use utility that creates a runtime view of an
* annotation. This is the implementation of
* Element.getAnnotation(Class).
*/
public static <A extends Annotation> A getAnnotation(Symbol annotated,
Class<A> annoType) {
if (!annoType.isAnnotation())
throw new IllegalArgumentException("Not an annotation type: "
+ annoType);
Attribute.Compound c;
if (annotated.kind == Kinds.TYP && annotated instanceof ClassSymbol) {
c = getAttributeOnClass((ClassSymbol)annotated, annoType);
} else {
c = getAttribute(annotated, annoType);
}
return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType);
}
// Helper to getAnnotation[s]
private static <A extends Annotation> Attribute.Compound getAttribute(Symbol annotated,
Class<A> annoType) {
String name = annoType.getName();
for (Attribute.Compound anno : annotated.getRawAttributes()) {
if (name.equals(anno.type.tsym.flatName().toString()))
return anno;
}
return null;
}
// Helper to getAnnotation[s]
private static <A extends Annotation> Attribute.Compound getAttributeOnClass(ClassSymbol annotated,
Class<A> annoType) {
boolean inherited = annoType.isAnnotationPresent(Inherited.class);
Attribute.Compound result = null;
while (annotated.name != annotated.name.table.names.java_lang_Object) {
result = getAttribute(annotated, annoType);
if (result != null || !inherited)
break;
Type sup = annotated.getSuperclass();
if (!sup.hasTag(CLASS) || sup.isErroneous())
break;
annotated = (ClassSymbol) sup.tsym;
}
return result;
}
/**
* An internal-use utility that creates a runtime view of
* annotations. This is the implementation of
* Element.getAnnotations(Class).
*/
public static <A extends Annotation> A[] getAnnotations(Symbol annotated,
Class<A> annoType) {
if (!annoType.isAnnotation())
throw new IllegalArgumentException("Not an annotation type: "
+ annoType);
// If annoType does not declare a container this is equivalent to wrapping
// getAnnotation(...) in an array.
Class <? extends Annotation> containerType = getContainer(annoType);
if (containerType == null) {
A res = getAnnotation(annotated, annoType);
int size;
if (res == null) {
size = 0;
} else {
size = 1;
}
@SuppressWarnings("unchecked") // annoType is the Class for A
A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
if (res != null)
arr[0] = res;
return arr;
}
// So we have a containing type
String name = annoType.getName();
String annoTypeName = annoType.getSimpleName();
String containerTypeName = containerType.getSimpleName();
int directIndex = -1, containerIndex = -1;
Attribute.Compound direct = null, container = null;
Attribute.Compound[] rawAttributes = annotated.getRawAttributes().toArray(new Attribute.Compound[0]);
// Find directly present annotations
for (int i = 0; i < rawAttributes.length; i++) {
if (annoTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
directIndex = i;
direct = rawAttributes[i];
} else if(containerTypeName != null &&
containerTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
containerIndex = i;
container = rawAttributes[i];
}
}
// Deal with inherited annotations
if (annotated.kind == Kinds.TYP &&
(annotated instanceof ClassSymbol)) {
ClassSymbol s = (ClassSymbol)annotated;
if (direct == null && container == null) {
direct = getAttributeOnClass(s, annoType);
container = getAttributeOnClass(s, containerType);
// both are inherited and found, put container last
if (direct != null && container != null) {
directIndex = 0;
containerIndex = 1;
} else if (direct != null) {
directIndex = 0;
} else {
containerIndex = 0;
}
} else if (direct == null) {
direct = getAttributeOnClass(s, annoType);
if (direct != null)
directIndex = containerIndex + 1;
} else if (container == null) {
container = getAttributeOnClass(s, containerType);
if (container != null)
containerIndex = directIndex + 1;
}
}
// Pack them in an array
Attribute[] contained0 = new Attribute[0];
if (container != null)
contained0 = unpackAttributes(container);
ListBuffer<Attribute.Compound> compounds = ListBuffer.lb();
for (Attribute a : contained0)
if (a instanceof Attribute.Compound)
compounds = compounds.append((Attribute.Compound)a);
Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[0]);
int size = (direct == null ? 0 : 1) + contained.length;
@SuppressWarnings("unchecked") // annoType is the Class for A
A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
// if direct && container, which is first?
int insert = -1;
int length = arr.length;
if (directIndex >= 0 && containerIndex >= 0) {
if (directIndex < containerIndex) {
arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
insert = 1;
} else {
arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
insert = 0;
length--;
}
} else if (directIndex >= 0) {
arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
return arr;
} else {
// Only container
insert = 0;
}
for (int i = 0; i + insert < length; i++)
arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType);
return arr;
}
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Types">
/**
* An internal-use utility that creates a runtime view of an
* annotation. This is the implementation of
* TypeMirror.getAnnotation(Class).
*/
public static <A extends Annotation> A getAnnotation(AnnotatedType annotated, Class<A> annoType) {
if (!annoType.isAnnotation())
throw new IllegalArgumentException("Not an annotation type: "
+ annoType);
Attribute.Compound c = getAttribute(annotated, annoType);
return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType);
}
// Helper to getAnnotation[s]
private static <A extends Annotation> Attribute.Compound getAttribute(Type annotated,
Class<A> annoType) {
String name = annoType.getName();
for (Attribute.Compound anno : annotated.getAnnotationMirrors()) {
if (name.equals(anno.type.tsym.flatName().toString()))
return anno;
}
return null;
}
/**
* An internal-use utility that creates a runtime view of
* annotations. This is the implementation of
* TypeMirror.getAnnotationsByType(Class).
*/
public static <A extends Annotation> A[] getAnnotationsByType(AnnotatedType annotated, Class<A> annoType) {
if (!annoType.isAnnotation())
throw new IllegalArgumentException("Not an annotation type: "
+ annoType);
// If annoType does not declare a container this is equivalent to wrapping
// getAnnotation(...) in an array.
Class <? extends Annotation> containerType = getContainer(annoType);
if (containerType == null) {
A res = getAnnotation(annotated, annoType);
int size;
if (res == null) {
size = 0;
} else {
size = 1;
}
@SuppressWarnings("unchecked") // annoType is the Class for A
A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
if (res != null)
arr[0] = res;
return arr;
}
// So we have a containing type
String name = annoType.getName();
String annoTypeName = annoType.getSimpleName();
String containerTypeName = containerType.getSimpleName();
int directIndex = -1, containerIndex = -1;
Attribute.Compound direct = null, container = null;
Attribute.Compound[] rawAttributes = annotated.getAnnotationMirrors().toArray(new Attribute.Compound[0]);
// Find directly present annotations
for (int i = 0; i < rawAttributes.length; i++) {
if (annoTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
directIndex = i;
direct = rawAttributes[i];
} else if(containerTypeName != null &&
containerTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
containerIndex = i;
container = rawAttributes[i];
}
}
// Pack them in an array
Attribute[] contained0 = new Attribute[0];
if (container != null)
contained0 = unpackAttributes(container);
ListBuffer<Attribute.Compound> compounds = ListBuffer.lb();
for (Attribute a : contained0) {
if (a instanceof Attribute.Compound)
compounds = compounds.append((Attribute.Compound)a);
}
Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[0]);
int size = (direct == null ? 0 : 1) + contained.length;
@SuppressWarnings("unchecked") // annoType is the Class for A
A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
// if direct && container, which is first?
int insert = -1;
int length = arr.length;
if (directIndex >= 0 && containerIndex >= 0) {
if (directIndex < containerIndex) {
arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
insert = 1;
} else {
arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
insert = 0;
length--;
}
} else if (directIndex >= 0) {
arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
return arr;
} else {
// Only container
insert = 0;
}
for (int i = 0; i + insert < length; i++)
arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType);
return arr;
}
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Container support">
// Needed to unpack the runtime view of containing annotations
private static final Class<? extends Annotation> REPEATABLE_CLASS = initRepeatable();
private static final Method VALUE_ELEMENT_METHOD = initValueElementMethod();
private static Class<? extends Annotation> initRepeatable() {
try {
// Repeatable will not be available when bootstrapping on
// JDK 7 so use a reflective lookup instead of a class
// literal for Repeatable.class.
return Class.forName("java.lang.annotation.Repeatable").asSubclass(Annotation.class);
} catch (ClassNotFoundException e) {
return null;
} catch (SecurityException e) {
return null;
}
}
private static Method initValueElementMethod() {
if (REPEATABLE_CLASS == null)
return null;
Method m = null;
try {
m = REPEATABLE_CLASS.getMethod("value");
if (m != null)
m.setAccessible(true);
return m;
} catch (NoSuchMethodException e) {
return null;
}
}
// Helper to getAnnotations
private static Class<? extends Annotation> getContainer(Class<? extends Annotation> annoType) {
// Since we can not refer to java.lang.annotation.Repeatable until we are
// bootstrapping with java 8 we need to get the Repeatable annotation using
// reflective invocations instead of just using its type and element method.
if (REPEATABLE_CLASS != null &&
VALUE_ELEMENT_METHOD != null) {
// Get the Repeatable instance on the annotations declaration
Annotation repeatable = (Annotation)annoType.getAnnotation(REPEATABLE_CLASS);
if (repeatable != null) {
try {
// Get the value element, it should be a class
// indicating the containing annotation type
@SuppressWarnings("unchecked")
Class<? extends Annotation> containerType = (Class)VALUE_ELEMENT_METHOD.invoke(repeatable);
if (containerType == null)
return null;
return containerType;
} catch (ClassCastException e) {
return null;
} catch (IllegalAccessException e) {
return null;
} catch (InvocationTargetException e ) {
return null;
}
}
}
return null;
}
// Helper to getAnnotations
private static Attribute[] unpackAttributes(Attribute.Compound container) {
// We now have an instance of the container,
// unpack it returning an instance of the
// contained type or null
return ((Attribute.Array)container.member(container.type.tsym.name.table.names.value)).values;
}
// </editor-fold>
}
......@@ -25,10 +25,6 @@
package com.sun.tools.javac.model;
import java.lang.annotation.Annotation;
import java.lang.annotation.Inherited;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Map;
import javax.lang.model.SourceVersion;
......@@ -40,7 +36,6 @@ import static javax.lang.model.util.ElementFilter.methodsIn;
import com.sun.tools.javac.code.*;
import com.sun.tools.javac.code.Symbol.*;
import com.sun.tools.javac.code.TypeTag;
import com.sun.tools.javac.comp.AttrContext;
import com.sun.tools.javac.comp.Enter;
import com.sun.tools.javac.comp.Env;
......@@ -98,237 +93,6 @@ public class JavacElements implements Elements {
enter = Enter.instance(context);
}
/**
* An internal-use utility that creates a runtime view of an
* annotation. This is the implementation of
* Element.getAnnotation(Class).
*/
public static <A extends Annotation> A getAnnotation(Symbol annotated,
Class<A> annoType) {
if (!annoType.isAnnotation())
throw new IllegalArgumentException("Not an annotation type: "
+ annoType);
Attribute.Compound c;
if (annotated.kind == Kinds.TYP && annotated instanceof ClassSymbol) {
c = getAttributeOnClass((ClassSymbol)annotated, annoType);
} else {
c = getAttribute(annotated, annoType);
}
return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType);
}
// Helper to getAnnotation[s]
private static <A extends Annotation> Attribute.Compound getAttribute(Symbol annotated,
Class<A> annoType) {
String name = annoType.getName();
for (Attribute.Compound anno : annotated.getRawAttributes())
if (name.equals(anno.type.tsym.flatName().toString()))
return anno;
return null;
}
// Helper to getAnnotation[s]
private static <A extends Annotation> Attribute.Compound getAttributeOnClass(ClassSymbol annotated,
Class<A> annoType) {
boolean inherited = annoType.isAnnotationPresent(Inherited.class);
Attribute.Compound result = null;
while (annotated.name != annotated.name.table.names.java_lang_Object) {
result = getAttribute(annotated, annoType);
if (result != null || !inherited)
break;
Type sup = annotated.getSuperclass();
if (!sup.hasTag(CLASS) || sup.isErroneous())
break;
annotated = (ClassSymbol) sup.tsym;
}
return result;
}
/**
* An internal-use utility that creates a runtime view of
* annotations. This is the implementation of
* Element.getAnnotations(Class).
*/
public static <A extends Annotation> A[] getAnnotations(Symbol annotated,
Class<A> annoType) {
if (!annoType.isAnnotation())
throw new IllegalArgumentException("Not an annotation type: "
+ annoType);
// If annoType does not declare a container this is equivalent to wrapping
// getAnnotation(...) in an array.
Class <? extends Annotation> containerType = getContainer(annoType);
if (containerType == null) {
A res = getAnnotation(annotated, annoType);
int size;
if (res == null) {
size = 0;
} else {
size = 1;
}
@SuppressWarnings("unchecked") // annoType is the Class for A
A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
if (res != null)
arr[0] = res;
return arr;
}
// So we have a containing type
String name = annoType.getName();
String annoTypeName = annoType.getSimpleName();
String containerTypeName = containerType.getSimpleName();
int directIndex = -1, containerIndex = -1;
Attribute.Compound direct = null, container = null;
Attribute.Compound[] rawAttributes = annotated.getRawAttributes().toArray(new Attribute.Compound[0]);
// Find directly present annotations
for (int i = 0; i < rawAttributes.length; i++) {
if (annoTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
directIndex = i;
direct = rawAttributes[i];
} else if(containerTypeName != null &&
containerTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
containerIndex = i;
container = rawAttributes[i];
}
}
// Deal with inherited annotations
if (annotated.kind == Kinds.TYP &&
(annotated instanceof ClassSymbol)) {
ClassSymbol s = (ClassSymbol)annotated;
if (direct == null && container == null) {
direct = getAttributeOnClass(s, annoType);
container = getAttributeOnClass(s, containerType);
// both are inherited and found, put container last
if (direct != null && container != null) {
directIndex = 0;
containerIndex = 1;
} else if (direct != null) {
directIndex = 0;
} else {
containerIndex = 0;
}
} else if (direct == null) {
direct = getAttributeOnClass(s, annoType);
if (direct != null)
directIndex = containerIndex + 1;
} else if (container == null) {
container = getAttributeOnClass(s, containerType);
if (container != null)
containerIndex = directIndex + 1;
}
}
// Pack them in an array
Attribute[] contained0 = new Attribute[0];
if (container != null)
contained0 = unpackAttributes(container);
ListBuffer<Attribute.Compound> compounds = ListBuffer.lb();
for (Attribute a : contained0)
if (a instanceof Attribute.Compound)
compounds = compounds.append((Attribute.Compound)a);
Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[0]);
int size = (direct == null ? 0 : 1) + contained.length;
@SuppressWarnings("unchecked") // annoType is the Class for A
A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size);
// if direct && container, which is first?
int insert = -1;
int length = arr.length;
if (directIndex >= 0 && containerIndex >= 0) {
if (directIndex < containerIndex) {
arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
insert = 1;
} else {
arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
insert = 0;
length--;
}
} else if (directIndex >= 0) {
arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType);
return arr;
} else {
// Only container
insert = 0;
}
for (int i = 0; i + insert < length; i++)
arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType);
return arr;
}
// Needed to unpack the runtime view of containing annotations
private static final Class<? extends Annotation> REPEATABLE_CLASS = initRepeatable();
private static final Method VALUE_ELEMENT_METHOD = initValueElementMethod();
private static Class<? extends Annotation> initRepeatable() {
try {
// Repeatable will not be available when bootstrapping on
// JDK 7 so use a reflective lookup instead of a class
// literal for Repeatable.class.
return Class.forName("java.lang.annotation.Repeatable").asSubclass(Annotation.class);
} catch (ClassNotFoundException e) {
return null;
} catch (SecurityException e) {
return null;
}
}
private static Method initValueElementMethod() {
if (REPEATABLE_CLASS == null)
return null;
Method m = null;
try {
m = REPEATABLE_CLASS.getMethod("value");
if (m != null)
m.setAccessible(true);
return m;
} catch (NoSuchMethodException e) {
return null;
}
}
// Helper to getAnnotations
private static Class<? extends Annotation> getContainer(Class<? extends Annotation> annoType) {
// Since we can not refer to java.lang.annotation.Repeatable until we are
// bootstrapping with java 8 we need to get the Repeatable annotation using
// reflective invocations instead of just using its type and element method.
if (REPEATABLE_CLASS != null &&
VALUE_ELEMENT_METHOD != null) {
// Get the Repeatable instance on the annotations declaration
Annotation repeatable = (Annotation)annoType.getAnnotation(REPEATABLE_CLASS);
if (repeatable != null) {
try {
// Get the value element, it should be a class
// indicating the containing annotation type
@SuppressWarnings("unchecked")
Class<? extends Annotation> containerType = (Class)VALUE_ELEMENT_METHOD.invoke(repeatable);
if (containerType == null)
return null;
return containerType;
} catch (ClassCastException e) {
return null;
} catch (IllegalAccessException e) {
return null;
} catch (InvocationTargetException e ) {
return null;
}
}
}
return null;
}
// Helper to getAnnotations
private static Attribute[] unpackAttributes(Attribute.Compound container) {
// We now have an instance of the container,
// unpack it returning an instance of the
// contained type or null
return ((Attribute.Array)container.member(container.type.tsym.name.table.names.value)).values;
}
public PackageSymbol getPackageElement(CharSequence name) {
String strName = name.toString();
if (strName.equals(""))
......
......@@ -25,7 +25,6 @@
package com.sun.tools.javac.model;
import java.lang.annotation.Annotation;
import java.util.Collections;
import java.util.EnumSet;
import java.util.LinkedHashSet;
......@@ -333,28 +332,4 @@ public class JavacTypes implements javax.lang.model.util.Types {
return results;
}
public List<? extends AnnotationMirror> typeAnnotationsOf(TypeMirror type) {
// TODO: these methods can be removed.
return null; // ((Type)type).typeAnnotations;
}
public <A extends Annotation> A typeAnnotationOf(TypeMirror type,
Class<A> annotationType) {
// TODO: these methods can be removed.
return null; // JavacElements.getAnnotation(((Type)type).typeAnnotations, annotationType);
}
public TypeMirror receiverTypeOf(ExecutableType type) {
return ((Type)type).asMethodType().recvtype;
}
/*
public <A extends Annotation> A receiverTypeAnnotationOf(
ExecutableType type, Class<A> annotationType) {
return JavacElements.getAnnotation(
((Type)type).asMethodType().receiverTypeAnnotations,
annotationType);
}*/
}
#
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2012, 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
......@@ -30,7 +30,7 @@ javac.opt.g.none=\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u3092\u751F\u6210\u3057\u3
javac.opt.g.lines.vars.source=\u3044\u304F\u3064\u304B\u306E\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u306E\u307F\u3092\u751F\u6210\u3059\u308B
javac.opt.nowarn=\u8B66\u544A\u3092\u767A\u751F\u3055\u305B\u306A\u3044
javac.opt.verbose=\u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u52D5\u4F5C\u306B\u3064\u3044\u3066\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B
javac.opt.deprecation=\u63A8\u5968\u3055\u308C\u306A\u3044API\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30BD\u30FC\u30B9\u306E\u4F4D\u7F6E\u3092\u51FA\u529B\u3059\u308B
javac.opt.deprecation=\u975E\u63A8\u5968\u306EAPI\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30BD\u30FC\u30B9\u306E\u4F4D\u7F6E\u3092\u51FA\u529B\u3059\u308B
javac.opt.classpath=\u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304A\u3088\u3073\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B
javac.opt.sourcepath=\u5165\u529B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B
javac.opt.bootclasspath=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B
......@@ -40,9 +40,11 @@ javac.opt.endorseddirs=\u63A8\u5968\u898F\u683C\u30D1\u30B9\u306E\u4F4D\u7F6E\u3
javac.opt.extdirs=\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u62E1\u5F35\u6A5F\u80FD\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B
javac.opt.processorpath=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B
javac.opt.processor=\u5B9F\u884C\u3059\u308B\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u306E\u540D\u524D\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u691C\u51FA\u51E6\u7406\u3092\u30D0\u30A4\u30D1\u30B9
javac.opt.parameters=\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u30EA\u30D5\u30EC\u30AF\u30B7\u30E7\u30F3\u7528\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u751F\u6210\u3057\u307E\u3059
javac.opt.proc.none.only=\u6CE8\u91C8\u51E6\u7406\u3084\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002
javac.opt.d=\u751F\u6210\u3055\u308C\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u683C\u7D0D\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B
javac.opt.sourceDest=\u751F\u6210\u3055\u308C\u305F\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u683C\u7D0D\u3059\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B
javac.opt.headerDest=\u751F\u6210\u3055\u308C\u305F\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u683C\u7D0D\u3059\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B
javac.opt.J=<flag>\u3092\u5B9F\u884C\u30B7\u30B9\u30C6\u30E0\u306B\u76F4\u63A5\u6E21\u3059
javac.opt.encoding=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u4F7F\u7528\u3059\u308B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B
javac.opt.target=\u7279\u5B9A\u306EVM\u30D0\u30FC\u30B8\u30E7\u30F3\u7528\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B
......@@ -61,6 +63,8 @@ javac.opt.arg.directory=<directory>
javac.opt.arg.encoding=<encoding>
javac.opt.arg.release=<release>
javac.opt.arg.number=<number>
javac.opt.plugin=\u5B9F\u884C\u3055\u308C\u308B\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u540D\u524D\u3068\u30AA\u30D7\u30B7\u30E7\u30F3\u5F15\u6570
javac.opt.arg.plugin="name args"
## extended options
......@@ -80,6 +84,9 @@ javac.opt.arg.pathname=<pathname>
javac.opt.arg.file=<filename>
javac.opt.Xlint=\u63A8\u5968\u306E\u8B66\u544A\u3092\u6709\u52B9\u306B\u3059\u308B
javac.opt.Xlint.suboptlist=\u7279\u5B9A\u306E\u8B66\u544A\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3059\u308B
javac.opt.Xdoclint=javadoc\u30B3\u30E1\u30F3\u30C8\u306E\u554F\u984C\u306B\u95A2\u3059\u308B\u63A8\u5968\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B
javac.opt.Xdoclint.subopts = (all|[-]<group>)[/<access>]
javac.opt.Xdoclint.custom=\n javadoc\u30B3\u30E1\u30F3\u30C8\u306E\u554F\u984C\u306B\u95A2\u3059\u308B\u7279\u5B9A\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002\n \u3053\u3053\u3067\u3001<group>\u306Faccessibility\u3001html\u3001reference\u307E\u305F\u306Fsyntax\u306E\u3044\u305A\u308C\u304B\u3067\u3001\n <access>\u306Fpublic\u3001protected\u3001package\u307E\u305F\u306Fprivate\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002
javac.opt.Xstdout=\u6A19\u6E96\u51FA\u529B\u3092\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3059\u308B
javac.opt.X=\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B
javac.opt.help=\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B
......@@ -107,6 +114,7 @@ javac.err.dir.not.found=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u3042\u308A\u
javac.err.file.not.found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
javac.err.file.not.directory=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}
javac.err.file.not.file=\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}
javac.msg.plugin.not.found=\u30D7\u30E9\u30B0\u30A4\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
## messages
javac.msg.usage.header=\u4F7F\u7528\u65B9\u6CD5: {0} <options> <source files>\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002
......@@ -117,11 +125,13 @@ javac.msg.usage.nonstandard.footer=\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u3
javac.msg.bug=\u30B3\u30F3\u30D1\u30A4\u30E9\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002Bug Parade\u306B\u540C\u3058\u30D0\u30B0\u304C\u767B\u9332\u3055\u308C\u3066\u3044\u306A\u3044\u3053\u3068\u3092\u3054\u78BA\u8A8D\u306E\u4E0A\u3001Java Developer Connection(http://java.sun.com/webapps/bugreport)\u3067\u30D0\u30B0\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u4E0B\u8A18\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002
javac.msg.io=\n\n\u5165\u51FA\u529B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n
javac.msg.io=\n\n\u5165\u51FA\u529B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n
javac.msg.proc.annotation.uncaught.exception=\n\n\u6CE8\u91C8\u51E6\u7406\u3067\u6355\u6349\u3055\u308C\u306A\u3044\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n
javac.msg.proc.annotation.uncaught.exception=\n\n\u6CE8\u91C8\u51E6\u7406\u3067\u6355\u6349\u3055\u308C\u306A\u3044\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n
javac.msg.resource=\n\n\u30B7\u30B9\u30C6\u30E0\u30FB\u30EA\u30BD\u30FC\u30B9\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n
javac.msg.plugin.uncaught.exception=\n\n\u30D7\u30E9\u30B0\u30A4\u30F3\u3067\u6355\u6349\u3055\u308C\u306A\u3044\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n
javac.msg.resource=\n\n\u30B7\u30B9\u30C6\u30E0\u30FB\u30EA\u30BD\u30FC\u30B9\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n
javac.version={0} {1}
javac.fullVersion={0}\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"{1}"
#
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2012, 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
......@@ -40,9 +40,11 @@ javac.opt.endorseddirs=\u8986\u76D6\u7B7E\u540D\u7684\u6807\u51C6\u8DEF\u5F84\u7
javac.opt.extdirs=\u8986\u76D6\u6240\u5B89\u88C5\u6269\u5C55\u7684\u4F4D\u7F6E
javac.opt.processorpath=\u6307\u5B9A\u67E5\u627E\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u7684\u4F4D\u7F6E
javac.opt.processor=\u8981\u8FD0\u884C\u7684\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u7684\u540D\u79F0; \u7ED5\u8FC7\u9ED8\u8BA4\u7684\u641C\u7D22\u8FDB\u7A0B
javac.opt.parameters=\u751F\u6210\u5143\u6570\u636E\u4EE5\u7528\u4E8E\u65B9\u6CD5\u53C2\u6570\u7684\u53CD\u5C04
javac.opt.proc.none.only=\u63A7\u5236\u662F\u5426\u6267\u884C\u6CE8\u91CA\u5904\u7406\u548C/\u6216\u7F16\u8BD1\u3002
javac.opt.d=\u6307\u5B9A\u653E\u7F6E\u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E
javac.opt.sourceDest=\u6307\u5B9A\u653E\u7F6E\u751F\u6210\u7684\u6E90\u6587\u4EF6\u7684\u4F4D\u7F6E
javac.opt.headerDest=\u6307\u5B9A\u653E\u7F6E\u751F\u6210\u7684\u672C\u673A\u6807\u5934\u6587\u4EF6\u7684\u4F4D\u7F6E
javac.opt.J=\u76F4\u63A5\u5C06 <\u6807\u8BB0> \u4F20\u9012\u7ED9\u8FD0\u884C\u65F6\u7CFB\u7EDF
javac.opt.encoding=\u6307\u5B9A\u6E90\u6587\u4EF6\u4F7F\u7528\u7684\u5B57\u7B26\u7F16\u7801
javac.opt.target=\u751F\u6210\u7279\u5B9A VM \u7248\u672C\u7684\u7C7B\u6587\u4EF6
......@@ -61,6 +63,8 @@ javac.opt.arg.directory=<\u76EE\u5F55>
javac.opt.arg.encoding=<\u7F16\u7801>
javac.opt.arg.release=<\u53D1\u884C\u7248>
javac.opt.arg.number=<\u7F16\u53F7>
javac.opt.plugin=\u8981\u8FD0\u884C\u7684\u63D2\u4EF6\u7684\u540D\u79F0\u548C\u53EF\u9009\u53C2\u6570
javac.opt.arg.plugin="\u540D\u79F0\u53C2\u6570"
## extended options
......@@ -80,6 +84,9 @@ javac.opt.arg.pathname=<\u8DEF\u5F84\u540D>
javac.opt.arg.file=<\u6587\u4EF6\u540D>
javac.opt.Xlint=\u542F\u7528\u5EFA\u8BAE\u7684\u8B66\u544A
javac.opt.Xlint.suboptlist=\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u7684\u8B66\u544A
javac.opt.Xdoclint=\u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u5EFA\u8BAE\u7684\u68C0\u67E5
javac.opt.Xdoclint.subopts = (all|[-]<group>)[/<access>]
javac.opt.Xdoclint.custom=\n \u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u68C0\u67E5,\n \u5176\u4E2D <group> \u4E3A\u53EF\u8BBF\u95EE\u6027, html, \u5F15\u7528\u6216\u8BED\u6CD5\u4E4B\u4E00,\n <access> \u4E3A public, protected, package \u6216 private \u4E4B\u4E00\u3002
javac.opt.Xstdout=\u91CD\u5B9A\u5411\u6807\u51C6\u8F93\u51FA
javac.opt.X=\u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981
javac.opt.help=\u8F93\u51FA\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981
......@@ -107,6 +114,7 @@ javac.err.dir.not.found=\u627E\u4E0D\u5230\u76EE\u5F55: {0}
javac.err.file.not.found=\u627E\u4E0D\u5230\u6587\u4EF6: {0}
javac.err.file.not.directory=\u4E0D\u662F\u76EE\u5F55: {0}
javac.err.file.not.file=\u4E0D\u662F\u6587\u4EF6: {0}
javac.msg.plugin.not.found=\u627E\u4E0D\u5230\u63D2\u4EF6: {0}
## messages
javac.msg.usage.header=\u7528\u6CD5: {0} <options> <source files>\n\u5176\u4E2D, \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:
......@@ -121,6 +129,8 @@ javac.msg.io=\n\n\u53D1\u751F\u8F93\u5165/\u8F93\u51FA\u9519\u8BEF\u3002\n\u6709
javac.msg.proc.annotation.uncaught.exception=\n\n\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u629B\u51FA\u672A\u6355\u83B7\u7684\u5F02\u5E38\u9519\u8BEF\u3002\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u4EE5\u4E0B\u5806\u6808\u8DDF\u8E2A\u3002\n
javac.msg.plugin.uncaught.exception=\n\n\u63D2\u4EF6\u629B\u51FA\u672A\u6355\u83B7\u7684\u5F02\u5E38\u9519\u8BEF\u3002\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u4EE5\u4E0B\u5806\u6808\u8DDF\u8E2A\u3002\n
javac.msg.resource=\n\n\u7CFB\u7EDF\u8D44\u6E90\u4E0D\u8DB3\u3002\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u4EE5\u4E0B\u5806\u6808\u8DDF\u8E2A\u3002\n
javac.version={0} {1}
......
......@@ -149,12 +149,13 @@ public abstract class Profiles {
}
final static Map<String, Package> packages = new TreeMap<String, Package>();
int maxProfile;
final int maxProfile = 4; // Three compact profiles plus full JRE
MakefileProfiles(Properties p) {
int profile = 1;
while (true) {
String inclPackages = p.getProperty("PROFILE_" + profile + "_RTJAR_INCLUDE_PACKAGES");
for (int profile = 1; profile <= maxProfile; profile++) {
String prefix = (profile < maxProfile ? "PROFILE_" + profile : "FULL_JRE");
String inclPackages = p.getProperty(prefix + "_RTJAR_INCLUDE_PACKAGES");
if (inclPackages == null)
break;
for (String pkg: inclPackages.substring(1).trim().split("\\s+")) {
......@@ -162,22 +163,20 @@ public abstract class Profiles {
pkg = pkg.substring(0, pkg.length() - 1);
includePackage(profile, pkg);
}
String inclTypes = p.getProperty("PROFILE_" + profile + "_RTJAR_INCLUDE_TYPES");
String inclTypes = p.getProperty(prefix + "_RTJAR_INCLUDE_TYPES");
if (inclTypes != null) {
for (String type: inclTypes.replace("$$", "$").split("\\s+")) {
if (type.endsWith(".class"))
includeType(profile, type.substring(0, type.length() - 6));
}
}
String exclTypes = p.getProperty("PROFILE_" + profile + "_RTJAR_EXCLUDE_TYPES");
String exclTypes = p.getProperty(prefix + "_RTJAR_EXCLUDE_TYPES");
if (exclTypes != null) {
for (String type: exclTypes.replace("$$", "$").split("\\s+")) {
if (type.endsWith(".class"))
excludeType(profile, type.substring(0, type.length() - 6));
}
}
maxProfile = profile;
profile++;
}
}
......
......@@ -85,17 +85,4 @@ public class ArrayUtils {
}
}
public static <T> T[] concat(T[] anArr, T[] anotherArr) {
int newLength = anArr.length + anotherArr.length;
@SuppressWarnings("unchecked")
T[] result = (T[]) Array.newInstance(anArr.getClass().getComponentType(), newLength);
System.arraycopy(anArr, 0, result, 0, anArr.length);
System.arraycopy(anotherArr, 0, result, anArr.length, anotherArr.length);
return result;
}
@SuppressWarnings("unchecked")
public static <T> T[] concatOpen(T[] anArr, T... anotherArr) {
return concat(anArr, anotherArr);
}
}
......@@ -509,6 +509,16 @@ public class RichDiagnosticFormatter extends
visit(supertype);
visit(interfaces);
}
} else if (t.tsym.name.isEmpty()) {
//anon class
ClassType norm = (ClassType) t.tsym.type;
if (norm != null) {
if (norm.interfaces_field != null && norm.interfaces_field.nonEmpty()) {
visit(norm.interfaces_field.head);
} else {
visit(norm.supertype_field);
}
}
}
nameSimplifier.addUsage(t.tsym);
visit(t.getTypeArguments());
......@@ -562,7 +572,7 @@ public class RichDiagnosticFormatter extends
// <editor-fold defaultstate="collapsed" desc="symbol scanner">
/**
* Preprocess a given symbol looking for (i) additional info (where clauses) to be
* asdded to the main diagnostic (ii) names to be compacted
* added to the main diagnostic (ii) names to be compacted
*/
protected void preprocessSymbol(Symbol s) {
symbolPreprocessor.visit(s, null);
......
......@@ -205,7 +205,7 @@ public abstract class ExecutableMemberDocImpl
if (recvtype == null) {
return new AnnotationDesc[0];
}
if (recvtype.getKind() != TypeKind.ANNOTATED) {
if (!recvtype.isAnnotated()) {
return new AnnotationDesc[0];
}
List<? extends Compound> typeAnnos = ((com.sun.tools.javac.code.Type.AnnotatedType)recvtype).typeAnnotations;
......
......@@ -65,11 +65,11 @@ public class TypeMaker {
t = env.types.erasure(t);
}
if (considerAnnotations
&& t.getKind() == TypeKind.ANNOTATED) {
&& t.isAnnotated()) {
return new AnnotatedTypeImpl(env, (com.sun.tools.javac.code.Type.AnnotatedType) t);
}
if (t.getKind() == TypeKind.ANNOTATED) {
if (t.isAnnotated()) {
Type.AnnotatedType at = (Type.AnnotatedType) t;
return new AnnotatedTypeImpl(env, at);
}
......@@ -147,7 +147,7 @@ public class TypeMaker {
*/
static String getTypeString(DocEnv env, Type t, boolean full) {
// TODO: should annotations be included here?
if (t.getKind() == TypeKind.ANNOTATED) {
if (t.isAnnotated()) {
Type.AnnotatedType at = (Type.AnnotatedType)t;
t = at.underlyingType;
}
......
......@@ -127,7 +127,7 @@ public class TypeVariableImpl extends AbstractTypeImpl implements TypeVariable {
final Type upperBound = v.getUpperBound();
Name boundname = upperBound.tsym.getQualifiedName();
if (boundname == boundname.table.names.java_lang_Object
&& upperBound.getKind() != TypeKind.ANNOTATED) {
&& !upperBound.isAnnotated()) {
return List.nil();
} else {
return env.types.getBounds(v);
......@@ -139,7 +139,7 @@ public class TypeVariableImpl extends AbstractTypeImpl implements TypeVariable {
* Return an empty array if there are none.
*/
public AnnotationDesc[] annotations() {
if (type.getKind() != TypeKind.ANNOTATED) {
if (!type.isAnnotated()) {
return new AnnotationDesc[0];
}
List<TypeCompound> tas = ((com.sun.tools.javac.code.Type.AnnotatedType) type).typeAnnotations;
......
#
# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2012, 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
......@@ -37,7 +37,6 @@ main.No_packages_or_classes_specified=\u30D1\u30C3\u30B1\u30FC\u30B8\u307E\u305F
main.incompatible.access.flags=-public\u3001-private\u3001-package\u307E\u305F\u306F-protected\u306E\u3046\u3061\u306E2\u3064\u4EE5\u4E0A\u3092\u6307\u5B9A\u3057\u307E\u3057\u305F\u3002
main.cant.read={0}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093
main.Loading_source_files_for_package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059...
main.Loading_source_file_for_class=\u30AF\u30E9\u30B9{0}\u306E\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059...
main.Loading_source_file=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB{0}\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059...
main.Building_tree=Javadoc\u60C5\u5831\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059...
main.no_source_files_for_package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093
......@@ -67,13 +66,12 @@ tag.see.missing_sharp=\u30BF\u30B0{0}: ''#''\u304C\u3042\u308A\u307E\u305B\u3093
tag.see.can_not_find_member=\u30BF\u30B0{0}: {2}\u3067{1}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
tag.see.no_close_bracket_on_url=\u30BF\u30B0{0}: \u9589\u3058\u30BF\u30B0''>''\u304C\u3042\u308A\u307E\u305B\u3093: "{1}"
tag.see.no_close_quote=\u30BF\u30B0{0}: \u9589\u3058\u5F15\u7528\u7B26\u304C\u3042\u308A\u307E\u305B\u3093: "{1}"
tag.see.class_not_found=@see\u30BF\u30B0\u7528\u306E\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: "{1}"
tag.see.class_not_specified=\u30BF\u30B0{0}: \u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093: "{1}"
tag.see.illegal_character=\u30BF\u30B0{0}: "{2}"\u306B\u4E0D\u6B63\u306A\u6587\u5B57"{1}"\u304C\u3042\u308A\u307E\u3059
tag.see.malformed_see_tag=\u30BF\u30B0{0}: \u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093: "{1}"
tag.throws.exception_not_found={0}\u30BF\u30B0\u3001\u30AF\u30E9\u30B9{1}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
tag.End_delimiter_missing_for_possible_SeeTag=\u30B3\u30E1\u30F3\u30C8\u6587\u5B57\u5217"{0}"\u3067\u3001\u6709\u52B9\u306Asee\u30BF\u30B0\u306B\u7D42\u7AEF\u30C7\u30EA\u30DF\u30BF}\u304C\u3042\u308A\u307E\u305B\u3093
tag.Improper_Use_Of_Link_Tag=\u30A4\u30F3\u30E9\u30A4\u30F3\u30FB\u30BF\u30B0"{0}"\u306B\u7D42\u4E86\u6587\u5B57''}''\u304C\u3042\u308A\u307E\u305B\u3093
tag.serialField.illegal_character=@serialField\u30BF\u30B0\u306B\u4E0D\u6B63\u306A\u6587\u5B57{0}\u304C\u3042\u308A\u307E\u3059: {1}\u3002
javadoc.File_Read_Error=\u30D5\u30A1\u30A4\u30EB{0}\u306E\u8AAD\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
javadoc.Body_missing_from_html_file=HTML\u306Bbody\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093
javadoc.End_body_missing_from_html_file=HTML\u30D5\u30A1\u30A4\u30EB\u306Bbody\u306E\u9589\u3058\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093
......@@ -81,4 +79,8 @@ javadoc.Multiple_package_comments=\u30D1\u30C3\u30B1\u30FC\u30B8"{0}"\u306B\u890
javadoc.class_not_found=\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
javadoc.error=\u30A8\u30E9\u30FC
javadoc.warning=\u8B66\u544A
tag.serialField.illegal_character=@serialField\u30BF\u30B0\u306B\u4E0D\u6B63\u306A\u6587\u5B57{0}\u304C\u3042\u308A\u307E\u3059: {1}\u3002
javadoc.error.msg={0}: \u30A8\u30E9\u30FC - {1}
javadoc.warning.msg={0}: \u8B66\u544A - {1}
javadoc.note.msg = {1}
javadoc.note.pos.msg= {0}: {1}
#
# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2012, 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
......@@ -37,7 +37,6 @@ main.No_packages_or_classes_specified=\u672A\u6307\u5B9A\u7A0B\u5E8F\u5305\u6216
main.incompatible.access.flags=\u6307\u5B9A\u4E86\u591A\u4E2A -public, -private, -package \u6216 -protected\u3002
main.cant.read=\u65E0\u6CD5\u8BFB\u53D6{0}
main.Loading_source_files_for_package=\u6B63\u5728\u52A0\u8F7D\u7A0B\u5E8F\u5305{0}\u7684\u6E90\u6587\u4EF6...
main.Loading_source_file_for_class=\u6B63\u5728\u52A0\u8F7D\u7C7B{0}\u7684\u6E90\u6587\u4EF6...
main.Loading_source_file=\u6B63\u5728\u52A0\u8F7D\u6E90\u6587\u4EF6{0}...
main.Building_tree=\u6B63\u5728\u6784\u9020 Javadoc \u4FE1\u606F...
main.no_source_files_for_package=\u6CA1\u6709\u7A0B\u5E8F\u5305{0}\u7684\u6E90\u6587\u4EF6
......@@ -67,13 +66,12 @@ tag.see.missing_sharp=\u6807\u8BB0{0}: \u7F3A\u5C11 ''#'': "{1}"
tag.see.can_not_find_member=\u6807\u8BB0{0}: \u5728{2}\u4E2D\u627E\u4E0D\u5230{1}
tag.see.no_close_bracket_on_url=\u6807\u8BB0{0}: \u7F3A\u5C11\u6700\u540E\u7684 ''>'': "{1}"
tag.see.no_close_quote=\u6807\u8BB0{0}: \u65E0\u53F3\u5F15\u53F7: "{1}"
tag.see.class_not_found=\u627E\u4E0D\u5230 @see \u6807\u8BB0\u7684\u7C7B{0}: "{1}"
tag.see.class_not_specified=\u6807\u8BB0{0}: \u672A\u6307\u5B9A\u7C7B: "{1}"
tag.see.illegal_character=\u6807\u8BB0{0}: "{2}" \u4E2D\u7684 "{1}" \u4E3A\u975E\u6CD5\u5B57\u7B26
tag.see.malformed_see_tag=\u6807\u8BB0{0}: \u683C\u5F0F\u9519\u8BEF: "{1}"
tag.throws.exception_not_found=\u6807\u8BB0{0}: \u627E\u4E0D\u5230\u7C7B{1}\u3002
tag.End_delimiter_missing_for_possible_SeeTag=\u6CE8\u91CA\u5B57\u7B26\u4E32\u4E2D\u53EF\u80FD\u51FA\u73B0\u7684 See \u6807\u8BB0\u7F3A\u5C11\u7ED3\u675F\u5206\u9694\u7B26 }: "{0}"
tag.Improper_Use_Of_Link_Tag=\u5185\u5D4C\u6807\u8BB0\u7F3A\u5C11\u7ED3\u675F ''}'' \u5B57\u7B26: "{0}"
tag.serialField.illegal_character=@serialField \u6807\u8BB0\u4E2D\u7684\u975E\u6CD5\u5B57\u7B26 {0}: {1}\u3002
javadoc.File_Read_Error=\u8BFB\u53D6\u6587\u4EF6{0}\u65F6\u51FA\u9519
javadoc.Body_missing_from_html_file=HTML \u6587\u4EF6\u4E2D\u7F3A\u5C11\u4E3B\u4F53\u6807\u8BB0
javadoc.End_body_missing_from_html_file=HTML \u6587\u4EF6\u4E2D\u7F3A\u5C11\u4E3B\u4F53\u7ED3\u675F\u6807\u8BB0
......@@ -81,4 +79,8 @@ javadoc.Multiple_package_comments=\u627E\u5230\u7A0B\u5E8F\u5305 "{0}" \u7684\u5
javadoc.class_not_found=\u627E\u4E0D\u5230\u7C7B{0}\u3002
javadoc.error=\u9519\u8BEF
javadoc.warning=\u8B66\u544A
tag.serialField.illegal_character=@serialField \u6807\u8BB0\u4E2D\u7684\u975E\u6CD5\u5B57\u7B26 {0}: {1}\u3002
javadoc.error.msg={0}: \u9519\u8BEF - {1}
javadoc.warning.msg={0}: \u8B66\u544A - {1}
javadoc.note.msg = {1}
javadoc.note.pos.msg= {0}: {1}
/*
* Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2013, 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
......@@ -144,10 +144,6 @@ public class Util {
throw new Exit(15);
}
private void fatal(String msg) throws Exit {
fatal(msg, null);
}
private void fatal(String msg, Exception e) throws Exit {
dl.report(createDiagnostic(Diagnostic.Kind.ERROR, "", msg));
throw new Exit(10, e);
......
#
# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1998, 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
......@@ -33,10 +33,10 @@ at.args.io.exception=\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u306E@\u5F15\u65
old.jni.mixed=\u30AA\u30D7\u30B7\u30E7\u30F3-jni\u3068-old\u3092\u540C\u6642\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
old.llni.mixed=\u30AA\u30D7\u30B7\u30E7\u30F3-old\u3068-llni\u3092\u540C\u6642\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
old.not.supported=\u3053\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306Ejavah\u3067\u306F\u30AA\u30D7\u30B7\u30E7\u30F3-old\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
invalid.method.signature=\u7121\u52B9\u306A\u30E1\u30BD\u30C3\u30C9\u30FB\u30B7\u30B0\u30CB\u30C1\u30E3: {0}
invalid.method.signature=\u7121\u52B9\u306A\u30E1\u30BD\u30C3\u30C9\u30FB\u30B7\u30B0\u30CD\u30C1\u30E3: {0}
jni.llni.mixed=\u30AA\u30D7\u30B7\u30E7\u30F3-jni\u3068-llni\u3092\u540C\u6642\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
jni.no.stubs=JNI\u306F\u30B9\u30BF\u30D6\u3092\u5FC5\u8981\u3068\u3057\u307E\u305B\u3093\u3002JNI\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
jni.sigerror={0}\u306E\u7F72\u540D\u3092\u5224\u5B9A\u3067\u304D\u307E\u305B\u3093
jni.sigerror={0}\u306E\u30B7\u30B0\u30CD\u30C1\u30E3\u3092\u5224\u5225\u3067\u304D\u307E\u305B\u3093
dir.file.mixed=\u30AA\u30D7\u30B7\u30E7\u30F3-d\u3068-o\u3092\u540C\u6642\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
no.classes.specified=\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
no.outputfile.specified=\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u304C\u6307\u5B9A\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
......@@ -51,7 +51,7 @@ tracing.not.supported=\u8B66\u544A: \u30C8\u30EC\u30FC\u30B9\u306F\u73FE\u5728\u
#
usage=\u4F7F\u7528\u65B9\u6CD5: javah [options] <classes>\n\n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002\n\n\t-help \u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n\t-classpath <path> \u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\n\t-bootclasspath <path> \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\n\t-d<dir> \u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n\t-o <file> \u51FA\u529B\u30D5\u30A1\u30A4\u30EB(-d\u304B-o\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u3092\u4F7F\u7528\u3059\u308B)\n\t-jni JNI\u5F62\u5F0F\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n\t-version \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3059\u308B\n\t-verbose \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n\t-force \u5E38\u306B\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\n\n<classes> \u306F\u5B8C\u5168\u6307\u5B9A\u306E\u540D\u524D\u3067\u6307\u5B9A\u3057\u307E\u3059\n(java.lang.Object\u306A\u3069)\u3002\n
main.usage=\u4F7F\u7528\u65B9\u6CD5: \n\ javah [options] <classes>\n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002
main.usage=\u4F7F\u7528\u65B9\u6CD5: \n javah [options] <classes>\n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002
main.opt.o=\ -o <file> \u51FA\u529B\u30D5\u30A1\u30A4\u30EB(-d\u304B-o\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u3092\u4F7F\u7528\u3059\u308B)
main.opt.d=\ -d <dir> \u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA
main.opt.v=\ -v -verbose \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046
......
#
# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1998, 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
......@@ -51,7 +51,7 @@ tracing.not.supported=\u8B66\u544A: \u4E0D\u518D\u652F\u6301\u8DDF\u8E2A\u3002\u
#
usage=\u7528\u6CD5: javah [options] <classes>\n\n\u5176\u4E2D, [options] \u5305\u62EC:\n\n\t-help \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\u5E76\u9000\u51FA\n\t-classpath <path> \u4ECE\u4E2D\u52A0\u8F7D\u7C7B\u7684\u8DEF\u5F84\n\t-bootclasspath <path> \u4ECE\u4E2D\u52A0\u8F7D\u5F15\u5BFC\u7C7B\u7684\u8DEF\u5F84\n\t-d <dir> \u8F93\u51FA\u76EE\u5F55\n\t-o <file> \u8F93\u51FA\u6587\u4EF6 (\u53EA\u80FD\u4F7F\u7528 -d \u6216 -o \u4E4B\u4E00)\n\t-jni \u751F\u6210 JNI \u6837\u5F0F\u7684\u6807\u5934\u6587\u4EF6 (\u9ED8\u8BA4\u503C)\n\t-version \u8F93\u51FA\u7248\u672C\u4FE1\u606F\n\t-verbose \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n\t-force \u59CB\u7EC8\u5199\u5165\u8F93\u51FA\u6587\u4EF6\n\n<classes> \u662F\u4F7F\u7528\u5176\u5168\u9650\u5B9A\u540D\u79F0\u6307\u5B9A\u7684,\n(\u4F8B\u5982 java.lang.Object)\u3002\n
main.usage=\u7528\u6CD5: \n\ javah [options] <classes>\n\u5176\u4E2D, [options] \u5305\u62EC:
main.usage=\u7528\u6CD5: \n javah [options] <classes>\n\u5176\u4E2D, [options] \u5305\u62EC:
main.opt.o=\ -o <file> \u8F93\u51FA\u6587\u4EF6 (\u53EA\u80FD\u4F7F\u7528 -d \u6216 -o \u4E4B\u4E00)
main.opt.d=\ -d <dir> \u8F93\u51FA\u76EE\u5F55
main.opt.v=\ -v -verbose \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA
......
/*
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2013, 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
......@@ -269,7 +269,7 @@ public class StackMapWriter extends InstructionDetailWriter {
}
class StackMap {
static class StackMap {
StackMap(verification_type_info[] locals, verification_type_info[] stack) {
this.locals = locals;
this.stack = stack;
......@@ -279,7 +279,7 @@ public class StackMapWriter extends InstructionDetailWriter {
private final verification_type_info[] stack;
}
class CustomVerificationTypeInfo extends verification_type_info {
static class CustomVerificationTypeInfo extends verification_type_info {
public CustomVerificationTypeInfo(String text) {
super(-1);
this.text = text;
......
......@@ -59,6 +59,13 @@ public class ClassFileReader {
}
}
/**
* Returns a ClassFileReader instance of a given JarFile.
*/
public static ClassFileReader newInstance(Path path, JarFile jf) throws IOException {
return new JarFileReader(path, jf);
}
protected final Path path;
protected final String baseFileName;
private ClassFileReader(Path path) {
......@@ -228,8 +235,11 @@ public class ClassFileReader {
private static class JarFileReader extends ClassFileReader {
final JarFile jarfile;
JarFileReader(Path path) throws IOException {
this(path, new JarFile(path.toFile()));
}
JarFileReader(Path path, JarFile jf) throws IOException {
super(path);
this.jarfile = new JarFile(path.toFile());
this.jarfile = jf;
}
public ClassFile getClassFile(String name) throws IOException {
......
此差异已折叠。
......@@ -51,6 +51,8 @@ err.missing.arg=no value given for {0}
err.internal.error=internal error: {0} {1} {2}
err.invalid.arg.for.option=invalid argument for option: {0}
err.option.after.class=option must be specified before classes: {0}
err.option.unsupported={0} not supported: {1}
err.profiles.msg=No profile information
warn.invalid.arg=Invalid classname or pathname not exist: {0}
warn.split.package=package {0} defined in {1} {2}
......
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013, 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
......@@ -26,18 +26,13 @@
package com.sun.tools.sjavac;
import java.io.File;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.sun.tools.sjavac.server.JavacServer;
import java.io.IOException;
import java.io.PrintStream;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.sun.tools.sjavac.server.JavacServer;
/**
* The main class of the smart javac wrapper tool.
......@@ -268,12 +263,12 @@ public class Main {
// Find all class files allowable for linking.
// And pickup knowledge of all modules found here.
// This cannot currently filter classes inside jar files.
Map<String,Source> classes_to_link_to = new HashMap<String,Source>();
// Map<String,Source> classes_to_link_to = new HashMap<String,Source>();
// findFiles(args, "-classpath", Util.set(".class"), classes_to_link_to, modules, current_module, true);
// Find all module sources allowable for linking.
Map<String,Source> modules_to_link_to = new HashMap<String,Source>();
// findFiles(args, "-modulepath", Util.set(".class"), modules_to_link_to, modules, current_module, true);
// Map<String,Source> modules_to_link_to = new HashMap<String,Source>();
// findFiles(args, "-modulepath", Util.set(".class"), modules_to_link_to, modules, current_module, true);
// Add the set of sources to the build database.
javac_state.now().collectPackagesSourcesAndArtifacts(modules);
......@@ -935,13 +930,13 @@ public class Main {
if (roots.contains(root)) {
throw new ProblemException("\""+r+"\" has already been used for "+option);
}
if (roots.equals(bin_dir)) {
if (root.equals(bin_dir)) {
throw new ProblemException("\""+r+"\" cannot be used both for "+option+" and -d");
}
if (roots.equals(gensrc_dir)) {
if (root.equals(gensrc_dir)) {
throw new ProblemException("\""+r+"\" cannot be used both for "+option+" and -s");
}
if (roots.equals(header_dir)) {
if (root.equals(header_dir)) {
throw new ProblemException("\""+r+"\" cannot be used both for "+option+" and -h");
}
roots.add(root);
......
......@@ -108,7 +108,7 @@ public class Dependencies {
return new_deps;
}
class CompareNames implements Comparator<Name> {
static class CompareNames implements Comparator<Name> {
public int compare(Name a, Name b) {
return a.toString().compareTo(b.toString());
}
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册