Merge
This commit is contained in:
commit
2288704f7f
@ -1,6 +1,6 @@
|
||||
<?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<Integer,Void> {
|
||||
* {@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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -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="{0}" \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) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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 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 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());
|
||||
|
@ -1,197 +0,0 @@
|
||||
/*
|
||||
* 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é
|
||||
* @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);
|
||||
// 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.
|
||||
|
||||
// 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).
|
||||
|
||||
// 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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 {
|
||||
|
@ -0,0 +1,412 @@
|
||||
/*
|
||||
* 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);
|
||||
}*/
|
||||
|
||||
}
|
||||
|
@ -65,8 +65,11 @@ compiler.err.abstract.meth.cant.have.body=abstract\u30E1\u30BD\u30C3\u30C9\u304C
|
||||
|
||||
compiler.err.already.annotated={0} {1}\u306F\u6CE8\u91C8\u304C\u4ED8\u3044\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.already.defined={0}\u306F{1}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol
|
||||
compiler.err.already.defined={0} {1}\u306F\u3059\u3067\u306B{2} {3}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol kind, 4: symbol
|
||||
compiler.err.already.defined.in.clinit={0} {1}\u306F\u3059\u3067\u306B{3} {4}\u306E{2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: string
|
||||
compiler.err.already.defined.single.import={0}\u306F\u5358\u4E00\u306E\u578B\u30A4\u30F3\u30DD\u30FC\u30C8\u5BA3\u8A00\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
@ -109,28 +112,84 @@ compiler.err.array.dimension.missing=\u914D\u5217\u306E\u5927\u304D\u3055\u304C\
|
||||
# 0: type
|
||||
compiler.err.array.req.but.found=\u914D\u5217\u304C\u8981\u6C42\u3055\u308C\u307E\u3057\u305F\u304C\u3001{0}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
|
||||
|
||||
compiler.err.assignment.from.super-bound=\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9{0}\u304B\u3089\u4EE3\u5165\u3057\u3066\u3044\u307E\u3059
|
||||
|
||||
compiler.err.assignment.to.extends-bound=\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9{0}\u3078\u4EE3\u5165\u3057\u3066\u3044\u307E\u3059
|
||||
|
||||
compiler.err.attribute.value.must.be.constant=\u5C5E\u6027\u306E\u5024\u306F\u5B9A\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
# 0: statement type
|
||||
compiler.err.bad.initializer={0}\u306E\u4E0D\u6B63\u306A\u521D\u671F\u5316\u5B50
|
||||
|
||||
compiler.err.break.outside.switch.loop=break\u304Cswitch\u6587\u307E\u305F\u306F\u30EB\u30FC\u30D7\u306E\u5916\u306B\u3042\u308A\u307E\u3059
|
||||
|
||||
# 0: name
|
||||
compiler.err.call.must.be.first.stmt.in.ctor={0}\u306E\u547C\u51FA\u3057\u306F\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u5148\u982D\u6587\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
compiler.err.cant.apply.symbol={4} {5}\u306E{0} {1}\u306F\u6307\u5B9A\u3055\u308C\u305F\u578B\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {3}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
|
||||
compiler.err.cant.apply.symbol.1={4} {5}\u306E{0} {1}\u306F\u6307\u5B9A\u3055\u308C\u305F\u578B\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {3}\n\u7406\u7531: {6}
|
||||
compiler.err.cant.apply.symbol={4} {5}\u306E{0} {1}\u306F\u6307\u5B9A\u3055\u308C\u305F\u578B\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {3}\n\u7406\u7531: {6}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type
|
||||
compiler.err.cant.apply.symbols={1}\u306B\u9069\u5207\u306A{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093({2})
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
|
||||
compiler.misc.cant.apply.symbol={4} {5}\u306E{0} {1}\u306F\u6307\u5B9A\u3055\u308C\u305F\u578B\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {3}\n\u7406\u7531: {6}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type
|
||||
compiler.misc.cant.apply.symbols={1}\u306B\u9069\u5207\u306A{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093({2})
|
||||
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.misc.no.abstracts={0} {1}\u3067\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.misc.incompatible.abstracts={0} {1}\u3067\u8907\u6570\u306E\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u306A\u3044\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
|
||||
|
||||
compiler.err.bad.functional.intf.anno=\u4E88\u671F\u3057\u306A\u3044@FunctionalInterface\u6CE8\u91C8
|
||||
|
||||
# 0: message segment
|
||||
compiler.err.bad.functional.intf.anno.1=\u4E88\u671F\u3057\u306A\u3044@FunctionalInterface\u6CE8\u91C8\n{0}
|
||||
|
||||
# 0: symbol
|
||||
compiler.misc.not.a.functional.intf={0}\u306F\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol, 1: message segment
|
||||
compiler.misc.not.a.functional.intf.1={0}\u306F\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\n{1}
|
||||
|
||||
# 0: symbol, 1: symbol kind, 2: symbol
|
||||
compiler.misc.invalid.generic.lambda.target=\u30E9\u30E0\u30C0\u5F0F\u306E\u6A5F\u80FD\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u7121\u52B9\u3067\u3059\n{1} {2}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306F\u6C4E\u7528\u3067\u3059
|
||||
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.misc.incompatible.descs.in.functional.intf={0} {1}\u3067\u4E0D\u9069\u5408\u306A\u6A5F\u80FD\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
|
||||
|
||||
# 0: name, 1: list of type, 2: type, 3: list of type
|
||||
compiler.misc.descriptor=\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF: {2} {0}({1})
|
||||
|
||||
# 0: name, 1: list of type, 2: type, 3: list of type
|
||||
compiler.misc.descriptor.throws=\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF: {2} {0}({1})\u3067{3}\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3059
|
||||
|
||||
# 0: type
|
||||
compiler.misc.no.suitable.functional.intf.inst={0}\u306E\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: type
|
||||
compiler.misc.secondary.bound.must.be.marker.intf=\u30BB\u30AB\u30F3\u30C0\u30EA\u30FB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0{0}\u306F\u30DE\u30FC\u30AB\u30FC\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
# 0: symbol kind, 1: message segment
|
||||
compiler.err.invalid.mref={0}\u53C2\u7167\u304C\u7121\u52B9\u3067\u3059\u3002{1}
|
||||
|
||||
# 0: symbol kind, 1: message segment
|
||||
compiler.misc.invalid.mref={0}\u53C2\u7167\u304C\u7121\u52B9\u3067\u3059\u3002{1}
|
||||
|
||||
compiler.misc.static.mref.with.targs=static\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u5316\u3055\u308C\u305F\u4FEE\u98FE\u5B50
|
||||
|
||||
compiler.misc.static.bound.mref=static\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9\u53C2\u7167
|
||||
|
||||
# 0: symbol
|
||||
compiler.err.cant.assign.val.to.final.var=final\u5909\u6570{0}\u306B\u5024\u3092\u4EE3\u5165\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol, 1: message segment
|
||||
compiler.err.cant.ref.non.effectively.final.var={1}\u304B\u3089\u53C2\u7167\u3055\u308C\u308B\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u306F\u3001final\u307E\u305F\u306F\u4E8B\u5B9F\u4E0A\u306Efinal\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
|
||||
compiler.misc.lambda=\u30E9\u30E0\u30C0\u5F0F
|
||||
|
||||
compiler.misc.inner.cls=\u5185\u90E8\u30AF\u30E9\u30B9
|
||||
|
||||
# 0: type
|
||||
compiler.err.cant.deref={0}\u306F\u9593\u63A5\u53C2\u7167\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
@ -142,8 +201,6 @@ compiler.err.cant.inherit.from.final=final {0}\u304B\u3089\u306F\u7D99\u627F\u30
|
||||
# 0: symbol
|
||||
compiler.err.cant.ref.before.ctor.called=\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u547C\u51FA\u3057\u524D\u306F{0}\u3092\u53C2\u7167\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.err.cant.ret.val.from.meth.decl.void=\u623B\u308A\u5024\u306E\u578B\u304Cvoid\u306E\u30E1\u30BD\u30C3\u30C9\u304B\u3089\u306F\u5024\u3092\u8FD4\u305B\u307E\u305B\u3093
|
||||
|
||||
compiler.err.cant.select.static.class.from.param.type=\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3055\u308C\u305F\u578B\u304B\u3089static\u30AF\u30E9\u30B9\u3092\u9078\u629E\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol, 1: string, 2: string
|
||||
@ -154,6 +211,8 @@ compiler.err.catch.without.try=''catch''\u3078\u306E''try''\u304C\u3042\u308A\u3
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.err.clash.with.pkg.of.same.name={0} {1}\u306F\u540C\u540D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u7AF6\u5408\u3057\u307E\u3059
|
||||
|
||||
compiler.err.class.not.allowed=\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u307E\u305F\u306F\u5217\u6319\u578B\u306E\u5BA3\u8A00\u3092\u3053\u3053\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.err.const.expr.req=\u5B9A\u6570\u5F0F\u304C\u5FC5\u8981\u3067\u3059
|
||||
|
||||
compiler.err.cont.outside.loop=continue\u304C\u30EB\u30FC\u30D7\u306E\u5916\u306B\u3042\u308A\u307E\u3059
|
||||
@ -169,10 +228,8 @@ compiler.err.call.to.super.not.allowed.in.enum.ctor=\u5217\u6319\u578B\u30B3\u30
|
||||
# 0: type
|
||||
compiler.err.no.superclass={0}\u306B\u306F\u30B9\u30FC\u30D1\u30FC\u30AF\u30E9\u30B9\u304C\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
compiler.err.wrong.target.for.polymorphic.signature.definition=MethodHandle API\u306E\u4F5C\u6210\u306B\u306F-target 7\u30E9\u30F3\u30BF\u30A4\u30E0\u4EE5\u4E0A\u304C\u5FC5\u8981\u3067\u3059\u3002\u73FE\u5728\u306F-target {0}\u3067\u3059
|
||||
|
||||
# 0: symbol, 1: type, 2: symbol, 3: type, 4: unused
|
||||
compiler.err.concrete.inheritance.conflict={1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3068{3}\u306E{2}\u306F\u540C\u3058\u30B7\u30B0\u30CB\u30C1\u30E3\u304B\u3089\u7D99\u627F\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
compiler.err.concrete.inheritance.conflict={1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3068{3}\u306E{2}\u306F\u540C\u3058\u30B7\u30B0\u30CD\u30C1\u30E3\u304B\u3089\u7D99\u627F\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
compiler.err.default.allowed.in.intf.annotation.member=\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u306F@interface\u30E1\u30F3\u30D0\u30FC\u5185\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059
|
||||
|
||||
@ -181,9 +238,48 @@ compiler.err.doesnt.exist=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u5B58\u5728\u3
|
||||
|
||||
compiler.err.duplicate.annotation=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: type
|
||||
compiler.err.duplicate.annotation.invalid.repeated=\u6CE8\u91C8{0}\u3092\u7E70\u308A\u8FD4\u305B\u307E\u305B\u3093\n\u6709\u52B9\u306A\u5305\u542B\u3059\u308B\u6CE8\u91C8\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
|
||||
|
||||
# 0: name, 1: type
|
||||
compiler.err.duplicate.annotation.member.value={1}\u306E\u6CE8\u91C8\u30E1\u30F3\u30D0\u30FC\u306E\u5024{0}\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: type, 1: type
|
||||
compiler.err.duplicate.annotation.missing.container=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306E\u5BA3\u8A00\u306B\u306F\u6709\u52B9\u306A{1}\u6CE8\u91C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
# 0: type
|
||||
compiler.err.invalid.repeatable.annotation=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306F\u7121\u52B9\u306A\u7E70\u8FD4\u3057\u53EF\u80FD\u6CE8\u91C8\u3067\u6CE8\u91C8\u4ED8\u3051\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: type
|
||||
compiler.err.invalid.repeatable.annotation.no.value=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306F\u6709\u52B9\u306A\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u5024\u8981\u7D20\u30E1\u30BD\u30C3\u30C9\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
# 0: type, 1: number
|
||||
compiler.err.invalid.repeatable.annotation.multiple.values=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306F\u6709\u52B9\u306A\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002{1}\u5024\u8981\u7D20\u30E1\u30BD\u30C3\u30C9\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: type
|
||||
compiler.err.invalid.repeatable.annotation.invalid.value=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306F\u6709\u52B9\u306A\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u5024\u8981\u7D20\u304C\u7121\u52B9\u3067\u3059\u3002\u30E1\u30BD\u30C3\u30C9\u304C\u5FC5\u8981\u3067\u3059
|
||||
|
||||
# 0: type, 1: type, 2: type
|
||||
compiler.err.invalid.repeatable.annotation.value.return=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002\u5305\u542B\u3059\u308B\u6CE8\u91C8{0}\u306E\u5024\u8981\u7D20\u306B\u306F\u578B{2}\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
|
||||
|
||||
# 0: type, 1: symbol
|
||||
compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5305\u542B\u3059\u308B\u6CE8\u91C8{0}\u306B\u306F\u8981\u7D20{1}\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol, 1: type, 2: symbol, 3: type
|
||||
compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u3059\u308B\u6CE8\u91C8{0}\u306B\u306F\u3001\u4FDD\u6709{3}\u3092\u542B\u3080\u5305\u542B\u3055\u308C\u305F\u6CE8\u91C8{2}\u3088\u308A\u77ED\u3044\u4FDD\u6709({1})\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.invalid.repeatable.annotation.not.documented=\u7E70\u308A\u8FD4\u3055\u308C\u305F\u6CE8\u91C8{1}\u306F@Documented\u3067\u3059\u304C\u3001\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30BF\u30A4\u30D7{0}\u306F\u9055\u3044\u307E\u3059
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.invalid.repeatable.annotation.not.inherited=\u308A\u8FD4\u3055\u308C\u305F\u6CE8\u91C8\u30BF\u30A4\u30D7{1}\u306F@Inherited\u3067\u3059\u304C\u3001\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30BF\u30A4\u30D7{0}\u306F\u9055\u3044\u307E\u3059
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.invalid.repeatable.annotation.incompatible.target=\u30B3\u30F3\u30C6\u30CA\u6CE8\u91C8{0}\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306F\u3001\u7E70\u308A\u8FD4\u3055\u308C\u305F\u6CE8\u91C8{1}\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u30B5\u30D6\u30BB\u30C3\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
|
||||
# 0: symbol
|
||||
compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\u30B3\u30F3\u30C6\u30CA{0}\u306F\u542B\u307E\u308C\u3066\u3044\u308B\u8981\u7D20\u3068\u540C\u6642\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: name
|
||||
compiler.err.duplicate.class=\u30AF\u30E9\u30B9{0}\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059
|
||||
|
||||
@ -245,10 +341,10 @@ compiler.err.generic.array.creation=\u6C4E\u7528\u914D\u5217\u3092\u4F5C\u6210\u
|
||||
compiler.err.generic.throwable=\u6C4E\u7528\u30AF\u30E9\u30B9\u306Fjava.lang.Throwable\u3092\u62E1\u5F35\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol
|
||||
compiler.err.icls.cant.have.static.decl=\u5185\u90E8\u30AF\u30E9\u30B9{0}\u306E\u9759\u7684\u5BA3\u8A00\u304C\u4E0D\u6B63\u3067\u3059\n\u4FEE\u98FE\u5B50\''static\''\u306F\u5B9A\u6570\u304A\u3088\u3073\u5909\u6570\u306E\u5BA3\u8A00\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059
|
||||
compiler.err.icls.cant.have.static.decl=\u5185\u90E8\u30AF\u30E9\u30B9{0}\u306E\u9759\u7684\u5BA3\u8A00\u304C\u4E0D\u6B63\u3067\u3059\n\u4FEE\u98FE\u5B50''static''\u306F\u5B9A\u6570\u304A\u3088\u3073\u5909\u6570\u306E\u5BA3\u8A00\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059
|
||||
|
||||
# 0: string
|
||||
compiler.err.illegal.char=\\{0}\u306F\u4E0D\u6B63\u306A\u6587\u5B57\u3067\u3059
|
||||
compiler.err.illegal.char=''{0}''\u306F\u4E0D\u6B63\u306A\u6587\u5B57\u3067\u3059
|
||||
|
||||
compiler.err.illegal.char.for.encoding=\u3053\u306E\u6587\u5B57\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{0}\u306B\u30DE\u30C3\u30D7\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
@ -280,11 +376,15 @@ compiler.err.illegal.nonascii.digit=\u4E0D\u6B63\u306A\u975EASCII\u6570\u5B57\u3
|
||||
|
||||
compiler.err.illegal.underscore=\u4E0D\u6B63\u306A\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\u3067\u3059
|
||||
|
||||
compiler.err.illegal.dot=\u4E0D\u6B63\u306A''.''\u3067\u3059
|
||||
|
||||
# 0: symbol
|
||||
compiler.err.illegal.qual.not.icls=\u4FEE\u98FE\u5B50\u304C\u4E0D\u6B63\u3067\u3059\u3002{0}\u306F\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
compiler.err.illegal.start.of.expr=\u5F0F\u306E\u958B\u59CB\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
compiler.err.illegal.start.of.stmt=\u6587\u306E\u958B\u59CB\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
compiler.err.illegal.start.of.type=\u578B\u306E\u958B\u59CB\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
compiler.err.illegal.unicode.esc=Unicode\u30A8\u30B9\u30B1\u30FC\u30D7\u304C\u4E0D\u6B63\u3067\u3059
|
||||
@ -302,8 +402,6 @@ compiler.err.incomparable.types=\u578B{0}\u3068{1}\u306F\u6BD4\u8F03\u3067\u304D
|
||||
# 0: number
|
||||
compiler.err.int.number.too.large=\u6574\u6570{0}\u304C\u5927\u304D\u3059\u304E\u307E\u3059
|
||||
|
||||
compiler.err.internal.error.cant.instantiate=\u5185\u90E8\u30A8\u30E9\u30FC\u3067\u3059\u3002{0}\u3092{1}\u3067({2})\u306B\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u751F\u6210\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.err.intf.annotation.members.cant.have.params=@interface\u30E1\u30F3\u30D0\u30FC\u304C\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.err.intf.annotation.cant.have.type.params=@interface\u304C\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
@ -315,7 +413,7 @@ compiler.err.intf.annotation.member.clash=@interface\u30E1\u30F3\u30D0\u30FC\u30
|
||||
|
||||
compiler.err.intf.expected.here=\u3053\u3053\u306B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u5FC5\u8981\u3067\u3059
|
||||
|
||||
compiler.err.intf.meth.cant.have.body=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
compiler.err.intf.meth.cant.have.body=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.err.invalid.annotation.member.type=\u6CE8\u91C8\u30E1\u30F3\u30D0\u30FC\u306E\u578B\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
@ -327,6 +425,8 @@ compiler.err.invalid.meth.decl.ret.type.req=\u7121\u52B9\u306A\u30E1\u30BD\u30C3
|
||||
|
||||
compiler.err.varargs.and.old.array.syntax=\u65E7\u5F0F\u306E\u914D\u5217\u8868\u8A18\u6CD5\u306F\u53EF\u5909\u5F15\u6570\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.err.variable.not.allowed=\u5909\u6570\u306E\u5BA3\u8A00\u3092\u3053\u3053\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: name
|
||||
compiler.err.label.already.in.use=\u30E9\u30D9\u30EB{0}\u306F\u3059\u3067\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
@ -337,6 +437,8 @@ compiler.err.local.enum=\u5217\u6319\u578B\u306F\u30ED\u30FC\u30AB\u30EB\u306B\u
|
||||
|
||||
compiler.err.cannot.create.array.with.type.arguments=\u578B\u5F15\u6570\u3092\u6301\u3064\u914D\u5217\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.err.cannot.create.array.with.diamond=''<>''\u3092\u6301\u3064\u914D\u5217\u306F\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
#
|
||||
# limits. We don't give the limits in the diagnostic because we expect
|
||||
# them to change, yet we want to use the same diagnostic. These are all
|
||||
@ -360,7 +462,7 @@ compiler.err.limit.stack=\u30B3\u30FC\u30C9\u304C\u8981\u6C42\u3059\u308B\u30B9\
|
||||
|
||||
compiler.err.limit.string=\u5B9A\u6570\u6587\u5B57\u5217\u304C\u9577\u3059\u304E\u307E\u3059
|
||||
|
||||
compiler.err.limit.string.overflow=\u6587\u5B57\u5217\"{0}...\"\u306EUTF8\u8868\u73FE\u304C\u3001\u5B9A\u6570\u30D7\u30FC\u30EB\u306B\u5BFE\u3057\u3066\u9577\u3059\u304E\u307E\u3059
|
||||
compiler.err.limit.string.overflow=\u6587\u5B57\u5217"{0}..."\u306EUTF8\u8868\u73FE\u304C\u3001\u5B9A\u6570\u30D7\u30FC\u30EB\u306B\u5BFE\u3057\u3066\u9577\u3059\u304E\u307E\u3059
|
||||
|
||||
compiler.err.malformed.fp.lit=\u6D6E\u52D5\u5C0F\u6570\u70B9\u30EA\u30C6\u30E9\u30EB\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
@ -370,7 +472,9 @@ compiler.err.missing.meth.body.or.decl.abstract=\u30E1\u30BD\u30C3\u30C9\u672C\u
|
||||
|
||||
compiler.err.missing.ret.stmt=return\u6587\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
compiler.err.missing.ret.val=\u623B\u308A\u5024\u304C\u3042\u308A\u307E\u305B\u3093
|
||||
compiler.misc.missing.ret.val=\u623B\u308A\u5024\u304C\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
compiler.misc.unexpected.ret.val=\u4E88\u671F\u3057\u306A\u3044\u623B\u308A\u5024
|
||||
|
||||
# 0: set of modifier
|
||||
compiler.err.mod.not.allowed.here=\u4FEE\u98FE\u5B50{0}\u3092\u3053\u3053\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
@ -396,7 +500,26 @@ compiler.err.name.reserved.for.internal.use={0}\u306F\u5185\u90E8\u3067\u306E\u4
|
||||
compiler.err.native.meth.cant.have.body=native\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: type, 1: type
|
||||
compiler.err.neither.conditional.subtype=?\u306B\u5BFE\u3059\u308B\u4E92\u63DB\u6027\u306E\u306A\u3044\u578B : \u3069\u3061\u3089\u3082\u4ED6\u65B9\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\n2\u756A\u76EE\u306E\u30AA\u30DA\u30E9\u30F3\u30C9 : {0}\n3\u756A\u76EE\u306E\u30AA\u30DA\u30E9\u30F3\u30C9 : {1}
|
||||
compiler.err.neither.conditional.subtype=?\u306B\u5BFE\u3059\u308B\u4E0D\u9069\u5408\u306A\u578B : \u3069\u3061\u3089\u3082\u4ED6\u65B9\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\n2\u756A\u76EE\u306E\u30AA\u30DA\u30E9\u30F3\u30C9 : {0}\n3\u756A\u76EE\u306E\u30AA\u30DA\u30E9\u30F3\u30C9 : {1}
|
||||
|
||||
# 0: message segment
|
||||
compiler.misc.incompatible.type.in.conditional=\u6761\u4EF6\u5F0F\u306E\u578B\u304C\u4E0D\u6B63\u3067\u3059\u3002{0}
|
||||
|
||||
compiler.misc.conditional.target.cant.be.void=\u6761\u4EF6\u5F0F\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u578B\u306Fvoid\u306B\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: type
|
||||
compiler.misc.incompatible.ret.type.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u306E\u623B\u308A\u578B\u304C\u4E0D\u6B63\u3067\u3059\n{0}
|
||||
|
||||
# 0: type
|
||||
compiler.misc.incompatible.ret.type.in.mref=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u623B\u308A\u578B\u304C\u4E0D\u6B63\u3067\u3059\n{0}
|
||||
|
||||
# 0: list of type
|
||||
compiler.err.incompatible.thrown.types.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u3067\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u4E0D\u9069\u5408\u3067\u3059
|
||||
|
||||
# 0: list of type
|
||||
compiler.err.incompatible.thrown.types.in.mref=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u4E0D\u9069\u5408\u3067\u3059
|
||||
|
||||
compiler.misc.incompatible.arg.types.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u578B\u306F\u4E0D\u9069\u5408\u3067\u3059
|
||||
|
||||
compiler.err.new.not.allowed.in.annotation=''new''\u306F\u6CE8\u91C8\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
@ -413,6 +536,12 @@ compiler.err.not.annotation.type={0}\u306F\u6CE8\u91C8\u578B\u3067\u306F\u3042\u
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.not.def.access.class.intf.cant.access={1}\u306E{0}\u304C\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u3044\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.misc.not.def.access.class.intf.cant.access={1}\u306E{0}\u304C\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u3044\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
# 0: symbol, 1: list of type, 2: type
|
||||
compiler.misc.cant.access.inner.cls.constr=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF{0}({1})\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n\u5185\u90E8\u30AF\u30E9\u30B9\u3092\u56F2\u3080\u578B{2}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u30B9\u30B3\u30FC\u30D7\u5185\u306B\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.not.def.public.cant.access={1}\u306E{0}\u306Fpublic\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30D1\u30C3\u30B1\u30FC\u30B8\u5916\u304B\u3089\u306F\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
@ -440,7 +569,7 @@ compiler.err.warnings.and.werror=\u8B66\u544A\u304C\u898B\u3064\u304B\u308A-Werr
|
||||
# Errors related to annotation processing
|
||||
|
||||
# 0: symbol, 1: string, 2: stack-trace
|
||||
compiler.err.proc.cant.access={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}\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{2}
|
||||
compiler.err.proc.cant.access={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}\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{2}
|
||||
|
||||
# 0: symbol, 1: string
|
||||
compiler.err.proc.cant.access.1={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}
|
||||
@ -455,15 +584,13 @@ compiler.err.proc.messager={0}
|
||||
# 0: list of string
|
||||
compiler.err.proc.no.explicit.annotation.processing.requested=\u30AF\u30E9\u30B9\u540D''{0}''\u304C\u53D7\u3051\u5165\u308C\u3089\u308C\u308B\u306E\u306F\u3001\u6CE8\u91C8\u51E6\u7406\u304C\u660E\u793A\u7684\u306B\u30EA\u30AF\u30A8\u30B9\u30C8\u3055\u308C\u305F\u5834\u5408\u306E\u307F\u3067\u3059
|
||||
|
||||
compiler.err.proc.no.service=\u30B5\u30FC\u30D3\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u30FB\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\njava.util.ServiceLoader\u304Bsun.misc.Service\u304C\u4F7F\u7528\u3067\u304D\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
|
||||
compiler.err.proc.no.service=\u30B5\u30FC\u30D3\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u304C\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u304C\u3001\u6CE8\u91C8\u51E6\u7406\u306B\u5FC5\u8981\u3067\u3059\u3002
|
||||
|
||||
compiler.err.proc.processor.bad.option.name=\u30D7\u30ED\u30BB\u30C3\u30B5''{1}''\u306B\u3088\u3063\u3066\u6307\u5B9A\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u540D''{0}''\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
# 0: string
|
||||
compiler.err.proc.processor.cant.instantiate=\u30D7\u30ED\u30BB\u30C3\u30B5''{0}''\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
|
||||
|
||||
compiler.err.proc.processor.constructor.error=\u30D7\u30ED\u30BB\u30C3\u30B5\u30FB\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u69CB\u7BC9\u4E2D\u306B\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F: {0}
|
||||
|
||||
# 0: string
|
||||
compiler.err.proc.processor.not.found=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5''{0}''\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
|
||||
|
||||
@ -482,7 +609,10 @@ compiler.err.qualified.new.of.static.class=static\u30AF\u30E9\u30B9\u306Enew\u30
|
||||
compiler.err.recursive.ctor.invocation=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u547C\u51FA\u3057\u304C\u518D\u5E30\u7684\u3067\u3059
|
||||
|
||||
# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol
|
||||
compiler.err.ref.ambiguous={0}\u306E\u53C2\u7167\u306F\u3042\u3044\u307E\u3044\u3067\u3059\u3002{3}\u306E{1} {2}\u3068{6}\u306E{4} {5}\u304C\u4E21\u65B9\u9069\u5408\u3057\u307E\u3059
|
||||
compiler.err.ref.ambiguous={0}\u306E\u53C2\u7167\u306F\u3042\u3044\u307E\u3044\u3067\u3059\n{3}\u306E{1} {2}\u3068{6}\u306E{4} {5}\u306E\u4E21\u65B9\u304C\u4E00\u81F4\u3057\u307E\u3059
|
||||
|
||||
# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol
|
||||
compiler.misc.ref.ambiguous={0}\u306E\u53C2\u7167\u306F\u3042\u3044\u307E\u3044\u3067\u3059\n{3}\u306E{1} {2}\u3068{6}\u306E{4} {5}\u306E\u4E21\u65B9\u304C\u4E00\u81F4\u3057\u307E\u3059
|
||||
|
||||
compiler.err.repeated.annotation.target=\u6CE8\u91C8\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u7E70\u308A\u8FD4\u3055\u308C\u3066\u3044\u307E\u3059
|
||||
|
||||
@ -495,9 +625,9 @@ compiler.err.report.access={0}\u306F{2}\u3067{1}\u30A2\u30AF\u30BB\u30B9\u3055\u
|
||||
|
||||
compiler.err.ret.outside.meth=\u30E1\u30BD\u30C3\u30C9\u306E\u5916\u306Ereturn\u6587\u3067\u3059
|
||||
|
||||
compiler.err.signature.doesnt.match.supertype=\u30B7\u30B0\u30CB\u30C1\u30E3\u304C{0}\u306B\u9069\u5408\u3057\u307E\u305B\u3093\u3002\u4E92\u63DB\u6027\u306E\u306A\u3044\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u3067\u3059
|
||||
compiler.err.signature.doesnt.match.supertype=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C{0}\u306B\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u4E0D\u9069\u5408\u306A\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u3067\u3059
|
||||
|
||||
compiler.err.signature.doesnt.match.intf=\u30B7\u30B0\u30CB\u30C1\u30E3\u304C{0}\u306B\u9069\u5408\u3057\u307E\u305B\u3093\u3002\u4E92\u63DB\u6027\u306E\u306A\u3044\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u3059
|
||||
compiler.err.signature.doesnt.match.intf=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C{0}\u306B\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u4E0D\u9069\u5408\u306A\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u3059
|
||||
|
||||
# 0: symbol, 1: symbol, 2: symbol
|
||||
compiler.err.does.not.override.abstract={0}\u306Fabstract\u3067\u306A\u304F\u3001{2}\u5185\u306Eabstract\u30E1\u30BD\u30C3\u30C9{1}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u305B\u3093
|
||||
@ -534,7 +664,28 @@ compiler.err.type.var.more.than.once=\u578B\u5909\u6570{0}\u306F{1}\u306E\u623B\
|
||||
compiler.err.type.var.more.than.once.in.result=\u578B\u5909\u6570{0}\u306F{1}\u306E\u578B\u30672\u56DE\u4EE5\u4E0A\u51FA\u73FE\u3057\u307E\u3059\u3002\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u751F\u6210\u3055\u308C\u306A\u3044\u307E\u307E\u306B\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: type, 1: type, 2: string
|
||||
compiler.err.types.incompatible.diff.ret=\u578B{0}\u3068\u578B{1}\u306E\u4E92\u63DB\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u4E21\u65B9\u3068\u3082{2}\u3092\u5B9A\u7FA9\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u623B\u308A\u5024\u306E\u578B\u304C\u7121\u95A2\u4FC2\u3067\u3059
|
||||
compiler.err.types.incompatible.diff.ret=\u578B{0}\u3068\u578B{1}\u304C\u9069\u5408\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u4E21\u65B9\u3068\u3082{2}\u3092\u5B9A\u7FA9\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u623B\u308A\u5024\u306E\u578B\u304C\u7121\u95A2\u4FC2\u3067\u3059
|
||||
|
||||
# 0: kind, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol
|
||||
compiler.err.types.incompatible.unrelated.defaults={0} {1}\u306F\u578B{4}\u3068{5}\u304B\u3089{2}({3})\u306E\u95A2\u9023\u3057\u306A\u3044\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u7D99\u627F\u3057\u307E\u3059
|
||||
|
||||
# 0: kind, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol
|
||||
compiler.err.types.incompatible.abstract.default={0} {1}\u306F\u578B{4}\u3068{5}\u304B\u3089{2}({3})\u306E\u62BD\u8C61\u3068\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u7D99\u627F\u3057\u307E\u3059
|
||||
|
||||
# 0: name, 1: kind, 2: symbol
|
||||
compiler.err.default.overrides.object.member={1} {2}\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9{0}\u306Fjava.lang.Object\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059
|
||||
|
||||
# 0: type
|
||||
compiler.err.illegal.static.intf.meth.call=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u30FB\u30B3\u30FC\u30EB\u304C\u4E0D\u6B63\u3067\u3059\n\u53D7\u4FE1\u5F0F\u306F\u578B\u4FEE\u98FE\u5B50''{0}''\u3067\u7F6E\u63DB\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
# 0: type, 1: message segment
|
||||
compiler.err.illegal.default.super.call=\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30B9\u30FC\u30D1\u30FC\u30FB\u30B3\u30FC\u30EB\u306E\u578B\u4FEE\u98FE\u5B50{0}\u304C\u4E0D\u6B63\u3067\u3059\n{1}
|
||||
|
||||
# 0: symbol, 1: type
|
||||
compiler.misc.overridden.default={1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u307E\u3059
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.misc.redundant.supertype=\u5197\u9577\u306A\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u306F{1}\u306B\u3088\u3063\u3066\u62E1\u5F35\u3055\u308C\u307E\u3057\u305F
|
||||
|
||||
compiler.err.unclosed.char.lit=\u6587\u5B57\u30EA\u30C6\u30E9\u30EB\u304C\u9589\u3058\u3089\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
@ -550,19 +701,14 @@ compiler.err.io.exception=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E
|
||||
# 0: name
|
||||
compiler.err.undef.label=\u30E9\u30D9\u30EB{0}\u306F\u672A\u5B9A\u7FA9\u3067\u3059
|
||||
|
||||
compiler.err.undetermined.type={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: type, 1: message segment
|
||||
compiler.err.undetermined.type.1={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\n\u7406\u7531: {1}
|
||||
|
||||
# 0: list of type, 1: message segment
|
||||
compiler.err.invalid.inferred.types={0}\u306E\u63A8\u5B9A\u578B\u304C\u7121\u52B9\u3067\u3059\u3002{1}
|
||||
|
||||
# 0: message segment, 1: unused
|
||||
compiler.err.cant.apply.diamond={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093
|
||||
compiler.err.cant.apply.diamond={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: message segment, 1: message segment
|
||||
compiler.err.cant.apply.diamond.1={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\n\u7406\u7531: {1}
|
||||
# 0: message segment or type, 1: message segment
|
||||
compiler.err.cant.apply.diamond.1={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n\u7406\u7531: {1}
|
||||
|
||||
# 0: message segment or type, 1: message segment
|
||||
compiler.misc.cant.apply.diamond.1={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n\u7406\u7531: {1}
|
||||
|
||||
compiler.err.unreachable.stmt=\u3053\u306E\u6587\u306B\u5236\u5FA1\u304C\u79FB\u308B\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
@ -605,7 +751,7 @@ compiler.misc.varargs.trustme.on.non.varargs.meth=\u30E1\u30BD\u30C3\u30C9{0}\u3
|
||||
# 0: symbol
|
||||
compiler.misc.varargs.trustme.on.virtual.varargs=\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9{0}\u306Ffinal\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
|
||||
# 0: type, 1: kind, 2: symbol
|
||||
# 0: type, 1: symbol kind, 2: symbol
|
||||
compiler.misc.inaccessible.varargs.type=\u4EEE\u53EF\u5909\u5F15\u6570\u8981\u7D20\u578B{0}\u306F{1} {2}\u304B\u3089\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# In the following string, {1} will always be the detail message from
|
||||
@ -620,7 +766,7 @@ compiler.err.class.public.should.be.in.file=\u30AF\u30E9\u30B9{0}\u306Fpublic\u3
|
||||
|
||||
## All errors which do not refer to a particular line in the source code are
|
||||
## preceded by this string.
|
||||
compiler.err.error=\u30A8\u30E9\u30FC:\u0020
|
||||
compiler.err.error=\u30A8\u30E9\u30FC:
|
||||
|
||||
# The following error messages do not refer to a line in the source code.
|
||||
compiler.err.cant.read.file={0}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093
|
||||
@ -637,7 +783,7 @@ compiler.misc.fatal.err.cant.locate.field=\u81F4\u547D\u7684\u30A8\u30E9\u30FC:
|
||||
|
||||
compiler.misc.fatal.err.cant.locate.ctor=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: {0}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.misc.fatal.err.cant.close.loader=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u306E\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u3092\u9589\u3058\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093
|
||||
compiler.misc.fatal.err.cant.close=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u30B3\u30F3\u30D1\u30A4\u30E9\u30FB\u30EA\u30BD\u30FC\u30B9\u3092\u9589\u3058\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
#####
|
||||
|
||||
@ -659,21 +805,24 @@ compiler.misc.x.print.rounds=\u5F80\u5FA9{0}:\n\t\u5165\u529B\u30D5\u30A1\u30A4\
|
||||
|
||||
## The following string will appear before all messages keyed as:
|
||||
## "compiler.note".
|
||||
|
||||
compiler.note.potential.lambda.found=\u3053\u306E\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3092\u30E9\u30E0\u30C0\u5F0F\u306B\u5909\u63DB\u3067\u304D\u307E\u3059\u3002
|
||||
|
||||
compiler.note.note=\u6CE8\u610F:
|
||||
|
||||
# 0: file name
|
||||
compiler.note.deprecated.filename={0}\u306F\u63A8\u5968\u3055\u308C\u306A\u3044API\u3092\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002
|
||||
compiler.note.deprecated.filename={0}\u306F\u975E\u63A8\u5968\u306EAPI\u3092\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002
|
||||
|
||||
compiler.note.deprecated.plural=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u63A8\u5968\u3055\u308C\u306A\u3044API\u3092\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002
|
||||
compiler.note.deprecated.plural=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u975E\u63A8\u5968\u306EAPI\u3092\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002
|
||||
|
||||
# The following string may appear after one of the above deprecation
|
||||
# messages.
|
||||
compiler.note.deprecated.recompile=\u8A73\u7D30\u306F\u3001-Xlint:deprecation\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u3066\u518D\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
|
||||
# 0: file name
|
||||
compiler.note.deprecated.filename.additional={0}\u306B\u63A8\u5968\u3055\u308C\u306A\u3044API\u306E\u8FFD\u52A0\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u304C\u3042\u308A\u307E\u3059\u3002
|
||||
compiler.note.deprecated.filename.additional={0}\u306B\u975E\u63A8\u5968\u306EAPI\u306E\u8FFD\u52A0\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u304C\u3042\u308A\u307E\u3059\u3002
|
||||
|
||||
compiler.note.deprecated.plural.additional=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u63A8\u5968\u3055\u308C\u306A\u3044API\u3092\u8FFD\u52A0\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002
|
||||
compiler.note.deprecated.plural.additional=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u975E\u63A8\u5968\u306EAPI\u3092\u8FFD\u52A0\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002
|
||||
|
||||
# 0: file name
|
||||
compiler.note.unchecked.filename={0}\u306E\u64CD\u4F5C\u306F\u3001\u672A\u30C1\u30A7\u30C3\u30AF\u307E\u305F\u306F\u5B89\u5168\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
@ -773,12 +922,12 @@ compiler.misc.resume.abort=R)\u518D\u958B,A)\u4E2D\u6B62>
|
||||
##
|
||||
|
||||
## All warning messages are preceded by the following string.
|
||||
compiler.warn.warning=\u8B66\u544A:
|
||||
compiler.warn.warning=\u8B66\u544A:
|
||||
|
||||
## Warning messages may also include the following prefix to identify a
|
||||
## lint option
|
||||
# 0: option name
|
||||
compiler.warn.lintOption=[{0}]\u0020
|
||||
compiler.warn.lintOption=[{0}]
|
||||
|
||||
# 0: symbol
|
||||
compiler.warn.constant.SVUID=serialVersionUID\u306F\u30AF\u30E9\u30B9{0}\u306E\u5B9A\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
@ -789,7 +938,7 @@ compiler.warn.dir.path.element.not.found=\u4E0D\u6B63\u306A\u30D1\u30B9\u8981\u7
|
||||
compiler.warn.finally.cannot.complete=finally\u7BC0\u304C\u6B63\u5E38\u306B\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.warn.has.been.deprecated={1}\u306E{0}\u306F\u63A8\u5968\u3055\u308C\u307E\u305B\u3093
|
||||
compiler.warn.has.been.deprecated={1}\u306E{0}\u306F\u975E\u63A8\u5968\u306B\u306A\u308A\u307E\u3057\u305F
|
||||
|
||||
# 0: symbol
|
||||
compiler.warn.sun.proprietary={0}\u306F\u5185\u90E8\u6240\u6709\u306EAPI\u3067\u3042\u308A\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
|
||||
@ -925,7 +1074,7 @@ compiler.warn.unchecked.varargs.non.reifiable.type=\u30D1\u30E9\u30E1\u30FC\u30B
|
||||
# 0: symbol
|
||||
compiler.warn.varargs.unsafe.use.varargs.param=\u53EF\u5909\u5F15\u6570\u30E1\u30BD\u30C3\u30C9\u306F\u3001\u578B\u60C5\u5831\u4FDD\u6301\u53EF\u80FD\u3067\u306A\u3044\u53EF\u5909\u5F15\u6570\u30D1\u30E9\u30E1\u30FC\u30BF{0}\u304B\u3089\u306E\u30D2\u30FC\u30D7\u6C5A\u67D3\u306E\u539F\u56E0\u3068\u306A\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
compiler.warn.missing.deprecated.annotation=\u63A8\u5968\u3055\u308C\u306A\u3044\u9805\u76EE\u306F@Deprecated\u3067\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
compiler.warn.missing.deprecated.annotation=\u975E\u63A8\u5968\u306E\u9805\u76EE\u306F@Deprecated\u3067\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
compiler.warn.invalid.archive.file=\u30D1\u30B9\u4E0A\u306E\u4E88\u671F\u3057\u306A\u3044\u30D5\u30A1\u30A4\u30EB: {0}
|
||||
|
||||
@ -952,7 +1101,7 @@ compiler.warn.raw.class.use=raw\u578B\u304C\u898B\u3064\u304B\u308A\u307E\u3057\
|
||||
compiler.warn.diamond.redundant.args=\u65B0\u3057\u3044\u5F0F\u306E\u578B\u5F15\u6570\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059(\u304B\u308F\u308A\u306B\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u3092\u4F7F\u7528\u3057\u307E\u3059)\u3002
|
||||
|
||||
# 0: type, 1: type
|
||||
compiler.warn.diamond.redundant.args.1=\u65B0\u3057\u3044\u5F0F\u306E\u578B\u5F15\u6570\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059(\u304B\u308F\u308A\u306B\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u3092\u4F7F\u7528\u3057\u307E\u3059)\u3002\n\u660E\u793A\u7684: {0}\n\u63A8\u5B9A: {1}
|
||||
compiler.warn.diamond.redundant.args.1=\u65B0\u3057\u3044\u5F0F\u306E\u578B\u5F15\u6570\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059(\u304B\u308F\u308A\u306B\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u3092\u4F7F\u7528\u3057\u307E\u3059)\u3002\n\u660E\u793A\u7684: {0}\n\u63A8\u8AD6: {1}
|
||||
|
||||
# 0: symbol, 1: message segment
|
||||
compiler.warn.varargs.redundant.trustme.anno={0}\u6CE8\u91C8\u304C\u5197\u9577\u3067\u3059\u3002{1}
|
||||
@ -1030,7 +1179,7 @@ compiler.misc.bad.source.file.header=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\
|
||||
|
||||
## The following are all possible strings for the second argument ({1}) of the
|
||||
## above strings.
|
||||
compiler.misc.bad.class.signature=\u30AF\u30E9\u30B9{0}\u306E\u30B7\u30B0\u30CB\u30C1\u30E3\u304C\u4E0D\u6B63\u3067\u3059
|
||||
compiler.misc.bad.class.signature=\u30AF\u30E9\u30B9{0}\u306E\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
#0: symbol, 1: symbol
|
||||
compiler.misc.bad.enclosing.class={0}\u306E\u5185\u90E8\u30AF\u30E9\u30B9\u304C\u4E0D\u6B63\u3067\u3059: {1}
|
||||
@ -1044,7 +1193,9 @@ compiler.misc.bad.const.pool.tag=\u5B9A\u6570\u30D7\u30FC\u30EB\u30FB\u30BF\u30B
|
||||
|
||||
compiler.misc.bad.const.pool.tag.at=\u5B9A\u6570\u30D7\u30FC\u30EB\u30FB\u30BF\u30B0{1}\u3067\u306E{0}\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
compiler.misc.bad.signature=\u30B7\u30B0\u30CB\u30C1\u30E3{0}\u304C\u4E0D\u6B63\u3067\u3059
|
||||
compiler.misc.bad.signature=\u30B7\u30B0\u30CD\u30C1\u30E3{0}\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
compiler.misc.bad.type.annotation.value=\u6CE8\u91C8\u30BF\u30FC\u30B2\u30C3\u30C8\u578B\u306E\u5024\u306E\u578B\u304C\u4E0D\u6B63\u3067\u3059: {0}
|
||||
|
||||
compiler.misc.class.file.wrong.class=\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB{0}\u306B\u4E0D\u6B63\u306A\u30AF\u30E9\u30B9\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
@ -1077,24 +1228,17 @@ compiler.err.not.within.bounds=\u578B\u5F15\u6570{0}\u306F\u578B\u5909\u6570{1}\
|
||||
|
||||
#####
|
||||
|
||||
# 0: message segment, 1: type, 2: type
|
||||
compiler.err.prob.found.req={0}\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {1}
|
||||
# 0: message segment
|
||||
compiler.err.prob.found.req=\u4E0D\u9069\u5408\u306A\u578B: {0}
|
||||
|
||||
# 0: message segment, 1: type, 2: type
|
||||
compiler.warn.prob.found.req={0}\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {1}
|
||||
|
||||
compiler.err.prob.found.req.1={0} {3}\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {1}
|
||||
# 0: type, 1: type
|
||||
compiler.misc.inconvertible.types={0}\u3092{1}\u306B\u5909\u63DB\u3067\u304D\u307E\u305B\u3093:
|
||||
|
||||
## The following are all possible strings for the first argument ({0}) of the
|
||||
## above strings.
|
||||
compiler.misc.incompatible.types=\u4E92\u63DB\u6027\u306E\u306A\u3044\u578B
|
||||
|
||||
# 0: message segment
|
||||
compiler.misc.incompatible.types.1=\u4E92\u63DB\u6027\u306E\u306A\u3044\u578B\u3002{0}
|
||||
|
||||
compiler.misc.inconvertible.types=\u5909\u63DB\u3067\u304D\u306A\u3044\u578B
|
||||
|
||||
compiler.misc.possible.loss.of.precision=\u7CBE\u5EA6\u304C\u4F4E\u4E0B\u3057\u3066\u3044\u308B\u53EF\u80FD\u6027
|
||||
# 0: type, 1: type
|
||||
compiler.misc.possible.loss.of.precision=\u7CBE\u5EA6\u304C\u5931\u308F\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B{0}\u304B\u3089{1}\u3078\u306E\u5909\u63DB
|
||||
|
||||
compiler.misc.unchecked.assign=\u7121\u691C\u67FB\u5909\u63DB
|
||||
|
||||
@ -1104,16 +1248,13 @@ compiler.misc.unchecked.assign=\u7121\u691C\u67FB\u5909\u63DB
|
||||
# assigned array cannot dynamically check its stores
|
||||
compiler.misc.unchecked.cast.to.type=\u7121\u691C\u67FB\u30AD\u30E3\u30B9\u30C8
|
||||
|
||||
compiler.misc.assignment.from.super-bound=\u30B9\u30FC\u30D1\u30FC\u30D0\u30A6\u30F3\u30C9\u578B{0}\u304B\u3089\u306E\u4EE3\u5165
|
||||
|
||||
compiler.misc.assignment.to.extends-bound=\u62E1\u5F35\u30D0\u30A6\u30F3\u30C9\u578B{0}\u3078\u306E\u4EE3\u5165
|
||||
|
||||
# compiler.err.star.expected=\
|
||||
# ''*'' expected
|
||||
# compiler.err.no.elem.type=\
|
||||
# \[\*\] cannot have a type
|
||||
|
||||
compiler.misc.try.not.applicable.to.type=try-with-resource\u306F\u5909\u6570\u578B\u306B\u9069\u7528\u3055\u308C\u307E\u305B\u3093
|
||||
# 0: type
|
||||
compiler.misc.try.not.applicable.to.type=try-with-resource\u306F\u5909\u6570\u578B\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\n({0})
|
||||
|
||||
#####
|
||||
|
||||
@ -1139,25 +1280,44 @@ compiler.misc.type.parameter=\u578B\u30D1\u30E9\u30E1\u30FC\u30BF{0}
|
||||
|
||||
## The following are all possible strings for the last argument of all those
|
||||
## diagnostics whose key ends in ".1"
|
||||
compiler.misc.undetermined.type=\u672A\u5B9A\u578B
|
||||
|
||||
compiler.misc.type.variable.has.undetermined.type=\u578B\u5909\u6570{0}\u306F\u672A\u5B9A\u578B\u3067\u3059
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.no.unique.maximal.instance.exists=\u578B\u5909\u6570{0}(\u4E0A\u9650{1})\u306E\u56FA\u6709\u306E\u6700\u5927\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u307E\u305B\u3093
|
||||
|
||||
compiler.misc.no.unique.minimal.instance.exists=\u578B\u5909\u6570{0}(\u4E0B\u9650{1})\u306E\u56FA\u6709\u306E\u6700\u5C0F\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u307E\u305B\u3093
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.incompatible.upper.bounds=\u63A8\u8AD6\u5909\u6570{0}\u306B\u306F\u3001\u4E0D\u9069\u5408\u306A\u4E0A\u9650{1}\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
# 0: type, 1: list of type, 2: list of type
|
||||
compiler.misc.incompatible.eq.upper.bounds=\u63A8\u8AD6\u5909\u6570{0}\u306B\u306F\u3001\u4E0D\u9069\u5408\u306A\u5883\u754C\u304C\u3042\u308A\u307E\u3059\n\u7B49\u4FA1\u5236\u7D04: {1}\n\u4E0A\u9650: {2}
|
||||
|
||||
# 0: type, 1: list of type, 2: list of type
|
||||
compiler.misc.incompatible.eq.lower.bounds=\u63A8\u8AD6\u5909\u6570{0}\u306B\u306F\u3001\u4E0D\u9069\u5408\u306A\u5883\u754C\u304C\u3042\u308A\u307E\u3059\n\u7B49\u4FA1\u5236\u7D04: {1}\n\u4E0B\u9650: {2}
|
||||
|
||||
# 0: list of type, 1: type, 2: type
|
||||
compiler.misc.infer.no.conforming.instance.exists=\u578B\u5909\u6570{0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u306A\u3044\u306E\u3067\u3001{1}\u306F{2}\u306B\u9069\u5408\u3057\u307E\u305B\u3093
|
||||
|
||||
# 0: list of type, 1: type, 2: type
|
||||
compiler.misc.infer.no.conforming.assignment.exists=\u578B\u5909\u6570{0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u306A\u3044\u306E\u3067\u3001\u5F15\u6570\u578B{1}\u306F\u4EEE\u30D1\u30E9\u30E1\u30FC\u30BF\u578B{2}\u306B\u9069\u5408\u3057\u307E\u305B\u3093
|
||||
# 0: list of type, 1: message segment
|
||||
compiler.misc.infer.no.conforming.assignment.exists=\u578B\u5909\u6570{0}\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n(\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {1})
|
||||
|
||||
compiler.misc.infer.arg.length.mismatch=\u5B9F\u5F15\u6570\u30EA\u30B9\u30C8\u3068\u4EEE\u5F15\u6570\u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C\u7570\u306A\u308B\u305F\u3081\u3001\u5F15\u6570\u304B\u3089\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
|
||||
# 0: list of type
|
||||
compiler.misc.infer.arg.length.mismatch=\u578B\u5909\u6570{0}\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n(\u5B9F\u5F15\u6570\u30EA\u30B9\u30C8\u3068\u4EEE\u5F15\u6570\u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C\u7570\u306A\u308A\u307E\u3059)
|
||||
|
||||
# 0: list of type, 1: message segment
|
||||
compiler.misc.infer.varargs.argument.mismatch=\u578B\u5909\u6570{0}\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n(\u53EF\u5909\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {1})
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.inferred.do.not.conform.to.bounds=\u63A8\u5B9A\u578B\u306F\u5BA3\u8A00\u3055\u308C\u305F\u5883\u754C\u306B\u9069\u5408\u3057\u307E\u305B\u3093\n\u63A8\u5B9A: {0}\n\u5883\u754C: {1}
|
||||
compiler.misc.inferred.do.not.conform.to.upper.bounds=\u63A8\u8AD6\u578B\u304C\u4E0A\u9650\u306B\u9069\u5408\u3057\u307E\u305B\u3093\n\u63A8\u8AD6: {0}\n\u4E0A\u9650: {1}
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.inferred.do.not.conform.to.lower.bounds=\u63A8\u8AD6\u578B\u304C\u4E0B\u9650\u306B\u9069\u5408\u3057\u307E\u305B\u3093\n\u63A8\u8AD6: {0}\n\u4E0B\u9650: {1}
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.inferred.do.not.conform.to.eq.bounds=\u63A8\u8AD6\u578B\u304C\u7B49\u4FA1\u5236\u7D04\u306B\u9069\u5408\u3057\u307E\u305B\u3093\n\u63A8\u8AD6: {0}\n\u7B49\u4FA1\u5236\u7D04: {1}
|
||||
|
||||
# 0: list of type
|
||||
compiler.misc.cyclic.inference=\u63A8\u8AD6\u306E\u30EB\u30FC\u30D7\u306E\u305F\u3081\u3001\u63A8\u8AD6\u5909\u6570{0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol
|
||||
compiler.misc.diamond={0}<>
|
||||
@ -1165,6 +1325,7 @@ compiler.misc.diamond={0}<>
|
||||
# 0: type
|
||||
compiler.misc.diamond.non.generic=\u975E\u6C4E\u7528\u30AF\u30E9\u30B9{0}\u3067''<>''\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: unused
|
||||
compiler.misc.diamond.and.explicit.params=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u660E\u793A\u7684\u306A\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306F''<>''\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: type, 1: list of type
|
||||
@ -1172,14 +1333,18 @@ compiler.misc.explicit.param.do.not.conform.to.bounds=\u660E\u793A\u7684\u306A\u
|
||||
|
||||
compiler.misc.arg.length.mismatch=\u5B9F\u5F15\u6570\u30EA\u30B9\u30C8\u3068\u4EEE\u5F15\u6570\u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C\u7570\u306A\u308A\u307E\u3059
|
||||
|
||||
# 0: type, 1: type
|
||||
compiler.misc.no.conforming.assignment.exists=\u5B9F\u5F15\u6570{0}\u306F\u30E1\u30BD\u30C3\u30C9\u547C\u51FA\u5909\u63DB\u306B\u3088\u3063\u3066{1}\u306B\u5909\u63DB\u3067\u304D\u307E\u305B\u3093
|
||||
# 0: message segment
|
||||
compiler.misc.no.conforming.assignment.exists=\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {0}
|
||||
|
||||
# 0: type, 1: type
|
||||
compiler.misc.varargs.argument.mismatch=\u5F15\u6570\u578B{0}\u306F\u53EF\u5909\u5F15\u6570\u8981\u7D20\u578B{1}\u306B\u9069\u5408\u3057\u307E\u305B\u3093
|
||||
# 0: message segment
|
||||
compiler.misc.varargs.argument.mismatch=\u53EF\u5909\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {0}
|
||||
|
||||
#####
|
||||
|
||||
# 0: type, 1: file name
|
||||
compiler.warn.auxiliary.class.accessed.from.outside.of.its.source.file={1}\u306E\u88DC\u52A9\u30AF\u30E9\u30B9{0}\u306B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u5916\u304B\u3089\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
|
||||
## The first argument ({0}) is a "kindname".
|
||||
# 0: symbol kind, 1: symbol, 2: symbol
|
||||
compiler.err.abstract.cant.be.accessed.directly=\u62BD\u8C61{0}\u3067\u3042\u308B{1}({2}\u5185)\u306B\u76F4\u63A5\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
@ -1188,10 +1353,17 @@ compiler.err.abstract.cant.be.accessed.directly=\u62BD\u8C61{0}\u3067\u3042\u308
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.err.non-static.cant.be.ref=static\u3067\u306A\u3044{0} {1}\u3092static\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u53C2\u7167\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.misc.non-static.cant.be.ref=static\u3067\u306A\u3044{0} {1}\u3092static\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u53C2\u7167\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
## Both arguments ({0}, {1}) are "kindname"s. {0} is a comma-separated list
|
||||
## of kindnames (the list should be identical to that provided in source.
|
||||
compiler.err.unexpected.type=\u4E88\u671F\u3057\u306A\u3044\u578B\n\u671F\u5F85\u5024: {0}\n\u691C\u51FA\u5024: {1}
|
||||
|
||||
compiler.err.unexpected.lambda=\u3053\u3053\u3067\u306F\u30E9\u30E0\u30C0\u5F0F\u306F\u4E88\u671F\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
compiler.err.unexpected.mref=\u3053\u3053\u3067\u306F\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306F\u4E88\u671F\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
## The first argument {0} is a "kindname" (e.g. 'constructor', 'field', etc.)
|
||||
## The second argument {1} is the non-resolved symbol
|
||||
## The third argument {2} is a list of type parameters (non-empty if {1} is a method)
|
||||
@ -1216,12 +1388,20 @@ compiler.err.cant.resolve.location.args=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u30
|
||||
# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
|
||||
compiler.err.cant.resolve.location.args.params=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} <{2}>{1}({3})\n\u5834\u6240: {4}
|
||||
|
||||
### Following are replicated/used for method reference diagnostics
|
||||
|
||||
# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
|
||||
compiler.misc.cant.resolve.location.args=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} {1}({3})\n\u5834\u6240: {4}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
|
||||
compiler.misc.cant.resolve.location.args.params=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} <{2}>{1}({3})\n\u5834\u6240: {4}
|
||||
|
||||
##a location subdiagnostic is composed as follows:
|
||||
## The first argument {0} is the location "kindname" (e.g. 'constructor', 'field', etc.)
|
||||
## The second argument {1} is the location name
|
||||
## The third argument {2} is the location type (only when {1} is a variable name)
|
||||
|
||||
# 0: symbol kind, 1: symbol, 2: unused
|
||||
# 0: symbol kind, 1: type or symbol, 2: unused
|
||||
compiler.misc.location={0} {1}
|
||||
|
||||
# 0: symbol kind, 1: symbol, 2: type
|
||||
@ -1236,7 +1416,7 @@ compiler.misc.kindname.annotation=@interface
|
||||
|
||||
compiler.misc.kindname.constructor=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
|
||||
|
||||
compiler.misc.kindname.enum=\u5217\u6319
|
||||
compiler.misc.kindname.enum=\u5217\u6319\u578B
|
||||
|
||||
compiler.misc.kindname.interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
|
||||
|
||||
@ -1256,6 +1436,10 @@ compiler.misc.kindname.class=\u30AF\u30E9\u30B9
|
||||
|
||||
compiler.misc.kindname.package=\u30D1\u30C3\u30B1\u30FC\u30B8
|
||||
|
||||
compiler.misc.kindname.static.init=static\u521D\u671F\u5316\u5B50
|
||||
|
||||
compiler.misc.kindname.instance.init=\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u521D\u671F\u5316\u5B50
|
||||
|
||||
#####
|
||||
|
||||
compiler.misc.no.args=\u5F15\u6570\u304C\u3042\u308A\u307E\u305B\u3093
|
||||
@ -1312,6 +1496,7 @@ compiler.misc.varargs.implement={1}\u306E{0}\u306F{3}\u306E{2}\u3092\u5B9F\u88C5
|
||||
# 0: symbol, 1: symbol, 2: symbol, 3: symbol
|
||||
compiler.misc.varargs.clash.with={1}\u306E{0}\u306F{3}\u306E{2}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059
|
||||
|
||||
# 0: unused
|
||||
compiler.misc.diamond.and.anon.class=\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u306F''<>''\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
# 0: symbol kind, 1: symbol, 2: symbol, 3: message segment
|
||||
@ -1336,13 +1521,23 @@ compiler.warn.enum.as.identifier=\u30EA\u30EA\u30FC\u30B95\u304B\u3089''enum''\u
|
||||
|
||||
compiler.warn.assert.as.identifier=\u30EA\u30EA\u30FC\u30B91.4\u304B\u3089''assert''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u3001\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n(''assert''\u3092\u30AD\u30FC\u30EF\u30FC\u30C9\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001-source 1.4\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
compiler.warn.underscore.as.identifier=\u8B58\u5225\u5B50\u3068\u3057\u3066''_''\u304C\u4F7F\u7528\u3055\u308C\u307E\u3057\u305F\n(\u8B58\u5225\u5B50\u3068\u3057\u3066\u306E''_''\u306E\u4F7F\u7528\u306F\u3001\u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059)
|
||||
|
||||
compiler.err.enum.as.identifier=\u30EA\u30EA\u30FC\u30B95\u304B\u3089''enum''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n(''enum''\u3092\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u306B\u306F-source 1.4\u4EE5\u524D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
compiler.err.assert.as.identifier=\u30EA\u30EA\u30FC\u30B91.4\u304B\u3089''assert''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u3001\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n(''assert''\u3092\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001-source 1.3\u4EE5\u524D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
# TODO 308: make a better error message
|
||||
# compiler.err.this.as.identifier=\
|
||||
# as of release 8, ''this'' is allowed as the parameter name for the receiver type only, which has to be the first parameter
|
||||
compiler.err.this.as.identifier=\u30EA\u30EA\u30FC\u30B98\u304B\u3089''this''\u306F\u53D7\u4FE1\u30BF\u30A4\u30D7\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3068\u3057\u3066\u306E\u307F\u8A31\u53EF\u3055\u308C\u3001\u6700\u521D\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
# TODO 308: make a better error message
|
||||
compiler.err.cant.annotate.static.class=\u5305\u542B\u3059\u308Bstatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306F\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
# TODO 308: make a better error message
|
||||
compiler.err.cant.annotate.nested.type=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30BF\u30A4\u30D7\u306F\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
|
||||
|
||||
compiler.err.incorrect.receiver.type=\u53D7\u4FE1\u30BF\u30A4\u30D7\u304C\u3001\u5305\u542B\u3059\u308B\u30AF\u30E9\u30B9\u30FB\u30BF\u30A4\u30D7\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093
|
||||
|
||||
compiler.err.no.annotations.on.dot.class=\u6CE8\u91C8\u306F\u30AF\u30E9\u30B9\u30FB\u30EA\u30C6\u30E9\u30EB\u306E\u30BF\u30A4\u30D7\u3067\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
|
||||
|
||||
# 0: string
|
||||
compiler.err.generics.not.supported.in.source=\u7DCF\u79F0\u578B\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u7DCF\u79F0\u578B\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 5\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
@ -1353,9 +1548,8 @@ compiler.err.varargs.not.supported.in.source=\u53EF\u5909\u5F15\u6570\u30E1\u30B
|
||||
# 0: string
|
||||
compiler.err.annotations.not.supported.in.source=\u6CE8\u91C8\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u6CE8\u91C8\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 5\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
#308 compiler.err.type.annotations.not.supported.in.source=\
|
||||
#308 type annotations are not supported in -source {0}\n\
|
||||
#308 (use -source 8 or higher to enable type annotations)
|
||||
# 0: string
|
||||
compiler.err.type.annotations.not.supported.in.source=\u30BF\u30A4\u30D7\u6CE8\u91C8\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30BF\u30A4\u30D7\u6CE8\u91C8\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
# 0: string
|
||||
compiler.err.foreach.not.supported.in.source=for-each\u30EB\u30FC\u30D7\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(for-each\u30EB\u30FC\u30D7\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 5\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
@ -1375,6 +1569,47 @@ compiler.err.multicatch.not.supported.in.source=\u8907\u6570catch\u6587\u306F-so
|
||||
# 0: string
|
||||
compiler.err.string.switch.not.supported.in.source=switch\u5185\u306E\u6587\u5B57\u5217\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(switch\u5185\u306E\u6587\u5B57\u5217\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 7\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
# 0: string
|
||||
compiler.err.lambda.not.supported.in.source=\u30E9\u30E0\u30C0\u5F0F\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30E9\u30E0\u30C0\u5F0F\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
# 0: string
|
||||
compiler.err.method.references.not.supported.in.source=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
# 0: string
|
||||
compiler.err.default.methods.not.supported.in.source=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
# 0: string
|
||||
compiler.err.intersection.types.in.cast.not.supported.in.source=\u30AD\u30E3\u30B9\u30C8\u5185\u306Eintersection\u578B\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
# 0: string
|
||||
compiler.err.static.intf.methods.not.supported.in.source=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
|
||||
|
||||
########################################
|
||||
# Diagnostics for verbose resolution
|
||||
# used by Resolve (debug only)
|
||||
########################################
|
||||
|
||||
# 0: number, 1: symbol, 2: unused
|
||||
compiler.misc.applicable.method.found=#{0}\u500B\u306E\u4F7F\u7528\u53EF\u80FD\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {1}
|
||||
|
||||
# 0: number, 1: symbol, 2: message segment
|
||||
compiler.misc.applicable.method.found.1=#{0}\u500B\u306E\u4F7F\u7528\u53EF\u80FD\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {1}\n({2})
|
||||
|
||||
# 0: number, 1: symbol, 2: message segment
|
||||
compiler.misc.not.applicable.method.found=#{0}\u500B\u306E\u4F7F\u7528\u3067\u304D\u306A\u3044\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {1}\n({2})
|
||||
|
||||
# 0: type
|
||||
compiler.misc.partial.inst.sig=\u90E8\u5206\u7684\u306B\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3055\u308C\u307E\u3057\u305F: {0}
|
||||
|
||||
# 0: name, 1: symbol, 2: number, 3: MethodResolutionPhase, 4: list of type or message segment, 5: list of type or message segment
|
||||
compiler.note.verbose.resolve.multi=\u578B{1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3092\u5019\u88DC{2}\u306B\u89E3\u6C7A\u3057\u3066\u3044\u307E\u3059\n\u30D5\u30A7\u30FC\u30BA: {3}\n\u5B9F\u969B\u306E\u578B: {4}\n\u578B\u5F15\u6570: {5}\n\u5019\u88DC:
|
||||
|
||||
# 0: name, 1: symbol, 2: unused, 3: MethodResolutionPhase, 4: list of type or message segment, 5: list of type or message segment
|
||||
compiler.note.verbose.resolve.multi.1=\u578B{1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306E\u89E3\u6C7A\u306B\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059\n\u30D5\u30A7\u30FC\u30BA: {3}\n\u5B9F\u969B\u306E\u578B: {4}\n\u578B\u5F15\u6570: {5}\n\u5019\u88DC:
|
||||
|
||||
# 0: symbol, 1: type, 2: type
|
||||
compiler.note.deferred.method.inst=\u30E1\u30BD\u30C3\u30C9{0}\u306E\u9045\u5EF6\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\n\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3055\u308C\u305F\u30B7\u30B0\u30CD\u30C1\u30E3: {1}\n\u30BF\u30FC\u30B2\u30C3\u30C8\u578B: {2}
|
||||
|
||||
########################################
|
||||
# Diagnostics for where clause implementation
|
||||
# used by the RichDiagnosticFormatter.
|
||||
@ -1397,26 +1632,32 @@ compiler.misc.intersection.type=INT#{0}
|
||||
# where clause for captured type: contains upper ('extends {1}') and lower
|
||||
# ('super {2}') bound along with the wildcard that generated this captured type ({3})
|
||||
# 0: type, 1: type, 2: type, 3: type
|
||||
compiler.misc.where.captured={3}\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u304B\u3089\u306E{0} extends {1} super: {2}
|
||||
compiler.misc.where.captured={0}\u306F{3}\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u304B\u3089{1}\u3092\u62E1\u5F35\u3057{2}\u3092\u30B9\u30FC\u30D1\u30FC\u3057\u307E\u3059
|
||||
|
||||
# compact where clause for captured type: contains upper ('extends {1}') along
|
||||
# with the wildcard that generated this captured type ({3})
|
||||
# 0: type, 1: type, 2: unused, 3: type
|
||||
compiler.misc.where.captured.1={3}\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u304B\u3089\u306E{0} extends {1}
|
||||
compiler.misc.where.captured.1={0}\u306F{3}\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u304B\u3089{1}\u3092\u62E1\u5F35\u3057\u307E\u3059
|
||||
|
||||
# where clause for type variable: contains upper bound(s) ('extends {1}') along with
|
||||
# the kindname ({2}) and location ({3}) in which the typevar has been declared
|
||||
# 0: type, 1: list of type, 2: symbol kind, 3: symbol
|
||||
compiler.misc.where.typevar={2} {3}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B{0} extends {1}
|
||||
compiler.misc.where.typevar={2} {3}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B{0}\u306F{1}\u3092\u62E1\u5F35\u3057\u307E\u3059
|
||||
|
||||
# compact where clause for type variable: contains the kindname ({2}) and location ({3})
|
||||
# in which the typevar has been declared
|
||||
# 0: type, 1: list of type, 2: symbol kind, 3: symbol
|
||||
compiler.misc.where.typevar.1={2} {3}\u3067\u5BA3\u8A00\u3055\u308C\u305F{0}
|
||||
|
||||
# where clause for fresh type variable: contains upper bound(s) ('extends {1}').
|
||||
# Since a fresh type-variable is synthetic - there's no location/kindname here.
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.where.fresh.typevar={0}\u306F{1}\u3092\u62E1\u5F35\u3057\u307E\u3059
|
||||
|
||||
# where clause for type variable: contains all the upper bound(s) ('extends {1}')
|
||||
# of this intersection type
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.where.intersection={0} extends {1}
|
||||
compiler.misc.where.intersection={0}\u306F{1}\u3092\u62E1\u5F35\u3057\u307E\u3059
|
||||
|
||||
### Where clause headers ###
|
||||
compiler.misc.where.description.captured={0}\u304C\u65B0\u3057\u3044\u578B\u5909\u6570\u306E\u5834\u5408:
|
||||
@ -1435,4 +1676,39 @@ compiler.misc.where.description.typevar.1={0}\u304C\u578B\u5909\u6570\u306E\u583
|
||||
|
||||
compiler.misc.where.description.intersection.1={0}\u304Cintersection\u578B\u306E\u5834\u5408:
|
||||
|
||||
###
|
||||
# errors related to doc comments
|
||||
|
||||
compiler.err.dc.bad.entity=HTML\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
compiler.err.dc.bad.gt=''>''\u306E\u4F7F\u7528\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
compiler.err.dc.bad.inline.tag=\u30A4\u30F3\u30E9\u30A4\u30F3\u30FB\u30BF\u30B0\u306E\u4F7F\u7528\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
compiler.err.dc.identifier.expected=\u8B58\u5225\u5B50\u304C\u5FC5\u8981\u3067\u3059
|
||||
|
||||
compiler.err.dc.malformed.html=HTML\u304C\u4E0D\u6B63\u3067\u3059
|
||||
|
||||
compiler.err.dc.missing.semicolon=\u30BB\u30DF\u30B3\u30ED\u30F3\u304C\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
compiler.err.dc.no.content=\u30B3\u30F3\u30C6\u30F3\u30C4\u306A\u3057
|
||||
|
||||
compiler.err.dc.no.tag.name='@'\u306E\u5F8C\u306B\u30BF\u30B0\u540D\u304C\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
compiler.err.dc.gt.expected=''>''\u304C\u5FC5\u8981\u3067\u3059
|
||||
|
||||
compiler.err.dc.ref.bad.parens=\u53C2\u7167\u306B'')''\u304C\u3042\u308A\u307E\u305B\u3093
|
||||
|
||||
compiler.err.dc.ref.syntax.error=\u53C2\u7167\u306B\u69CB\u6587\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
compiler.err.dc.ref.unexpected.input=\u4E88\u671F\u3057\u306A\u3044\u30C6\u30AD\u30B9\u30C8\u3067\u3059
|
||||
|
||||
compiler.err.dc.unexpected.content=\u4E88\u671F\u3057\u306A\u3044\u30B3\u30F3\u30C6\u30F3\u30C4\u3067\u3059
|
||||
|
||||
compiler.err.dc.unterminated.inline.tag=\u30A4\u30F3\u30E9\u30A4\u30F3\u30FB\u30BF\u30B0\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
compiler.err.dc.unterminated.signature=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
compiler.err.dc.unterminated.string=\u6587\u5B57\u5217\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093
|
||||
|
||||
|
||||
|
@ -65,8 +65,11 @@ compiler.err.abstract.meth.cant.have.body=\u62BD\u8C61\u65B9\u6CD5\u4E0D\u80FD\u
|
||||
|
||||
compiler.err.already.annotated={0} {1}\u5DF2\u8FDB\u884C\u6CE8\u91CA
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.already.defined=\u5DF2\u5728{1}\u4E2D\u5B9A\u4E49{0}
|
||||
# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol
|
||||
compiler.err.already.defined=\u5DF2\u5728{2} {3}\u4E2D\u5B9A\u4E49\u4E86{0} {1}
|
||||
|
||||
# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol kind, 4: symbol
|
||||
compiler.err.already.defined.in.clinit=\u5DF2\u5728{3} {4}\u7684{2}\u4E2D\u5B9A\u4E49\u4E86{0} {1}
|
||||
|
||||
# 0: string
|
||||
compiler.err.already.defined.single.import=\u5DF2\u5728 single-type \u5BFC\u5165\u4E2D\u5B9A\u4E49{0}
|
||||
@ -109,28 +112,84 @@ compiler.err.array.dimension.missing=\u7F3A\u5C11\u6570\u7EC4\u7EF4
|
||||
# 0: type
|
||||
compiler.err.array.req.but.found=\u9700\u8981\u6570\u7EC4, \u4F46\u627E\u5230{0}
|
||||
|
||||
compiler.err.assignment.from.super-bound=\u901A\u8FC7\u901A\u914D\u7B26 {0} \u5206\u914D
|
||||
|
||||
compiler.err.assignment.to.extends-bound=\u5206\u914D\u7ED9\u901A\u914D\u7B26 {0}
|
||||
|
||||
compiler.err.attribute.value.must.be.constant=\u5C5E\u6027\u503C\u5FC5\u987B\u4E3A\u5E38\u91CF
|
||||
|
||||
# 0: statement type
|
||||
compiler.err.bad.initializer={0}\u7684\u521D\u59CB\u5316\u7A0B\u5E8F\u9519\u8BEF
|
||||
|
||||
compiler.err.break.outside.switch.loop=\u5728 switch \u6216 loop \u5916\u90E8\u4E2D\u65AD
|
||||
|
||||
# 0: name
|
||||
compiler.err.call.must.be.first.stmt.in.ctor=\u5BF9{0}\u7684\u8C03\u7528\u5FC5\u987B\u662F\u6784\u9020\u5668\u4E2D\u7684\u7B2C\u4E00\u4E2A\u8BED\u53E5
|
||||
|
||||
compiler.err.cant.apply.symbol=\u65E0\u6CD5\u5C06{4} {5}\u4E2D\u7684{0} {1}\u5E94\u7528\u5230\u7ED9\u5B9A\u7C7B\u578B\n\u9700\u8981: {2}\n\u627E\u5230: {3}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
|
||||
compiler.err.cant.apply.symbol.1=\u65E0\u6CD5\u5C06{4} {5}\u4E2D\u7684{0} {1}\u5E94\u7528\u5230\u7ED9\u5B9A\u7C7B\u578B;\n\u9700\u8981: {2}\n\u627E\u5230: {3}\n\u539F\u56E0: {6}
|
||||
compiler.err.cant.apply.symbol=\u65E0\u6CD5\u5C06{4} {5}\u4E2D\u7684{0} {1}\u5E94\u7528\u5230\u7ED9\u5B9A\u7C7B\u578B;\n\u9700\u8981: {2}\n\u627E\u5230: {3}\n\u539F\u56E0: {6}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type
|
||||
compiler.err.cant.apply.symbols=\u5BF9\u4E8E{1}({2}), \u627E\u4E0D\u5230\u5408\u9002\u7684{0}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
|
||||
compiler.misc.cant.apply.symbol=\u65E0\u6CD5\u5C06 {4} {5}\u4E2D\u7684 {0} {1}\u5E94\u7528\u5230\u7ED9\u5B9A\u7C7B\u578B\n\u9700\u8981: {2}\n\u627E\u5230: {3}\n\u539F\u56E0: {6}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type
|
||||
compiler.misc.cant.apply.symbols=\u5BF9\u4E8E{1}({2}), \u627E\u4E0D\u5230\u5408\u9002\u7684{0}
|
||||
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.misc.no.abstracts=\u5728 {0} {1} \u4E2D\u627E\u4E0D\u5230\u62BD\u8C61\u65B9\u6CD5
|
||||
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.misc.incompatible.abstracts=\u5728 {0} {1} \u4E2D\u627E\u5230\u591A\u4E2A\u975E\u8986\u76D6\u62BD\u8C61\u65B9\u6CD5
|
||||
|
||||
compiler.err.bad.functional.intf.anno=\u610F\u5916\u7684 @FunctionalInterface \u6CE8\u91CA
|
||||
|
||||
# 0: message segment
|
||||
compiler.err.bad.functional.intf.anno.1=\u610F\u5916\u7684 @FunctionalInterface \u6CE8\u91CA\n{0}
|
||||
|
||||
# 0: symbol
|
||||
compiler.misc.not.a.functional.intf={0} \u4E0D\u662F\u51FD\u6570\u63A5\u53E3
|
||||
|
||||
# 0: symbol, 1: message segment
|
||||
compiler.misc.not.a.functional.intf.1={0} \u4E0D\u662F\u51FD\u6570\u63A5\u53E3\n{1}
|
||||
|
||||
# 0: symbol, 1: symbol kind, 2: symbol
|
||||
compiler.misc.invalid.generic.lambda.target=lambda \u8868\u8FBE\u5F0F\u7684\u51FD\u6570\u63CF\u8FF0\u7B26\u65E0\u6548\n{1} {2} \u4E2D\u7684\u65B9\u6CD5 {0} \u4E3A\u6CDB\u578B\u65B9\u6CD5
|
||||
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.misc.incompatible.descs.in.functional.intf=\u5728 {0} {1} \u4E2D\u627E\u5230\u4E0D\u517C\u5BB9\u7684\u51FD\u6570\u63CF\u8FF0\u7B26
|
||||
|
||||
# 0: name, 1: list of type, 2: type, 3: list of type
|
||||
compiler.misc.descriptor=\u63CF\u8FF0\u7B26: {2} {0}({1})
|
||||
|
||||
# 0: name, 1: list of type, 2: type, 3: list of type
|
||||
compiler.misc.descriptor.throws=\u63CF\u8FF0\u7B26: {2} {0}({1}) \u629B\u51FA{3}
|
||||
|
||||
# 0: type
|
||||
compiler.misc.no.suitable.functional.intf.inst=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u51FD\u6570\u63A5\u53E3\u63CF\u8FF0\u7B26
|
||||
|
||||
# 0: type
|
||||
compiler.misc.secondary.bound.must.be.marker.intf=\u6B21\u7EA7\u9650\u5236\u8303\u56F4{0}\u5FC5\u987B\u4E3A\u6807\u8BB0\u63A5\u53E3
|
||||
|
||||
# 0: symbol kind, 1: message segment
|
||||
compiler.err.invalid.mref={0} \u5F15\u7528\u65E0\u6548; {1}
|
||||
|
||||
# 0: symbol kind, 1: message segment
|
||||
compiler.misc.invalid.mref={0} \u5F15\u7528\u65E0\u6548; {1}
|
||||
|
||||
compiler.misc.static.mref.with.targs=\u6709\u5173\u9759\u6001\u65B9\u6CD5\u5F15\u7528\u7684\u53C2\u6570\u5316\u9650\u5B9A\u7B26
|
||||
|
||||
compiler.misc.static.bound.mref=\u9759\u6001\u9650\u5236\u8303\u56F4\u65B9\u6CD5\u5F15\u7528
|
||||
|
||||
# 0: symbol
|
||||
compiler.err.cant.assign.val.to.final.var=\u65E0\u6CD5\u4E3A\u6700\u7EC8\u53D8\u91CF{0}\u5206\u914D\u503C
|
||||
|
||||
# 0: symbol, 1: message segment
|
||||
compiler.err.cant.ref.non.effectively.final.var=\u4ECE{1}\u5F15\u7528\u7684\u672C\u5730\u53D8\u91CF\u5FC5\u987B\u662F\u6700\u7EC8\u53D8\u91CF\u6216\u5B9E\u9645\u4E0A\u7684\u6700\u7EC8\u53D8\u91CF
|
||||
|
||||
|
||||
compiler.misc.lambda=lambda \u8868\u8FBE\u5F0F
|
||||
|
||||
compiler.misc.inner.cls=\u5185\u90E8\u7C7B
|
||||
|
||||
# 0: type
|
||||
compiler.err.cant.deref=\u65E0\u6CD5\u53D6\u6D88\u5F15\u7528{0}
|
||||
|
||||
@ -142,8 +201,6 @@ compiler.err.cant.inherit.from.final=\u65E0\u6CD5\u4ECE\u6700\u7EC8{0}\u8FDB\u88
|
||||
# 0: symbol
|
||||
compiler.err.cant.ref.before.ctor.called=\u65E0\u6CD5\u5728\u8C03\u7528\u8D85\u7C7B\u578B\u6784\u9020\u5668\u4E4B\u524D\u5F15\u7528{0}
|
||||
|
||||
compiler.err.cant.ret.val.from.meth.decl.void=\u5BF9\u4E8E\u7ED3\u679C\u7C7B\u578B\u4E3A\u7A7A\u7684\u65B9\u6CD5, \u65E0\u6CD5\u8FD4\u56DE\u503C
|
||||
|
||||
compiler.err.cant.select.static.class.from.param.type=\u65E0\u6CD5\u4ECE\u53C2\u6570\u5316\u7684\u7C7B\u578B\u4E2D\u9009\u62E9\u9759\u6001\u7C7B
|
||||
|
||||
# 0: symbol, 1: string, 2: string
|
||||
@ -154,6 +211,8 @@ compiler.err.catch.without.try=\u6709 ''catch'', \u4F46\u662F\u6CA1\u6709 ''try'
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.err.clash.with.pkg.of.same.name={0} {1}\u4E0E\u5E26\u6709\u76F8\u540C\u540D\u79F0\u7684\u7A0B\u5E8F\u5305\u51B2\u7A81
|
||||
|
||||
compiler.err.class.not.allowed=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B, \u63A5\u53E3\u6216\u679A\u4E3E\u58F0\u660E
|
||||
|
||||
compiler.err.const.expr.req=\u9700\u8981\u5E38\u91CF\u8868\u8FBE\u5F0F
|
||||
|
||||
compiler.err.cont.outside.loop=continue \u5728 loop \u5916\u90E8
|
||||
@ -169,8 +228,6 @@ compiler.err.call.to.super.not.allowed.in.enum.ctor=\u5728\u679A\u4E3E\u6784\u90
|
||||
# 0: type
|
||||
compiler.err.no.superclass={0}\u4E0D\u5177\u6709\u8D85\u7C7B
|
||||
|
||||
compiler.err.wrong.target.for.polymorphic.signature.definition=MethodHandle API \u6784\u5EFA\u9700\u8981 -target 7 \u8FD0\u884C\u65F6\u6216\u66F4\u9AD8; \u5F53\u524D\u4E3A -target {0}
|
||||
|
||||
# 0: symbol, 1: type, 2: symbol, 3: type, 4: unused
|
||||
compiler.err.concrete.inheritance.conflict={1}\u4E2D\u7684\u65B9\u6CD5{0}\u548C{3}\u4E2D\u7684\u65B9\u6CD5{2}\u662F\u4F7F\u7528\u76F8\u540C\u7684\u7B7E\u540D\u7EE7\u627F\u7684
|
||||
|
||||
@ -181,9 +238,48 @@ compiler.err.doesnt.exist=\u7A0B\u5E8F\u5305{0}\u4E0D\u5B58\u5728
|
||||
|
||||
compiler.err.duplicate.annotation=\u6CE8\u91CA\u91CD\u590D
|
||||
|
||||
# 0: type
|
||||
compiler.err.duplicate.annotation.invalid.repeated=\u65E0\u6CD5\u91CD\u590D\u6CE8\u91CA{0}\n\u5B83\u6CA1\u6709\u5B9A\u4E49\u6709\u6548\u7684\u5305\u542B\u6CE8\u91CA\u3002
|
||||
|
||||
# 0: name, 1: type
|
||||
compiler.err.duplicate.annotation.member.value={1}\u4E2D\u7684\u6CE8\u91CA\u6210\u5458\u503C{0}\u91CD\u590D
|
||||
|
||||
# 0: type, 1: type
|
||||
compiler.err.duplicate.annotation.missing.container=\u6CE8\u91CA\u91CD\u590D, {0}\u7684\u58F0\u660E\u6CA1\u6709\u6709\u6548\u7684{1}\u6CE8\u91CA
|
||||
|
||||
# 0: type
|
||||
compiler.err.invalid.repeatable.annotation=\u6CE8\u91CA\u91CD\u590D, \u4F7F\u7528\u65E0\u6548\u7684\u53EF\u91CD\u590D\u6CE8\u91CA\u5BF9{0}\u8FDB\u884C\u4E86\u6CE8\u91CA
|
||||
|
||||
# 0: type
|
||||
compiler.err.invalid.repeatable.annotation.no.value=\u6CE8\u91CA\u91CD\u590D, {0}\u4E0D\u662F\u6709\u6548\u7684\u53EF\u91CD\u590D\u7C7B\u578B, \u672A\u58F0\u660E\u4EFB\u4F55\u503C\u5143\u7D20\u65B9\u6CD5
|
||||
|
||||
# 0: type, 1: number
|
||||
compiler.err.invalid.repeatable.annotation.multiple.values=\u6CE8\u91CA\u91CD\u590D, {0}\u4E0D\u662F\u6709\u6548\u7684\u53EF\u91CD\u590D\u7C7B\u578B, \u5DF2\u58F0\u660E {1} \u4E2A\u503C\u5143\u7D20\u65B9\u6CD5
|
||||
|
||||
# 0: type
|
||||
compiler.err.invalid.repeatable.annotation.invalid.value=\u6CE8\u91CA\u91CD\u590D, {0}\u4E0D\u662F\u6709\u6548\u7684\u53EF\u91CD\u590D\u7C7B\u578B, \u503C\u5143\u7D20\u65E0\u6548, \u9700\u8981\u65B9\u6CD5
|
||||
|
||||
# 0: type, 1: type, 2: type
|
||||
compiler.err.invalid.repeatable.annotation.value.return=\u6CE8\u91CA\u91CD\u590D, \u5305\u542B\u6CE8\u91CA{0}\u7684\u503C\u5143\u7D20\u5E94\u5177\u6709\u7C7B\u578B{2}, \u4F46\u627E\u5230\u7684\u662F{1}
|
||||
|
||||
# 0: type, 1: symbol
|
||||
compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5305\u542B\u6CE8\u91CA{0}\u6CA1\u6709\u5143\u7D20 {1} \u7684\u9ED8\u8BA4\u503C
|
||||
|
||||
# 0: symbol, 1: type, 2: symbol, 3: type
|
||||
compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u6CE8\u91CA {0} \u7684\u4FDD\u7559\u671F ({1}) \u77ED\u4E8E\u5DF2\u5305\u542B\u6CE8\u91CA {2} \u7684\u4FDD\u7559\u671F ({3})
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.invalid.repeatable.annotation.not.documented=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B {0} \u4E0D\u662F @Documented, \u800C\u91CD\u590D\u7684\u6CE8\u91CA\u7C7B\u578B {1} \u4E3A
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.invalid.repeatable.annotation.not.inherited=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B {0} \u4E0D\u662F @Inherited, \u800C\u91CD\u590D\u7684\u6CE8\u91CA\u7C7B\u578B {1} \u4E3A
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.invalid.repeatable.annotation.incompatible.target=\u5BB9\u5668\u6CE8\u91CA {0} \u7684\u76EE\u6807\u4E0D\u662F\u91CD\u590D\u6CE8\u91CA {1} \u7684\u76EE\u6807\u5B50\u96C6
|
||||
|
||||
# 0: symbol
|
||||
compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\u5BB9\u5668 {0} \u4E0D\u5F97\u4E0E\u5176\u5305\u542B\u7684\u5143\u7D20\u540C\u65F6\u5B58\u5728
|
||||
|
||||
# 0: name
|
||||
compiler.err.duplicate.class=\u7C7B\u91CD\u590D: {0}
|
||||
|
||||
@ -245,10 +341,10 @@ compiler.err.generic.array.creation=\u521B\u5EFA\u6CDB\u578B\u6570\u7EC4
|
||||
compiler.err.generic.throwable=\u6CDB\u578B\u7C7B\u4E0D\u80FD\u6269\u5C55 java.lang.Throwable
|
||||
|
||||
# 0: symbol
|
||||
compiler.err.icls.cant.have.static.decl=\u5185\u90E8\u7C7B{0}\u4E2D\u7684\u9759\u6001\u58F0\u660E\u975E\u6CD5\n\u4FEE\u9970\u7B26 \''static\'' \u4EC5\u5141\u8BB8\u5728\u5E38\u91CF\u53D8\u91CF\u58F0\u660E\u4E2D\u4F7F\u7528
|
||||
compiler.err.icls.cant.have.static.decl=\u5185\u90E8\u7C7B{0}\u4E2D\u7684\u9759\u6001\u58F0\u660E\u975E\u6CD5\n\u4FEE\u9970\u7B26 ''static'' \u4EC5\u5141\u8BB8\u5728\u5E38\u91CF\u53D8\u91CF\u58F0\u660E\u4E2D\u4F7F\u7528
|
||||
|
||||
# 0: string
|
||||
compiler.err.illegal.char=\u975E\u6CD5\u5B57\u7B26: \\{0}
|
||||
compiler.err.illegal.char=\u975E\u6CD5\u5B57\u7B26: ''{0}''
|
||||
|
||||
compiler.err.illegal.char.for.encoding=\u7F16\u7801{0}\u7684\u4E0D\u53EF\u6620\u5C04\u5B57\u7B26
|
||||
|
||||
@ -280,11 +376,15 @@ compiler.err.illegal.nonascii.digit=\u975E\u6CD5\u7684\u975E ASCII \u6570\u5B57
|
||||
|
||||
compiler.err.illegal.underscore=\u975E\u6CD5\u4E0B\u5212\u7EBF
|
||||
|
||||
compiler.err.illegal.dot=\u975E\u6CD5 ''.''
|
||||
|
||||
# 0: symbol
|
||||
compiler.err.illegal.qual.not.icls=\u975E\u6CD5\u9650\u5B9A\u7B26; {0}\u4E0D\u662F\u5185\u90E8\u7C7B
|
||||
|
||||
compiler.err.illegal.start.of.expr=\u975E\u6CD5\u7684\u8868\u8FBE\u5F0F\u5F00\u59CB
|
||||
|
||||
compiler.err.illegal.start.of.stmt=\u975E\u6CD5\u7684\u8BED\u53E5\u5F00\u59CB
|
||||
|
||||
compiler.err.illegal.start.of.type=\u975E\u6CD5\u7684\u7C7B\u578B\u5F00\u59CB
|
||||
|
||||
compiler.err.illegal.unicode.esc=\u975E\u6CD5\u7684 Unicode \u8F6C\u4E49
|
||||
@ -302,8 +402,6 @@ compiler.err.incomparable.types=\u4E0D\u53EF\u6BD4\u8F83\u7684\u7C7B\u578B: {0}\
|
||||
# 0: number
|
||||
compiler.err.int.number.too.large=\u8FC7\u5927\u7684\u6574\u6570: {0}
|
||||
|
||||
compiler.err.internal.error.cant.instantiate=\u5185\u90E8\u9519\u8BEF; \u65E0\u6CD5\u5C06\u4F4D\u4E8E{1}\u7684{0}\u5B9E\u4F8B\u5316\u4E3A ({2})
|
||||
|
||||
compiler.err.intf.annotation.members.cant.have.params=@interface \u6210\u5458\u4E0D\u80FD\u5E26\u6709\u53C2\u6570
|
||||
|
||||
compiler.err.intf.annotation.cant.have.type.params=@interface \u4E0D\u80FD\u5E26\u6709\u7C7B\u578B\u53C2\u6570
|
||||
@ -315,7 +413,7 @@ compiler.err.intf.annotation.member.clash=@interface \u6210\u5458\u4E0E{1}\u4E2D
|
||||
|
||||
compiler.err.intf.expected.here=\u6B64\u5904\u9700\u8981\u63A5\u53E3
|
||||
|
||||
compiler.err.intf.meth.cant.have.body=\u63A5\u53E3\u65B9\u6CD5\u4E0D\u80FD\u5E26\u6709\u4E3B\u4F53
|
||||
compiler.err.intf.meth.cant.have.body=\u63A5\u53E3\u62BD\u8C61\u65B9\u6CD5\u4E0D\u80FD\u5E26\u6709\u4E3B\u4F53
|
||||
|
||||
compiler.err.invalid.annotation.member.type=\u6CE8\u91CA\u6210\u5458\u7684\u7C7B\u578B\u65E0\u6548
|
||||
|
||||
@ -327,6 +425,8 @@ compiler.err.invalid.meth.decl.ret.type.req=\u65B9\u6CD5\u58F0\u660E\u65E0\u6548
|
||||
|
||||
compiler.err.varargs.and.old.array.syntax=variable-arity \u53C2\u6570\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u4F20\u7EDF\u6570\u7EC4\u8BB0\u53F7
|
||||
|
||||
compiler.err.variable.not.allowed=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u53D8\u91CF\u58F0\u660E
|
||||
|
||||
# 0: name
|
||||
compiler.err.label.already.in.use=\u6807\u7B7E{0}\u5DF2\u4F7F\u7528
|
||||
|
||||
@ -337,6 +437,8 @@ compiler.err.local.enum=\u679A\u4E3E\u7C7B\u578B\u4E0D\u80FD\u4E3A\u672C\u5730\u
|
||||
|
||||
compiler.err.cannot.create.array.with.type.arguments=\u65E0\u6CD5\u521B\u5EFA\u5177\u6709\u7C7B\u578B\u53D8\u91CF\u7684\u6570\u7EC4
|
||||
|
||||
compiler.err.cannot.create.array.with.diamond=\u65E0\u6CD5\u521B\u5EFA\u5177\u6709 ''<>'' \u7684\u6570\u7EC4
|
||||
|
||||
#
|
||||
# limits. We don't give the limits in the diagnostic because we expect
|
||||
# them to change, yet we want to use the same diagnostic. These are all
|
||||
@ -360,7 +462,7 @@ compiler.err.limit.stack=\u4EE3\u7801\u9700\u8981\u8FC7\u591A\u5806\u6808
|
||||
|
||||
compiler.err.limit.string=\u5E38\u91CF\u5B57\u7B26\u4E32\u8FC7\u957F
|
||||
|
||||
compiler.err.limit.string.overflow=\u5BF9\u4E8E\u5E38\u91CF\u6C60\u6765\u8BF4, \u5B57\u7B26\u4E32 \"{0}...\" \u7684 UTF8 \u8868\u793A\u8FC7\u957F
|
||||
compiler.err.limit.string.overflow=\u5BF9\u4E8E\u5E38\u91CF\u6C60\u6765\u8BF4, \u5B57\u7B26\u4E32 "{0}..." \u7684 UTF8 \u8868\u793A\u8FC7\u957F
|
||||
|
||||
compiler.err.malformed.fp.lit=\u6D6E\u70B9\u6587\u5B57\u7684\u683C\u5F0F\u9519\u8BEF
|
||||
|
||||
@ -370,7 +472,9 @@ compiler.err.missing.meth.body.or.decl.abstract=\u7F3A\u5C11\u65B9\u6CD5\u4E3B\u
|
||||
|
||||
compiler.err.missing.ret.stmt=\u7F3A\u5C11\u8FD4\u56DE\u8BED\u53E5
|
||||
|
||||
compiler.err.missing.ret.val=\u7F3A\u5C11\u8FD4\u56DE\u503C
|
||||
compiler.misc.missing.ret.val=\u7F3A\u5C11\u8FD4\u56DE\u503C
|
||||
|
||||
compiler.misc.unexpected.ret.val=\u610F\u5916\u7684\u8FD4\u56DE\u503C
|
||||
|
||||
# 0: set of modifier
|
||||
compiler.err.mod.not.allowed.here=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u4FEE\u9970\u7B26{0}
|
||||
@ -398,6 +502,25 @@ compiler.err.native.meth.cant.have.body=\u672C\u673A\u65B9\u6CD5\u4E0D\u80FD\u5E
|
||||
# 0: type, 1: type
|
||||
compiler.err.neither.conditional.subtype=? \u7684\u4E0D\u517C\u5BB9\u7C7B\u578B: \u4E24\u8005\u90FD\u4E0D\u662F\u5BF9\u65B9\u7684\u5B50\u7C7B\u578B\n\u7B2C\u4E8C\u4E2A\u64CD\u4F5C\u6570: {0}\n\u7B2C\u4E09\u4E2A\u64CD\u4F5C\u6570: {1}
|
||||
|
||||
# 0: message segment
|
||||
compiler.misc.incompatible.type.in.conditional=\u6761\u4EF6\u8868\u8FBE\u5F0F\u4E2D\u7684\u7C7B\u578B\u9519\u8BEF; {0}
|
||||
|
||||
compiler.misc.conditional.target.cant.be.void=\u6761\u4EF6\u8868\u8FBE\u5F0F\u7684\u76EE\u6807\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A
|
||||
|
||||
# 0: type
|
||||
compiler.misc.incompatible.ret.type.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u7684\u8FD4\u56DE\u7C7B\u578B\u9519\u8BEF\n{0}
|
||||
|
||||
# 0: type
|
||||
compiler.misc.incompatible.ret.type.in.mref=\u65B9\u6CD5\u5F15\u7528\u4E2D\u7684\u8FD4\u56DE\u7C7B\u578B\u9519\u8BEF\n{0}
|
||||
|
||||
# 0: list of type
|
||||
compiler.err.incompatible.thrown.types.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u629B\u51FA\u7684\u7C7B\u578B{0}\u4E0D\u517C\u5BB9
|
||||
|
||||
# 0: list of type
|
||||
compiler.err.incompatible.thrown.types.in.mref=\u65B9\u6CD5\u5F15\u7528\u4E2D\u629B\u51FA\u7684\u7C7B\u578B{0}\u4E0D\u517C\u5BB9
|
||||
|
||||
compiler.misc.incompatible.arg.types.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u7684\u53C2\u6570\u7C7B\u578B\u4E0D\u517C\u5BB9
|
||||
|
||||
compiler.err.new.not.allowed.in.annotation=\u6CE8\u91CA\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528 ''new''
|
||||
|
||||
compiler.err.no.annotation.member={1}\u4E2D\u6CA1\u6709\u6CE8\u91CA\u6210\u5458{0}
|
||||
@ -413,6 +536,12 @@ compiler.err.not.annotation.type={0}\u4E0D\u662F\u6CE8\u91CA\u7C7B\u578B
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.not.def.access.class.intf.cant.access={1}\u4E2D\u7684{0}\u662F\u5728\u4E0D\u53EF\u8BBF\u95EE\u7684\u7C7B\u6216\u63A5\u53E3\u4E2D\u5B9A\u4E49\u7684
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.misc.not.def.access.class.intf.cant.access={1}\u4E2D\u7684{0}\u662F\u5728\u4E0D\u53EF\u8BBF\u95EE\u7684\u7C7B\u6216\u63A5\u53E3\u4E2D\u5B9A\u4E49\u7684
|
||||
|
||||
# 0: symbol, 1: list of type, 2: type
|
||||
compiler.misc.cant.access.inner.cls.constr=\u65E0\u6CD5\u8BBF\u95EE\u6784\u9020\u5668 {0}({1})\n\u4F5C\u7528\u57DF\u4E2D\u6CA1\u6709\u7C7B\u578B\u4E3A{2}\u7684\u5C01\u95ED\u5B9E\u4F8B
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.err.not.def.public.cant.access={0}\u5728{1}\u4E2D\u4E0D\u662F\u516C\u5171\u7684; \u65E0\u6CD5\u4ECE\u5916\u90E8\u7A0B\u5E8F\u5305\u4E2D\u5BF9\u5176\u8FDB\u884C\u8BBF\u95EE
|
||||
|
||||
@ -455,15 +584,13 @@ compiler.err.proc.messager={0}
|
||||
# 0: list of string
|
||||
compiler.err.proc.no.explicit.annotation.processing.requested=\u4EC5\u5F53\u663E\u5F0F\u8BF7\u6C42\u6CE8\u91CA\u5904\u7406\u65F6\u624D\u63A5\u53D7\u7C7B\u540D\u79F0 ''{0}''
|
||||
|
||||
compiler.err.proc.no.service=\u627E\u4E0D\u5230\u670D\u52A1\u52A0\u8F7D\u5668\u7C7B\u3002\njava.util.ServiceLoader \u6216 sun.misc.Service \u5FC5\u987B\u53EF\u7528\u3002
|
||||
compiler.err.proc.no.service=ServiceLoader \u4E0D\u53EF\u7528, \u4F46\u5B83\u662F\u6CE8\u91CA\u5904\u7406\u6240\u5FC5\u9700\u7684\u3002
|
||||
|
||||
compiler.err.proc.processor.bad.option.name=\u5904\u7406\u7A0B\u5E8F ''{1}'' \u63D0\u4F9B\u7684\u9009\u9879\u540D\u79F0 ''{0}'' \u9519\u8BEF
|
||||
|
||||
# 0: string
|
||||
compiler.err.proc.processor.cant.instantiate=\u65E0\u6CD5\u5B9E\u4F8B\u5316\u5904\u7406\u7A0B\u5E8F ''{0}'' \u7684\u5B9E\u4F8B
|
||||
|
||||
compiler.err.proc.processor.constructor.error=\u6784\u9020\u5904\u7406\u7A0B\u5E8F\u5BF9\u8C61{0}\u65F6\u629B\u51FA\u5F02\u5E38\u9519\u8BEF
|
||||
|
||||
# 0: string
|
||||
compiler.err.proc.processor.not.found=\u627E\u4E0D\u5230\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F ''{0}''
|
||||
|
||||
@ -482,7 +609,10 @@ compiler.err.qualified.new.of.static.class=\u9650\u5B9A\u7684\u65B0\u9759\u6001\
|
||||
compiler.err.recursive.ctor.invocation=\u9012\u5F52\u6784\u9020\u5668\u8C03\u7528
|
||||
|
||||
# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol
|
||||
compiler.err.ref.ambiguous=\u5BF9{0}\u7684\u5F15\u7528\u4E0D\u660E\u786E, {3}\u4E2D\u7684{1} {2}\u548C{6}\u4E2D\u7684{4} {5}\u90FD\u5339\u914D
|
||||
compiler.err.ref.ambiguous=\u5BF9{0}\u7684\u5F15\u7528\u4E0D\u660E\u786E\n{3} \u4E2D\u7684{1} {2} \u548C {6} \u4E2D\u7684{4} {5} \u90FD\u5339\u914D
|
||||
|
||||
# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol
|
||||
compiler.misc.ref.ambiguous=\u5BF9{0}\u7684\u5F15\u7528\u4E0D\u660E\u786E\n{3} \u4E2D\u7684{1} {2} \u548C {6} \u4E2D\u7684{4} {5} \u90FD\u5339\u914D
|
||||
|
||||
compiler.err.repeated.annotation.target=\u6CE8\u91CA\u76EE\u6807\u91CD\u590D
|
||||
|
||||
@ -536,6 +666,27 @@ compiler.err.type.var.more.than.once.in.result=\u7C7B\u578B\u53D8\u91CF{0}\u5728
|
||||
# 0: type, 1: type, 2: string
|
||||
compiler.err.types.incompatible.diff.ret=\u7C7B\u578B{0}\u548C{1}\u4E0D\u517C\u5BB9; \u4E24\u8005\u90FD\u5B9A\u4E49\u4E86{2}, \u4F46\u5374\u5E26\u6709\u4E0D\u76F8\u5173\u7684\u8FD4\u56DE\u7C7B\u578B
|
||||
|
||||
# 0: kind, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol
|
||||
compiler.err.types.incompatible.unrelated.defaults={0} {1}\u4ECE\u7C7B\u578B {4} \u548C {5} \u4E2D\u7EE7\u627F\u4E86{2}({3}) \u7684\u4E0D\u76F8\u5173\u9ED8\u8BA4\u503C
|
||||
|
||||
# 0: kind, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol
|
||||
compiler.err.types.incompatible.abstract.default={0} {1}\u4ECE\u7C7B\u578B {4} \u548C {5} \u4E2D\u7EE7\u627F\u4E86{2}({3}) \u7684\u62BD\u8C61\u548C\u9ED8\u8BA4\u503C
|
||||
|
||||
# 0: name, 1: kind, 2: symbol
|
||||
compiler.err.default.overrides.object.member={1} {2} \u4E2D\u7684\u9ED8\u8BA4\u65B9\u6CD5{0}\u8986\u76D6\u4E86 java.lang.Object \u7684\u6210\u5458
|
||||
|
||||
# 0: type
|
||||
compiler.err.illegal.static.intf.meth.call=\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\u8C03\u7528\u975E\u6CD5\n\u5E94\u5C06\u63A5\u6536\u65B9\u8868\u8FBE\u5F0F\u66FF\u6362\u4E3A\u7C7B\u578B\u9650\u5B9A\u7B26 ''{0}''
|
||||
|
||||
# 0: type, 1: message segment
|
||||
compiler.err.illegal.default.super.call=\u9ED8\u8BA4\u8D85\u7EA7\u8C03\u7528\u4E2D\u7684\u7C7B\u578B\u9650\u5B9A\u7B26{0}\u9519\u8BEF\n{1}
|
||||
|
||||
# 0: symbol, 1: type
|
||||
compiler.misc.overridden.default=\u8986\u76D6\u4E86{1}\u4E2D\u7684\u65B9\u6CD5 {0}
|
||||
|
||||
# 0: symbol, 1: symbol
|
||||
compiler.misc.redundant.supertype=\u5197\u4F59\u63A5\u53E3 {0} \u5DF2\u7531 {1} \u6269\u5C55
|
||||
|
||||
compiler.err.unclosed.char.lit=\u672A\u7ED3\u675F\u7684\u5B57\u7B26\u6587\u5B57
|
||||
|
||||
compiler.err.unclosed.comment=\u672A\u7ED3\u675F\u7684\u6CE8\u91CA
|
||||
@ -550,19 +701,14 @@ compiler.err.io.exception=\u8BFB\u53D6\u6E90\u6587\u4EF6\u65F6\u51FA\u9519: {0}
|
||||
# 0: name
|
||||
compiler.err.undef.label=\u672A\u5B9A\u4E49\u7684\u6807\u7B7E: {0}
|
||||
|
||||
compiler.err.undetermined.type=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570
|
||||
|
||||
# 0: type, 1: message segment
|
||||
compiler.err.undetermined.type.1=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570;\n\u539F\u56E0: {1}
|
||||
|
||||
# 0: list of type, 1: message segment
|
||||
compiler.err.invalid.inferred.types={0}\u7684\u63A8\u65AD\u7C7B\u578B\u65E0\u6548; {1}
|
||||
|
||||
# 0: message segment, 1: unused
|
||||
compiler.err.cant.apply.diamond=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570
|
||||
|
||||
# 0: message segment, 1: message segment
|
||||
compiler.err.cant.apply.diamond.1=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570;\n\u539F\u56E0: {1}
|
||||
# 0: message segment or type, 1: message segment
|
||||
compiler.err.cant.apply.diamond.1=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570\n\u539F\u56E0: {1}
|
||||
|
||||
# 0: message segment or type, 1: message segment
|
||||
compiler.misc.cant.apply.diamond.1=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570\n\u539F\u56E0: {1}
|
||||
|
||||
compiler.err.unreachable.stmt=\u65E0\u6CD5\u8BBF\u95EE\u7684\u8BED\u53E5
|
||||
|
||||
@ -605,7 +751,7 @@ compiler.misc.varargs.trustme.on.non.varargs.meth=\u65B9\u6CD5 {0} \u4E0D\u662F
|
||||
# 0: symbol
|
||||
compiler.misc.varargs.trustme.on.virtual.varargs=\u5B9E\u4F8B\u65B9\u6CD5 {0} \u4E0D\u662F\u6700\u7EC8\u7684\u3002
|
||||
|
||||
# 0: type, 1: kind, 2: symbol
|
||||
# 0: type, 1: symbol kind, 2: symbol
|
||||
compiler.misc.inaccessible.varargs.type=\u5F62\u5F0F varargs \u5143\u7D20\u7C7B\u578B{0}\u65E0\u6CD5\u4ECE {1} {2} \u8FDB\u884C\u8BBF\u95EE
|
||||
|
||||
# In the following string, {1} will always be the detail message from
|
||||
@ -620,7 +766,7 @@ compiler.err.class.public.should.be.in.file=\u7C7B{0}\u662F\u516C\u5171\u7684, \
|
||||
|
||||
## All errors which do not refer to a particular line in the source code are
|
||||
## preceded by this string.
|
||||
compiler.err.error=\u9519\u8BEF:\u0020
|
||||
compiler.err.error=\u9519\u8BEF:
|
||||
|
||||
# The following error messages do not refer to a line in the source code.
|
||||
compiler.err.cant.read.file=\u65E0\u6CD5\u8BFB\u53D6: {0}
|
||||
@ -637,7 +783,7 @@ compiler.misc.fatal.err.cant.locate.field=\u81F4\u547D\u9519\u8BEF: \u627E\u4E0D
|
||||
|
||||
compiler.misc.fatal.err.cant.locate.ctor=\u81F4\u547D\u9519\u8BEF: \u627E\u4E0D\u5230{0}\u7684\u6784\u9020\u5668
|
||||
|
||||
compiler.misc.fatal.err.cant.close.loader=\u81F4\u547D\u9519\u8BEF: \u65E0\u6CD5\u5173\u95ED\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u7684\u7C7B\u52A0\u8F7D\u5668
|
||||
compiler.misc.fatal.err.cant.close=\u81F4\u547D\u9519\u8BEF: \u65E0\u6CD5\u5173\u95ED\u7F16\u8BD1\u5668\u8D44\u6E90
|
||||
|
||||
#####
|
||||
|
||||
@ -659,7 +805,10 @@ compiler.misc.x.print.rounds=\u5FAA\u73AF {0}:\n\t\u8F93\u5165\u6587\u4EF6: {1}\
|
||||
|
||||
## The following string will appear before all messages keyed as:
|
||||
## "compiler.note".
|
||||
compiler.note.note=\u6CE8:\u0020
|
||||
|
||||
compiler.note.potential.lambda.found=\u53EF\u5C06\u6B64\u533F\u540D\u5185\u90E8\u7C7B\u521B\u5EFA\u8F6C\u6362\u4E3A lambda \u8868\u8FBE\u5F0F\u3002
|
||||
|
||||
compiler.note.note=\u6CE8:
|
||||
|
||||
# 0: file name
|
||||
compiler.note.deprecated.filename={0}\u4F7F\u7528\u6216\u8986\u76D6\u4E86\u5DF2\u8FC7\u65F6\u7684 API\u3002
|
||||
@ -773,12 +922,12 @@ compiler.misc.resume.abort=\u7EE7\u7EED(R), \u653E\u5F03(A)>
|
||||
##
|
||||
|
||||
## All warning messages are preceded by the following string.
|
||||
compiler.warn.warning=\u8B66\u544A:\u0020
|
||||
compiler.warn.warning=\u8B66\u544A:
|
||||
|
||||
## Warning messages may also include the following prefix to identify a
|
||||
## lint option
|
||||
# 0: option name
|
||||
compiler.warn.lintOption=[{0}]\u0020
|
||||
compiler.warn.lintOption=[{0}]
|
||||
|
||||
# 0: symbol
|
||||
compiler.warn.constant.SVUID=serialVersionUID \u5728\u7C7B{0}\u4E2D\u5FC5\u987B\u662F\u5E38\u91CF
|
||||
@ -1046,6 +1195,8 @@ compiler.misc.bad.const.pool.tag.at=\u9519\u8BEF\u7684\u5E38\u91CF\u6C60\u6807\u
|
||||
|
||||
compiler.misc.bad.signature=\u9519\u8BEF\u7684\u7B7E\u540D: {0}
|
||||
|
||||
compiler.misc.bad.type.annotation.value=\u9519\u8BEF\u7684\u7C7B\u578B\u6CE8\u91CA\u76EE\u6807\u7C7B\u578B\u503C: {0}
|
||||
|
||||
compiler.misc.class.file.wrong.class=\u7C7B\u6587\u4EF6\u5305\u542B\u9519\u8BEF\u7684\u7C7B: {0}
|
||||
|
||||
compiler.misc.class.file.not.found=\u627E\u4E0D\u5230{0}\u7684\u7C7B\u6587\u4EF6
|
||||
@ -1077,24 +1228,17 @@ compiler.err.not.within.bounds=\u7C7B\u578B\u53C2\u6570{0}\u4E0D\u5728\u7C7B\u57
|
||||
|
||||
#####
|
||||
|
||||
# 0: message segment, 1: type, 2: type
|
||||
compiler.err.prob.found.req={0}\n\u9700\u8981: {2}\n\u627E\u5230: {1}
|
||||
# 0: message segment
|
||||
compiler.err.prob.found.req=\u4E0D\u517C\u5BB9\u7684\u7C7B\u578B: {0}
|
||||
|
||||
# 0: message segment, 1: type, 2: type
|
||||
compiler.warn.prob.found.req={0}\n\u9700\u8981: {2}\n\u627E\u5230: {1}
|
||||
|
||||
compiler.err.prob.found.req.1={0} {3}\n\u9700\u8981: {2}\n\u627E\u5230: {1}
|
||||
# 0: type, 1: type
|
||||
compiler.misc.inconvertible.types={0}\u65E0\u6CD5\u8F6C\u6362\u4E3A{1}
|
||||
|
||||
## The following are all possible strings for the first argument ({0}) of the
|
||||
## above strings.
|
||||
compiler.misc.incompatible.types=\u4E0D\u517C\u5BB9\u7684\u7C7B\u578B
|
||||
|
||||
# 0: message segment
|
||||
compiler.misc.incompatible.types.1=\u4E0D\u517C\u5BB9\u7684\u7C7B\u578B; {0}
|
||||
|
||||
compiler.misc.inconvertible.types=\u4E0D\u53EF\u8F6C\u6362\u7684\u7C7B\u578B
|
||||
|
||||
compiler.misc.possible.loss.of.precision=\u53EF\u80FD\u635F\u5931\u7CBE\u5EA6
|
||||
# 0: type, 1: type
|
||||
compiler.misc.possible.loss.of.precision=\u4ECE{0}\u8F6C\u6362\u5230{1}\u53EF\u80FD\u4F1A\u6709\u635F\u5931
|
||||
|
||||
compiler.misc.unchecked.assign=\u672A\u7ECF\u68C0\u67E5\u7684\u8F6C\u6362
|
||||
|
||||
@ -1104,16 +1248,13 @@ compiler.misc.unchecked.assign=\u672A\u7ECF\u68C0\u67E5\u7684\u8F6C\u6362
|
||||
# assigned array cannot dynamically check its stores
|
||||
compiler.misc.unchecked.cast.to.type=\u672A\u7ECF\u68C0\u67E5\u7684\u8F6C\u6362
|
||||
|
||||
compiler.misc.assignment.from.super-bound=\u4ECE super-bound \u7C7B\u578B{0}\u8FDB\u884C\u5206\u914D
|
||||
|
||||
compiler.misc.assignment.to.extends-bound=\u5230 extends-bound \u7C7B\u578B{0}\u7684\u5206\u914D
|
||||
|
||||
# compiler.err.star.expected=\
|
||||
# ''*'' expected
|
||||
# compiler.err.no.elem.type=\
|
||||
# \[\*\] cannot have a type
|
||||
|
||||
compiler.misc.try.not.applicable.to.type=try-with-resources \u4E0D\u9002\u7528\u4E8E\u53D8\u91CF\u7C7B\u578B
|
||||
# 0: type
|
||||
compiler.misc.try.not.applicable.to.type=try-with-resources \u4E0D\u9002\u7528\u4E8E\u53D8\u91CF\u7C7B\u578B\n({0})
|
||||
|
||||
#####
|
||||
|
||||
@ -1139,25 +1280,44 @@ compiler.misc.type.parameter=\u7C7B\u578B\u53C2\u6570{0}
|
||||
|
||||
## The following are all possible strings for the last argument of all those
|
||||
## diagnostics whose key ends in ".1"
|
||||
compiler.misc.undetermined.type=\u672A\u786E\u5B9A\u7684\u7C7B\u578B
|
||||
|
||||
compiler.misc.type.variable.has.undetermined.type=\u7C7B\u578B\u53D8\u91CF{0}\u5E26\u6709\u672A\u786E\u5B9A\u7684\u7C7B\u578B
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.no.unique.maximal.instance.exists=\u5BF9\u4E8E\u4E0A\u9650\u4E3A{1}\u7684\u7C7B\u578B\u53D8\u91CF{0}, \u4E0D\u5B58\u5728\u552F\u4E00\u6700\u5927\u5B9E\u4F8B
|
||||
|
||||
compiler.misc.no.unique.minimal.instance.exists=\u5BF9\u4E8E\u4E0B\u9650\u4E3A{1}\u7684\u7C7B\u578B\u53D8\u91CF{0}, \u4E0D\u5B58\u5728\u552F\u4E00\u6700\u5C0F\u5B9E\u4F8B
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.incompatible.upper.bounds=\u63A8\u8BBA\u53D8\u91CF {0} \u5177\u6709\u4E0D\u517C\u5BB9\u7684\u4E0A\u9650 {1}
|
||||
|
||||
# 0: type, 1: list of type, 2: list of type
|
||||
compiler.misc.incompatible.eq.upper.bounds=\u63A8\u8BBA\u53D8\u91CF {0} \u5177\u6709\u4E0D\u517C\u5BB9\u7684\u9650\u5236\u8303\u56F4\n\u7B49\u5F0F\u7EA6\u675F\u6761\u4EF6: {1}\n\u4E0A\u9650: {2}
|
||||
|
||||
# 0: type, 1: list of type, 2: list of type
|
||||
compiler.misc.incompatible.eq.lower.bounds=\u63A8\u8BBA\u53D8\u91CF{0}\u5177\u6709\u4E0D\u517C\u5BB9\u7684\u9650\u5236\u8303\u56F4\n\u7B49\u5F0F\u7EA6\u675F\u6761\u4EF6: {1}\n\u4E0B\u9650: {2}
|
||||
|
||||
# 0: list of type, 1: type, 2: type
|
||||
compiler.misc.infer.no.conforming.instance.exists=\u4E0D\u5B58\u5728\u7C7B\u578B\u53D8\u91CF{0}\u7684\u5B9E\u4F8B, \u4EE5\u4F7F{1}\u4E0E{2}\u4E00\u81F4
|
||||
|
||||
# 0: list of type, 1: type, 2: type
|
||||
compiler.misc.infer.no.conforming.assignment.exists=\u4E0D\u5B58\u5728\u7C7B\u578B\u53D8\u91CF{0}\u7684\u5B9E\u4F8B, \u4EE5\u4F7F\u53C2\u6570\u7C7B\u578B{1}\u4E0E\u5F62\u5F0F\u53C2\u6570\u7C7B\u578B{2}\u4E00\u81F4
|
||||
# 0: list of type, 1: message segment
|
||||
compiler.misc.infer.no.conforming.assignment.exists=\u65E0\u6CD5\u63A8\u65AD\u7C7B\u578B\u53D8\u91CF {0}\n(\u53C2\u6570\u4E0D\u5339\u914D; {1})
|
||||
|
||||
compiler.misc.infer.arg.length.mismatch=\u65E0\u6CD5\u4ECE\u53C2\u6570\u8FDB\u884C\u5B9E\u4F8B\u5316, \u56E0\u4E3A\u5B9E\u9645\u53C2\u6570\u5217\u8868\u548C\u5F62\u5F0F\u53C2\u6570\u5217\u8868\u957F\u5EA6\u4E0D\u540C
|
||||
# 0: list of type
|
||||
compiler.misc.infer.arg.length.mismatch=\u65E0\u6CD5\u63A8\u65AD\u7C7B\u578B\u53D8\u91CF {0}\n(\u5B9E\u9645\u53C2\u6570\u5217\u8868\u548C\u5F62\u5F0F\u53C2\u6570\u5217\u8868\u957F\u5EA6\u4E0D\u540C)
|
||||
|
||||
# 0: list of type, 1: message segment
|
||||
compiler.misc.infer.varargs.argument.mismatch=\u65E0\u6CD5\u63A8\u65AD\u7C7B\u578B\u53D8\u91CF {0}\n(varargs \u4E0D\u5339\u914D; {1})
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.inferred.do.not.conform.to.bounds=\u63A8\u65AD\u7C7B\u578B\u4E0D\u7B26\u5408\u58F0\u660E\u7684\u8303\u56F4\n\u63A8\u65AD: {0}\n\u8303\u56F4: {1}
|
||||
compiler.misc.inferred.do.not.conform.to.upper.bounds=\u63A8\u65AD\u7C7B\u578B\u4E0D\u7B26\u5408\u4E0A\u9650\n\u63A8\u65AD: {0}\n\u4E0A\u9650: {1}
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.inferred.do.not.conform.to.lower.bounds=\u63A8\u65AD\u7C7B\u578B\u4E0D\u7B26\u5408\u4E0B\u9650\n\u63A8\u65AD: {0}\n\u4E0B\u9650: {1}
|
||||
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.inferred.do.not.conform.to.eq.bounds=\u63A8\u65AD\u7C7B\u578B\u4E0D\u7B26\u5408\u7B49\u5F0F\u7EA6\u675F\u6761\u4EF6\n\u63A8\u65AD: {0}\n\u7B49\u5F0F\u7EA6\u675F\u6761\u4EF6: {1}
|
||||
|
||||
# 0: list of type
|
||||
compiler.misc.cyclic.inference=\u7531\u4E8E\u63A8\u8BBA\u5FAA\u73AF, \u65E0\u6CD5\u5B9E\u4F8B\u5316\u63A8\u8BBA\u53D8\u91CF{0}
|
||||
|
||||
# 0: symbol
|
||||
compiler.misc.diamond={0}<>
|
||||
@ -1165,6 +1325,7 @@ compiler.misc.diamond={0}<>
|
||||
# 0: type
|
||||
compiler.misc.diamond.non.generic=\u65E0\u6CD5\u5C06 ''<>'' \u4E0E\u975E\u6CDB\u578B\u7C7B{0}\u4E00\u8D77\u4F7F\u7528
|
||||
|
||||
# 0: unused
|
||||
compiler.misc.diamond.and.explicit.params=\u4E0D\u80FD\u5C06 ''<>'' \u4E0E\u6784\u9020\u5668\u7684\u663E\u5F0F\u7C7B\u578B\u53C2\u6570\u4E00\u8D77\u4F7F\u7528
|
||||
|
||||
# 0: type, 1: list of type
|
||||
@ -1172,14 +1333,18 @@ compiler.misc.explicit.param.do.not.conform.to.bounds=\u663E\u5F0F\u7C7B\u578B\u
|
||||
|
||||
compiler.misc.arg.length.mismatch=\u5B9E\u9645\u53C2\u6570\u5217\u8868\u548C\u5F62\u5F0F\u53C2\u6570\u5217\u8868\u957F\u5EA6\u4E0D\u540C
|
||||
|
||||
# 0: type, 1: type
|
||||
compiler.misc.no.conforming.assignment.exists=\u65E0\u6CD5\u901A\u8FC7\u65B9\u6CD5\u8C03\u7528\u8F6C\u6362\u5C06\u5B9E\u9645\u53C2\u6570{0}\u8F6C\u6362\u4E3A{1}
|
||||
# 0: message segment
|
||||
compiler.misc.no.conforming.assignment.exists=\u53C2\u6570\u4E0D\u5339\u914D; {0}
|
||||
|
||||
# 0: type, 1: type
|
||||
compiler.misc.varargs.argument.mismatch=\u53C2\u6570\u7C7B\u578B{0}\u4E0D\u7B26\u5408 vararg \u5143\u7D20\u7C7B\u578B{1}
|
||||
# 0: message segment
|
||||
compiler.misc.varargs.argument.mismatch=varargs \u4E0D\u5339\u914D; {0}
|
||||
|
||||
#####
|
||||
|
||||
# 0: type, 1: file name
|
||||
compiler.warn.auxiliary.class.accessed.from.outside.of.its.source.file={1} \u4E2D\u7684\u8F85\u52A9\u7C7B{0}\u4E0D\u5E94\u4ECE\u5176\u81EA\u8EAB\u7684\u6E90\u6587\u4EF6\u4EE5\u5916\u8BBF\u95EE
|
||||
|
||||
|
||||
## The first argument ({0}) is a "kindname".
|
||||
# 0: symbol kind, 1: symbol, 2: symbol
|
||||
compiler.err.abstract.cant.be.accessed.directly=\u65E0\u6CD5\u76F4\u63A5\u8BBF\u95EE{2}\u4E2D\u7684\u62BD\u8C61{0} {1}
|
||||
@ -1188,10 +1353,17 @@ compiler.err.abstract.cant.be.accessed.directly=\u65E0\u6CD5\u76F4\u63A5\u8BBF\u
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.err.non-static.cant.be.ref=\u65E0\u6CD5\u4ECE\u9759\u6001\u4E0A\u4E0B\u6587\u4E2D\u5F15\u7528\u975E\u9759\u6001 {0} {1}
|
||||
|
||||
# 0: symbol kind, 1: symbol
|
||||
compiler.misc.non-static.cant.be.ref=\u65E0\u6CD5\u4ECE\u9759\u6001\u4E0A\u4E0B\u6587\u4E2D\u5F15\u7528\u975E\u9759\u6001 {0} {1}
|
||||
|
||||
## Both arguments ({0}, {1}) are "kindname"s. {0} is a comma-separated list
|
||||
## of kindnames (the list should be identical to that provided in source.
|
||||
compiler.err.unexpected.type=\u610F\u5916\u7684\u7C7B\u578B\n\u9700\u8981: {0}\n\u627E\u5230: {1}
|
||||
|
||||
compiler.err.unexpected.lambda=\u6B64\u5904\u4E0D\u5E94\u4E3A lambda \u8868\u8FBE\u5F0F
|
||||
|
||||
compiler.err.unexpected.mref=\u6B64\u5904\u4E0D\u5E94\u4E3A\u65B9\u6CD5\u5F15\u7528
|
||||
|
||||
## The first argument {0} is a "kindname" (e.g. 'constructor', 'field', etc.)
|
||||
## The second argument {1} is the non-resolved symbol
|
||||
## The third argument {2} is a list of type parameters (non-empty if {1} is a method)
|
||||
@ -1216,12 +1388,20 @@ compiler.err.cant.resolve.location.args=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u
|
||||
# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
|
||||
compiler.err.cant.resolve.location.args.params=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} <{2}>{1}({3})\n\u4F4D\u7F6E: {4}
|
||||
|
||||
### Following are replicated/used for method reference diagnostics
|
||||
|
||||
# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
|
||||
compiler.misc.cant.resolve.location.args=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} {1}({3})\n\u4F4D\u7F6E: {4}
|
||||
|
||||
# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
|
||||
compiler.misc.cant.resolve.location.args.params=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} <{2}>{1}({3})\n\u4F4D\u7F6E: {4}
|
||||
|
||||
##a location subdiagnostic is composed as follows:
|
||||
## The first argument {0} is the location "kindname" (e.g. 'constructor', 'field', etc.)
|
||||
## The second argument {1} is the location name
|
||||
## The third argument {2} is the location type (only when {1} is a variable name)
|
||||
|
||||
# 0: symbol kind, 1: symbol, 2: unused
|
||||
# 0: symbol kind, 1: type or symbol, 2: unused
|
||||
compiler.misc.location={0} {1}
|
||||
|
||||
# 0: symbol kind, 1: symbol, 2: type
|
||||
@ -1256,6 +1436,10 @@ compiler.misc.kindname.class=\u7C7B
|
||||
|
||||
compiler.misc.kindname.package=\u7A0B\u5E8F\u5305
|
||||
|
||||
compiler.misc.kindname.static.init=\u9759\u6001\u521D\u59CB\u5316\u7A0B\u5E8F
|
||||
|
||||
compiler.misc.kindname.instance.init=\u5B9E\u4F8B\u521D\u59CB\u5316\u7A0B\u5E8F
|
||||
|
||||
#####
|
||||
|
||||
compiler.misc.no.args=\u6CA1\u6709\u53C2\u6570
|
||||
@ -1312,6 +1496,7 @@ compiler.misc.varargs.implement={1}\u4E2D\u7684{0}\u5B9E\u73B0\u4E86{3}\u4E2D\u7
|
||||
# 0: symbol, 1: symbol, 2: symbol, 3: symbol
|
||||
compiler.misc.varargs.clash.with={1}\u4E2D\u7684{0}\u8986\u76D6\u4E86{3}\u4E2D\u7684{2}
|
||||
|
||||
# 0: unused
|
||||
compiler.misc.diamond.and.anon.class=\u65E0\u6CD5\u5C06 ''<>'' \u4E0E\u533F\u540D\u5185\u90E8\u7C7B\u4E00\u8D77\u4F7F\u7528
|
||||
|
||||
# 0: symbol kind, 1: symbol, 2: symbol, 3: message segment
|
||||
@ -1336,13 +1521,23 @@ compiler.warn.enum.as.identifier=\u4ECE\u53D1\u884C\u7248 5 \u5F00\u59CB, ''enum
|
||||
|
||||
compiler.warn.assert.as.identifier=\u4ECE\u53D1\u884C\u7248 1.4 \u5F00\u59CB, ''assert'' \u662F\u4E00\u4E2A\u5173\u952E\u5B57, \u4F46\u4E0D\u80FD\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u8BF7\u4F7F\u7528 -source 1.4 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5C06 ''assert'' \u7528\u4F5C\u5173\u952E\u5B57)
|
||||
|
||||
compiler.warn.underscore.as.identifier=''_'' \u5DF2\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u4EE5\u540E\u7684\u53D1\u884C\u7248\u53EF\u80FD\u4E0D\u652F\u6301\u5C06 ''_'' \u7528\u4F5C\u6807\u8BC6\u7B26)
|
||||
|
||||
compiler.err.enum.as.identifier=\u4ECE\u53D1\u884C\u7248 5 \u5F00\u59CB, ''enum'' \u4E3A\u5173\u952E\u5B57, \u800C\u4E0D\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u8BF7\u4F7F\u7528 -source 1.4 \u6216\u66F4\u4F4E\u7248\u672C\u4EE5\u5C06 ''enum'' \u7528\u4F5C\u6807\u8BC6\u7B26)
|
||||
|
||||
compiler.err.assert.as.identifier=\u4ECE\u53D1\u884C\u7248 1.4 \u5F00\u59CB, ''assert'' \u662F\u4E00\u4E2A\u5173\u952E\u5B57, \u4F46\u4E0D\u80FD\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u8BF7\u4F7F\u7528 -source 1.3 \u6216\u66F4\u4F4E\u7248\u672C\u4EE5\u5C06 ''assert'' \u7528\u4F5C\u6807\u8BC6\u7B26)
|
||||
|
||||
# TODO 308: make a better error message
|
||||
# compiler.err.this.as.identifier=\
|
||||
# as of release 8, ''this'' is allowed as the parameter name for the receiver type only, which has to be the first parameter
|
||||
compiler.err.this.as.identifier=\u4ECE\u53D1\u884C\u7248 8 \u5F00\u59CB, ''this'' \u53EA\u80FD\u4F5C\u4E3A\u63A5\u6536\u65B9\u7C7B\u578B\u7684\u53C2\u6570\u540D, \u8BE5\u53C2\u6570\u5FC5\u987B\u4E3A\u7B2C\u4E00\u4E2A\u53C2\u6570
|
||||
|
||||
# TODO 308: make a better error message
|
||||
compiler.err.cant.annotate.static.class=\u65E0\u6CD5\u5BF9\u5C01\u95ED\u9759\u6001\u5D4C\u5957\u7C7B\u8FDB\u884C\u6CE8\u91CA
|
||||
# TODO 308: make a better error message
|
||||
compiler.err.cant.annotate.nested.type=\u65E0\u6CD5\u5BF9\u5D4C\u5957\u7C7B\u578B\u8FDB\u884C\u6CE8\u91CA
|
||||
|
||||
compiler.err.incorrect.receiver.type=\u63A5\u6536\u65B9\u7C7B\u578B\u4E0E\u5C01\u95ED\u7C7B\u7C7B\u578B\u4E0D\u5339\u914D
|
||||
|
||||
compiler.err.no.annotations.on.dot.class=\u7C7B\u6587\u5B57\u7C7B\u578B\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u4EFB\u4F55\u6CE8\u91CA
|
||||
|
||||
# 0: string
|
||||
compiler.err.generics.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u6CDB\u578B\n(\u8BF7\u4F7F\u7528 -source 5 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u6CDB\u578B)
|
||||
@ -1353,9 +1548,8 @@ compiler.err.varargs.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u630
|
||||
# 0: string
|
||||
compiler.err.annotations.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u6CE8\u91CA\n(\u8BF7\u4F7F\u7528 -source 5 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u6CE8\u91CA)
|
||||
|
||||
#308 compiler.err.type.annotations.not.supported.in.source=\
|
||||
#308 type annotations are not supported in -source {0}\n\
|
||||
#308 (use -source 8 or higher to enable type annotations)
|
||||
# 0: string
|
||||
compiler.err.type.annotations.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u7C7B\u578B\u6CE8\u91CA\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u7C7B\u578B\u6CE8\u91CA)
|
||||
|
||||
# 0: string
|
||||
compiler.err.foreach.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 for-each \u5FAA\u73AF\n(\u8BF7\u4F7F\u7528 -source 5 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 for-each \u5FAA\u73AF)
|
||||
@ -1375,6 +1569,47 @@ compiler.err.multicatch.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u
|
||||
# 0: string
|
||||
compiler.err.string.switch.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 switch \u4E2D\u5B58\u5728\u5B57\u7B26\u4E32\n(\u8BF7\u4F7F\u7528 -source 7 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5141\u8BB8 switch \u4E2D\u5B58\u5728\u5B57\u7B26\u4E32)
|
||||
|
||||
# 0: string
|
||||
compiler.err.lambda.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 lambda \u8868\u8FBE\u5F0F\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 lambda \u8868\u8FBE\u5F0F)
|
||||
|
||||
# 0: string
|
||||
compiler.err.method.references.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u65B9\u6CD5\u5F15\u7528\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u65B9\u6CD5\u5F15\u7528)
|
||||
|
||||
# 0: string
|
||||
compiler.err.default.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9ED8\u8BA4\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9ED8\u8BA4\u65B9\u6CD5)
|
||||
|
||||
# 0: string
|
||||
compiler.err.intersection.types.in.cast.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u8F6C\u6362\u4E2D\u7684\u4EA4\u53C9\u7C7B\u578B\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9ED8\u8BA4\u65B9\u6CD5)
|
||||
|
||||
# 0: string
|
||||
compiler.err.static.intf.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9759\u6001\u63A5\u53E3\u65B9\u6CD5)
|
||||
|
||||
########################################
|
||||
# Diagnostics for verbose resolution
|
||||
# used by Resolve (debug only)
|
||||
########################################
|
||||
|
||||
# 0: number, 1: symbol, 2: unused
|
||||
compiler.misc.applicable.method.found=\u627E\u5230\u7B2C {0} \u4E2A\u9002\u7528\u65B9\u6CD5: {1}
|
||||
|
||||
# 0: number, 1: symbol, 2: message segment
|
||||
compiler.misc.applicable.method.found.1=\u627E\u5230\u7B2C {0} \u4E2A\u9002\u7528\u65B9\u6CD5: {1}\n({2})
|
||||
|
||||
# 0: number, 1: symbol, 2: message segment
|
||||
compiler.misc.not.applicable.method.found=\u627E\u5230\u7B2C {0} \u4E2A\u4E0D\u9002\u7528\u7684\u65B9\u6CD5: {1}\n({2})
|
||||
|
||||
# 0: type
|
||||
compiler.misc.partial.inst.sig=\u90E8\u5206\u5B9E\u4F8B\u5316\u4E3A: {0}
|
||||
|
||||
# 0: name, 1: symbol, 2: number, 3: MethodResolutionPhase, 4: list of type or message segment, 5: list of type or message segment
|
||||
compiler.note.verbose.resolve.multi=\u5C06\u7C7B\u578B {1} \u7684\u65B9\u6CD5 {0} \u89E3\u6790\u4E3A\u5019\u9009\u9879 {2}\n\u9636\u6BB5: {3}\n\u5177\u6709\u5B9E\u9645\u503C: {4}\n\u5177\u6709\u7C7B\u578B\u53C2\u6570: {5}\n\u5019\u9009\u9879:
|
||||
|
||||
# 0: name, 1: symbol, 2: unused, 3: MethodResolutionPhase, 4: list of type or message segment, 5: list of type or message segment
|
||||
compiler.note.verbose.resolve.multi.1=\u7C7B\u578B {1} \u7684\u65B9\u6CD5 {0} \u89E3\u6790\u9519\u8BEF\n\u9636\u6BB5: {3}\n\u5177\u6709\u5B9E\u9645\u503C: {4}\n\u5177\u6709\u7C7B\u578B\u53C2\u6570: {5}\n\u5019\u9009\u9879:
|
||||
|
||||
# 0: symbol, 1: type, 2: type
|
||||
compiler.note.deferred.method.inst=\u65B9\u6CD5 {0} \u7684\u5EF6\u8FDF\u5B9E\u4F8B\u5316\n\u5B9E\u4F8B\u5316\u7B7E\u540D: {1}\n\u76EE\u6807\u7C7B\u578B: {2}
|
||||
|
||||
########################################
|
||||
# Diagnostics for where clause implementation
|
||||
# used by the RichDiagnosticFormatter.
|
||||
@ -1411,8 +1646,14 @@ compiler.misc.where.typevar={0}\u6269\u5C55\u5DF2\u5728{2} {3}\u4E2D\u58F0\u660E
|
||||
|
||||
# compact where clause for type variable: contains the kindname ({2}) and location ({3})
|
||||
# in which the typevar has been declared
|
||||
# 0: type, 1: list of type, 2: symbol kind, 3: symbol
|
||||
compiler.misc.where.typevar.1={0}\u5DF2\u5728{2} {3}\u4E2D\u58F0\u660E
|
||||
|
||||
# where clause for fresh type variable: contains upper bound(s) ('extends {1}').
|
||||
# Since a fresh type-variable is synthetic - there's no location/kindname here.
|
||||
# 0: type, 1: list of type
|
||||
compiler.misc.where.fresh.typevar={0}\u6269\u5C55{1}
|
||||
|
||||
# where clause for type variable: contains all the upper bound(s) ('extends {1}')
|
||||
# of this intersection type
|
||||
# 0: type, 1: list of type
|
||||
@ -1435,4 +1676,39 @@ compiler.misc.where.description.typevar.1=\u5176\u4E2D, {0}\u662F\u7C7B\u578B\u5
|
||||
|
||||
compiler.misc.where.description.intersection.1=\u5176\u4E2D, {0}\u662F\u4EA4\u53C9\u7C7B\u578B:
|
||||
|
||||
###
|
||||
# errors related to doc comments
|
||||
|
||||
compiler.err.dc.bad.entity=HTML \u5B9E\u4F53\u9519\u8BEF
|
||||
|
||||
compiler.err.dc.bad.gt=''>'' \u7684\u7528\u6CD5\u9519\u8BEF
|
||||
|
||||
compiler.err.dc.bad.inline.tag=\u5185\u5D4C\u6807\u8BB0\u7684\u7528\u6CD5\u4E0D\u6B63\u786E
|
||||
|
||||
compiler.err.dc.identifier.expected=\u9700\u8981\u6807\u8BC6\u7B26
|
||||
|
||||
compiler.err.dc.malformed.html=\u683C\u5F0F\u9519\u8BEF\u7684 HTML
|
||||
|
||||
compiler.err.dc.missing.semicolon=\u7F3A\u5C11\u5206\u53F7
|
||||
|
||||
compiler.err.dc.no.content=\u65E0\u5185\u5BB9
|
||||
|
||||
compiler.err.dc.no.tag.name='@' \u540E\u6CA1\u6709\u6807\u8BB0\u540D
|
||||
|
||||
compiler.err.dc.gt.expected=\u9700\u8981 ''>''
|
||||
|
||||
compiler.err.dc.ref.bad.parens=\u5F15\u7528\u4E2D\u7F3A\u5C11 '')''
|
||||
|
||||
compiler.err.dc.ref.syntax.error=\u5F15\u7528\u4E2D\u51FA\u73B0\u8BED\u6CD5\u9519\u8BEF
|
||||
|
||||
compiler.err.dc.ref.unexpected.input=\u610F\u5916\u7684\u6587\u672C
|
||||
|
||||
compiler.err.dc.unexpected.content=\u610F\u5916\u7684\u5185\u5BB9
|
||||
|
||||
compiler.err.dc.unterminated.inline.tag=\u672A\u7EC8\u6B62\u7684\u5185\u5D4C\u6807\u8BB0
|
||||
|
||||
compiler.err.dc.unterminated.signature=\u672A\u7EC8\u6B62\u7684\u7B7E\u540D
|
||||
|
||||
compiler.err.dc.unterminated.string=\u672A\u7EC8\u6B62\u7684\u5B57\u7B26\u4E32
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# 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}"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# 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;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# 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}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# 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}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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;
|
||||
|
@ -91,9 +91,11 @@ public class Analyzer {
|
||||
result.requiredArchives.add(source);
|
||||
}
|
||||
// either a profile name or the archive name
|
||||
String tname = getProfile(target);
|
||||
if (tname.isEmpty()){
|
||||
tname = source.toString();
|
||||
String tname = result.getTargetProfile(target);
|
||||
if (tname.isEmpty()) {
|
||||
tname = PlatformClassPath.contains(source)
|
||||
? "JDK internal API (" + source.getFileName() + ")"
|
||||
: source.toString();
|
||||
}
|
||||
if (!result.targetNames.contains(tname)) {
|
||||
result.targetNames.add(tname);
|
||||
@ -110,7 +112,7 @@ public class Analyzer {
|
||||
* a fully-qualified classname, a package name, a profile or
|
||||
* archive name depending on the Analyzer's type.
|
||||
*/
|
||||
void visit(String origin, String target);
|
||||
void visit(String origin, String target, String profile);
|
||||
/**
|
||||
* Visits the source archive to its destination archive of
|
||||
* a recorded dependency.
|
||||
@ -124,7 +126,7 @@ public class Analyzer {
|
||||
v.visit(r.archive, a);
|
||||
}
|
||||
for (String name : r.targetNames) {
|
||||
v.visit(r.archive.getFileName(), name);
|
||||
v.visit(r.archive.getFileName(), name, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -138,7 +140,7 @@ public class Analyzer {
|
||||
for (String target : r.deps.get(origin)) {
|
||||
// filter intra-dependency unless in verbose mode
|
||||
if (type == Type.VERBOSE || getArchive(origin) != getArchive(target)) {
|
||||
v.visit(origin, target);
|
||||
v.visit(origin, target, r.getTargetProfile(target));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -149,21 +151,16 @@ public class Analyzer {
|
||||
return map.containsKey(name) ? map.get(name) : NOT_FOUND;
|
||||
}
|
||||
|
||||
public String getArchiveName(String name) {
|
||||
return getArchive(name).getFileName();
|
||||
}
|
||||
|
||||
public String getProfile(String name) {
|
||||
String pn = type == Type.CLASS ? packageOf(name) : name;
|
||||
Archive source = map.get(name);
|
||||
if (source != null && PlatformClassPath.contains(source)) {
|
||||
String profile = PlatformClassPath.getProfileName(pn);
|
||||
if (profile.isEmpty()) {
|
||||
return "JDK internal API (" + source.getFileName() + ")";
|
||||
}
|
||||
return profile;
|
||||
}
|
||||
return "";
|
||||
/**
|
||||
* Returns the file name of the archive for non-JRE class or
|
||||
* internal JRE classes. It returns empty string for SE API.
|
||||
*/
|
||||
public String getArchiveName(String target, String profile) {
|
||||
Archive source = getArchive(target);
|
||||
String name = source.getFileName();
|
||||
if (PlatformClassPath.contains(source))
|
||||
return profile.isEmpty() ? "JDK internal API (" + name + ")" : "";
|
||||
return name;
|
||||
}
|
||||
|
||||
private abstract class ArchiveDeps implements Archive.Visitor {
|
||||
@ -200,6 +197,8 @@ public class Analyzer {
|
||||
}
|
||||
|
||||
public abstract void visit(Location o, Location t);
|
||||
public abstract String getTargetProfile(String target);
|
||||
|
||||
}
|
||||
|
||||
private class ClassVisitor extends ArchiveDeps {
|
||||
@ -212,6 +211,10 @@ public class Analyzer {
|
||||
public void visit(Location o, Location t) {
|
||||
add(o.getClassName(), t.getClassName());
|
||||
}
|
||||
public String getTargetProfile(String target) {
|
||||
int i = target.lastIndexOf('.');
|
||||
return (i > 0) ? Profiles.getProfileName(target.substring(0, i)) : "";
|
||||
}
|
||||
}
|
||||
|
||||
private class PackageVisitor extends ArchiveDeps {
|
||||
@ -221,19 +224,15 @@ public class Analyzer {
|
||||
public void visit(Location o, Location t) {
|
||||
add(packageOf(o), packageOf(t));
|
||||
}
|
||||
|
||||
public void visit(Location l) {
|
||||
add(packageOf(l));
|
||||
}
|
||||
|
||||
private String packageOf(Location loc) {
|
||||
String pkg = loc.getPackageName();
|
||||
return pkg.isEmpty() ? "<unnamed>" : pkg;
|
||||
}
|
||||
}
|
||||
|
||||
private static String packageOf(String cn) {
|
||||
int i = cn.lastIndexOf('.');
|
||||
return (i > 0) ? cn.substring(0, i) : "<unnamed>";
|
||||
public String getTargetProfile(String target) {
|
||||
return Profiles.getProfileName(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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
|
||||
@ -38,7 +38,7 @@ import java.util.regex.Pattern;
|
||||
* Implementation for the jdeps tool for static class dependency analysis.
|
||||
*/
|
||||
class JdepsTask {
|
||||
class BadArgs extends Exception {
|
||||
static class BadArgs extends Exception {
|
||||
static final long serialVersionUID = 8765093759964640721L;
|
||||
BadArgs(String key, Object... args) {
|
||||
super(JdepsTask.getMessage(key, args));
|
||||
@ -119,7 +119,7 @@ class JdepsTask {
|
||||
} else if ("class".equals(arg)) {
|
||||
task.options.verbose = Analyzer.Type.CLASS;
|
||||
} else {
|
||||
throw task.new BadArgs("err.invalid.arg.for.option", opt);
|
||||
throw new BadArgs("err.invalid.arg.for.option", opt);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -139,8 +139,11 @@ class JdepsTask {
|
||||
}
|
||||
},
|
||||
new Option(false, "-P", "--profile") {
|
||||
void process(JdepsTask task, String opt, String arg) {
|
||||
void process(JdepsTask task, String opt, String arg) throws BadArgs {
|
||||
task.options.showProfile = true;
|
||||
if (Profiles.getProfileCount() == 0) {
|
||||
throw new BadArgs("err.option.unsupported", opt, getMessage("err.profiles.msg"));
|
||||
}
|
||||
}
|
||||
},
|
||||
new Option(false, "-R", "--recursive") {
|
||||
@ -153,7 +156,7 @@ class JdepsTask {
|
||||
try {
|
||||
task.options.depth = Integer.parseInt(arg);
|
||||
} catch (NumberFormatException e) {
|
||||
throw task.new BadArgs("err.invalid.arg.for.option", opt);
|
||||
throw new BadArgs("err.invalid.arg.for.option", opt);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -382,9 +385,9 @@ class JdepsTask {
|
||||
|
||||
private void printSummary(final PrintWriter out, final Analyzer analyzer) {
|
||||
Analyzer.Visitor visitor = new Analyzer.Visitor() {
|
||||
public void visit(String origin, String profile) {
|
||||
public void visit(String origin, String target, String profile) {
|
||||
if (options.showProfile) {
|
||||
out.format("%-30s -> %s%n", origin, profile);
|
||||
out.format("%-30s -> %s%n", origin, target);
|
||||
}
|
||||
}
|
||||
public void visit(Archive origin, Archive target) {
|
||||
@ -399,17 +402,15 @@ class JdepsTask {
|
||||
private void printDependencies(final PrintWriter out, final Analyzer analyzer) {
|
||||
Analyzer.Visitor visitor = new Analyzer.Visitor() {
|
||||
private String pkg = "";
|
||||
public void visit(String origin, String target) {
|
||||
public void visit(String origin, String target, String profile) {
|
||||
if (!origin.equals(pkg)) {
|
||||
pkg = origin;
|
||||
out.format(" %s (%s)%n", origin, analyzer.getArchiveName(origin));
|
||||
out.format(" %s (%s)%n", origin, analyzer.getArchive(origin).getFileName());
|
||||
}
|
||||
Archive source = analyzer.getArchive(target);
|
||||
String profile = options.showProfile ? analyzer.getProfile(target) : "";
|
||||
out.format(" -> %-50s %s%n", target,
|
||||
PlatformClassPath.contains(source)
|
||||
(options.showProfile && !profile.isEmpty())
|
||||
? profile
|
||||
: analyzer.getArchiveName(target));
|
||||
: analyzer.getArchiveName(target, profile));
|
||||
}
|
||||
public void visit(Archive origin, Archive target) {
|
||||
out.format("%s -> %s%n", origin, target);
|
||||
@ -514,7 +515,6 @@ class JdepsTask {
|
||||
boolean help;
|
||||
boolean version;
|
||||
boolean fullVersion;
|
||||
boolean showFlags;
|
||||
boolean showProfile;
|
||||
boolean showSummary;
|
||||
boolean wildcard;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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
|
||||
@ -37,34 +37,6 @@ import java.util.*;
|
||||
* ClassPath for Java SE and JDK
|
||||
*/
|
||||
class PlatformClassPath {
|
||||
/*
|
||||
* Profiles for Java SE
|
||||
*
|
||||
* This is a temporary workaround until a common API is defined for langtools
|
||||
* to determine which profile a given classname belongs to. The list of
|
||||
* packages and profile names are hardcoded in jdk.properties and
|
||||
* split packages are not supported.
|
||||
*/
|
||||
static class Profile {
|
||||
final String name;
|
||||
final Set<String> packages;
|
||||
|
||||
Profile(String name) {
|
||||
this.name = name;
|
||||
this.packages = new HashSet<String>();
|
||||
}
|
||||
}
|
||||
|
||||
private final static String JAVAFX = "javafx";
|
||||
private final static Map<String,Profile> map = getProfilePackages();
|
||||
static String getProfileName(String packageName) {
|
||||
Profile profile = map.get(packageName);
|
||||
if (packageName.startsWith(JAVAFX + ".")) {
|
||||
profile = map.get(JAVAFX);
|
||||
}
|
||||
return profile != null ? profile.name : "";
|
||||
}
|
||||
|
||||
private final static List<Archive> javaHomeArchives = init();
|
||||
static List<Archive> getArchives() {
|
||||
return javaHomeArchives;
|
||||
@ -77,7 +49,6 @@ class PlatformClassPath {
|
||||
private static List<Archive> init() {
|
||||
List<Archive> result = new ArrayList<Archive>();
|
||||
String javaHome = System.getProperty("java.home");
|
||||
List<File> files = new ArrayList<File>();
|
||||
File jre = new File(javaHome, "jre");
|
||||
File lib = new File(javaHome, "lib");
|
||||
|
||||
@ -100,13 +71,6 @@ class PlatformClassPath {
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
// add a JavaFX profile if there is jfxrt.jar
|
||||
for (Archive archive : result) {
|
||||
if (archive.getFileName().equals("jfxrt.jar")) {
|
||||
map.put(JAVAFX, new Profile("jfxrt.jar"));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -140,30 +104,4 @@ class PlatformClassPath {
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static Map<String,Profile> getProfilePackages() {
|
||||
Map<String,Profile> map = new HashMap<String,Profile>();
|
||||
|
||||
// read the properties as a ResourceBundle as the build compiles
|
||||
// the properties file into Java class. Another alternative is
|
||||
// to load it as Properties and fix the build to exclude this file.
|
||||
ResourceBundle profileBundle =
|
||||
ResourceBundle.getBundle("com.sun.tools.jdeps.resources.jdk");
|
||||
|
||||
int i=1;
|
||||
String key;
|
||||
while (profileBundle.containsKey((key = "profile." + i + ".name"))) {
|
||||
Profile profile = new Profile(profileBundle.getString(key));
|
||||
String n = profileBundle.getString("profile." + i + ".packages");
|
||||
String[] pkgs = n.split("\\s+");
|
||||
for (String p : pkgs) {
|
||||
if (p.isEmpty()) continue;
|
||||
assert(map.containsKey(p) == false);
|
||||
profile.packages.add(p);
|
||||
map.put(p, profile);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
241
langtools/src/share/classes/com/sun/tools/jdeps/Profiles.java
Normal file
241
langtools/src/share/classes/com/sun/tools/jdeps/Profiles.java
Normal file
@ -0,0 +1,241 @@
|
||||
/*
|
||||
* Copyright (c) 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.jdeps;
|
||||
|
||||
import com.sun.tools.classfile.Annotation;
|
||||
import com.sun.tools.classfile.Annotation.*;
|
||||
import com.sun.tools.classfile.Attribute;
|
||||
import com.sun.tools.classfile.ClassFile;
|
||||
import com.sun.tools.classfile.ConstantPool;
|
||||
import com.sun.tools.classfile.ConstantPool.*;
|
||||
import com.sun.tools.classfile.ConstantPoolException;
|
||||
import com.sun.tools.classfile.RuntimeAnnotations_attribute;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
/**
|
||||
* Build the profile information from ct.sym if exists.
|
||||
*/
|
||||
class Profiles {
|
||||
private static final Map<String,Profile> map = initProfiles();
|
||||
/**
|
||||
* Returns the name of the profile for the given package name.
|
||||
* It returns an empty string if the given package is not in any profile.
|
||||
*/
|
||||
public static String getProfileName(String pn) {
|
||||
Profile profile = map.get(pn);
|
||||
return (profile != null && profile.packages.contains(pn))
|
||||
? profile.name : "";
|
||||
}
|
||||
|
||||
public static int getProfileCount() {
|
||||
return new HashSet<Profile>(map.values()).size();
|
||||
}
|
||||
|
||||
private static Map<String,Profile> initProfiles() {
|
||||
List<Profile> profiles = new ArrayList<Profile>();
|
||||
try {
|
||||
String profilesProps = System.getProperty("jdeps.profiles");
|
||||
if (profilesProps != null) {
|
||||
// for testing for JDK development build where ct.sym doesn't exist
|
||||
initProfilesFromProperties(profiles, profilesProps);
|
||||
} else {
|
||||
Path home = Paths.get(System.getProperty("java.home"));
|
||||
if (home.endsWith("jre")) {
|
||||
home = home.getParent();
|
||||
}
|
||||
Path ctsym = home.resolve("lib").resolve("ct.sym");
|
||||
if (ctsym.toFile().exists()) {
|
||||
// add a default Full JRE
|
||||
profiles.add(0, new Profile("Full JRE", 0));
|
||||
// parse ct.sym and load information about profiles
|
||||
try (JarFile jf = new JarFile(ctsym.toFile())) {
|
||||
ClassFileReader reader = ClassFileReader.newInstance(ctsym, jf);
|
||||
for (ClassFile cf : reader.getClassFiles()) {
|
||||
findProfile(profiles, cf);
|
||||
}
|
||||
}
|
||||
|
||||
// merge the last Profile with the "Full JRE"
|
||||
if (profiles.size() > 1) {
|
||||
Profile fullJRE = profiles.get(0);
|
||||
Profile p = profiles.remove(profiles.size() - 1);
|
||||
for (String pn : fullJRE.packages) {
|
||||
// The last profile contains the packages determined from ct.sym.
|
||||
// Move classes annotated profile==0 or no attribute that are
|
||||
// added in the fullJRE profile to either supported or proprietary
|
||||
// packages appropriately
|
||||
if (p.proprietaryPkgs.contains(pn)) {
|
||||
p.proprietaryPkgs.add(pn);
|
||||
} else {
|
||||
p.packages.add(pn);
|
||||
}
|
||||
}
|
||||
fullJRE.packages.clear();
|
||||
fullJRE.proprietaryPkgs.clear();
|
||||
fullJRE.packages.addAll(p.packages);
|
||||
fullJRE.proprietaryPkgs.addAll(p.proprietaryPkgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException | ConstantPoolException e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
HashMap<String,Profile> map = new HashMap<String,Profile>();
|
||||
for (Profile profile : profiles) {
|
||||
// Inner classes are not annotated with the profile annotation
|
||||
// packages may be in one profile but also appear in the Full JRE
|
||||
// Full JRE is always the first element in profiles list and
|
||||
// so the map will contain the appropriate Profile
|
||||
for (String pn : profile.packages) {
|
||||
map.put(pn, profile);
|
||||
}
|
||||
for (String pn : profile.proprietaryPkgs) {
|
||||
map.put(pn, profile);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final String PROFILE_ANNOTATION = "Ljdk/Profile+Annotation;";
|
||||
private static final String PROPRIETARY_ANNOTATION = "Lsun/Proprietary+Annotation;";
|
||||
private static Profile findProfile(List<Profile> profiles, ClassFile cf)
|
||||
throws ConstantPoolException
|
||||
{
|
||||
RuntimeAnnotations_attribute attr = (RuntimeAnnotations_attribute)
|
||||
cf.attributes.get(Attribute.RuntimeInvisibleAnnotations);
|
||||
int index = 0;
|
||||
boolean proprietary = false;
|
||||
if (attr != null) {
|
||||
for (int i = 0; i < attr.annotations.length; i++) {
|
||||
Annotation ann = attr.annotations[i];
|
||||
String annType = cf.constant_pool.getUTF8Value(ann.type_index);
|
||||
if (PROFILE_ANNOTATION.equals(annType)) {
|
||||
for (int j = 0; j < ann.num_element_value_pairs; j++) {
|
||||
Annotation.element_value_pair pair = ann.element_value_pairs[j];
|
||||
Primitive_element_value ev = (Primitive_element_value)pair.value;
|
||||
CONSTANT_Integer_info info = (CONSTANT_Integer_info)
|
||||
cf.constant_pool.get(ev.const_value_index);
|
||||
index = info.value;
|
||||
break;
|
||||
}
|
||||
} else if (PROPRIETARY_ANNOTATION.equals(annType)) {
|
||||
proprietary = true;
|
||||
}
|
||||
}
|
||||
if (index >= profiles.size()) {
|
||||
Profile p = null;
|
||||
for (int i = profiles.size(); i <= index; i++) {
|
||||
p = new Profile(i);
|
||||
profiles.add(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Profile p = profiles.get(index);
|
||||
String name = cf.getName();
|
||||
int i = name.lastIndexOf('/');
|
||||
name = (i > 0) ? name.substring(0, i).replace('/','.') : "";
|
||||
if (proprietary) {
|
||||
p.proprietaryPkgs.add(name);
|
||||
} else {
|
||||
p.packages.add(name);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
private static void initProfilesFromProperties(List<Profile> profiles, String path)
|
||||
throws IOException
|
||||
{
|
||||
Properties props = new Properties();
|
||||
try (FileReader reader = new FileReader(path)) {
|
||||
props.load(reader);
|
||||
}
|
||||
int i=1;
|
||||
String key;
|
||||
while (props.containsKey((key = "profile." + i + ".name"))) {
|
||||
Profile profile = new Profile(props.getProperty(key), i);
|
||||
profiles.add(profile);
|
||||
String n = props.getProperty("profile." + i + ".packages");
|
||||
String[] pkgs = n.split("\\s+");
|
||||
for (String p : pkgs) {
|
||||
if (p.isEmpty()) continue;
|
||||
profile.packages.add(p);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
private static class Profile {
|
||||
final String name;
|
||||
final int profile;
|
||||
final Set<String> packages;
|
||||
final Set<String> proprietaryPkgs;
|
||||
Profile(int profile) {
|
||||
this("compact" + profile, profile);
|
||||
}
|
||||
Profile(String name, int profile) {
|
||||
this.name = name;
|
||||
this.profile = profile;
|
||||
this.packages = new HashSet<String>();
|
||||
this.proprietaryPkgs = new HashSet<String>();
|
||||
}
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
// for debugging
|
||||
public static void main(String[] args) {
|
||||
if (args.length == 0) {
|
||||
Profile[] profiles = new Profile[getProfileCount()];
|
||||
for (Profile p : map.values()) {
|
||||
// move the zeroth profile to the last
|
||||
int index = p.profile == 0 ? profiles.length-1 : p.profile-1;
|
||||
profiles[index] = p;
|
||||
}
|
||||
for (Profile p : profiles) {
|
||||
String profileName = p.name;
|
||||
SortedSet<String> set = new TreeSet<String>(p.packages);
|
||||
for (String s : set) {
|
||||
// filter out the inner classes that are not annotated with
|
||||
// the profile annotation
|
||||
if (map.get(s) == p) {
|
||||
System.out.format("%-10s %s%n", profileName, s);
|
||||
profileName = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String pn : args) {
|
||||
System.out.format("%s in %s%n", pn, getProfileName(pn));
|
||||
}
|
||||
}
|
||||
}
|
@ -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}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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());
|
||||
}
|
||||
|
@ -0,0 +1,190 @@
|
||||
/*
|
||||
* Copyright (c) 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 javax.lang.model;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import java.util.List;
|
||||
import javax.lang.model.element.*;
|
||||
import javax.lang.model.type.*;
|
||||
|
||||
/**
|
||||
* Represents a construct that can be annotated.
|
||||
*
|
||||
* A construct is either an {@linkplain
|
||||
* javax.lang.model.element.Element element} or a {@linkplain
|
||||
* javax.lang.model.type.TypeMirror type}. Annotations on an element
|
||||
* are on a <em>declaration</em>, whereas annotations on a type are on
|
||||
* a specific <em>use</em> of a type name.
|
||||
*
|
||||
* The terms <em>directly present</em> and <em>present</em> are used
|
||||
* throughout this interface to describe precisely which annotations
|
||||
* are returned by methods:
|
||||
*
|
||||
* <p>An annotation <i>A</i> is <em>directly present</em> on a
|
||||
* construct <i>E</i> if <i>E</i> is annotated, and:
|
||||
*
|
||||
* <ul>
|
||||
*
|
||||
* <li> for an invocation of {@code getAnnotation(Class<T>)} or
|
||||
* {@code getAnnotationMirrors()}, <i>E</i>'s annotations contain <i>A</i>.
|
||||
*
|
||||
* <li> for an invocation of getAnnotationsByType(Class<T>),
|
||||
* <i>E</i>'s annotations either contain <i>A</i> or, if the type of
|
||||
* <i>A</i> is repeatable, contain exactly one annotation whose value
|
||||
* element contains <i>A</i> and whose type is the containing
|
||||
* annotation type of <i>A</i>'s type.
|
||||
*
|
||||
* </ul>
|
||||
*
|
||||
* <p>An annotation A is <em>present</em> on a construct E if either:
|
||||
*
|
||||
* <ul>
|
||||
* <li> <i>A</i> is <em>directly present</em> on <i>E</i>; or
|
||||
*
|
||||
* <li> <i>A</i> is not <em>directly present</em> on <i>E</i>, and
|
||||
* <i>E</i> is an element representing a class, and <i>A</i>'s type
|
||||
* is inheritable, and <i>A</i> is <em>present</em> on the element
|
||||
* representing the superclass of <i>E</i>.
|
||||
*
|
||||
* </ul>
|
||||
*
|
||||
* @since 1.8
|
||||
* @jls 9.6 Annotation Types
|
||||
* @jls 9.6.3.3 @Inherited
|
||||
*/
|
||||
public interface AnnotatedConstruct {
|
||||
/**
|
||||
* Returns the annotations that are <em>directly present</em> on
|
||||
* this construct.
|
||||
*
|
||||
* @return the annotations <em>directly present</em> on this
|
||||
* construct; an empty list if there are none
|
||||
*/
|
||||
List<? extends AnnotationMirror> getAnnotationMirrors();
|
||||
|
||||
/**
|
||||
* Returns this construct's annotation of the
|
||||
* specified type if such an annotation is <em>present</em>, else {@code
|
||||
* null}.
|
||||
*
|
||||
* <p> The annotation returned by this method could contain an element
|
||||
* whose value is of type {@code Class}.
|
||||
* This value cannot be returned directly: information necessary to
|
||||
* locate and load a class (such as the class loader to use) is
|
||||
* not available, and the class might not be loadable at all.
|
||||
* Attempting to read a {@code Class} object by invoking the relevant
|
||||
* method on the returned annotation
|
||||
* will result in a {@link MirroredTypeException},
|
||||
* from which the corresponding {@link TypeMirror} may be extracted.
|
||||
* Similarly, attempting to read a {@code Class[]}-valued element
|
||||
* will result in a {@link MirroredTypesException}.
|
||||
*
|
||||
* <blockquote>
|
||||
* <i>Note:</i> This method is unlike others in this and related
|
||||
* interfaces. It operates on runtime reflective information —
|
||||
* representations of annotation types currently loaded into the
|
||||
* VM — rather than on the representations defined by and used
|
||||
* throughout these interfaces. Consequently, calling methods on
|
||||
* the returned annotation object can throw many of the exceptions
|
||||
* that can be thrown when calling methods on an annotation object
|
||||
* returned by core reflection. This method is intended for
|
||||
* callers that are written to operate on a known, fixed set of
|
||||
* annotation types.
|
||||
* </blockquote>
|
||||
*
|
||||
* @param <A> the annotation type
|
||||
* @param annotationType the {@code Class} object corresponding to
|
||||
* the annotation type
|
||||
* @return this element's or type use's annotation for the
|
||||
* specified annotation type if present on this element, else
|
||||
* {@code null}
|
||||
*
|
||||
* @see #getAnnotationMirrors()
|
||||
* @see java.lang.reflect.AnnotatedElement#getAnnotation
|
||||
* @see EnumConstantNotPresentException
|
||||
* @see AnnotationTypeMismatchException
|
||||
* @see IncompleteAnnotationException
|
||||
* @see MirroredTypeException
|
||||
* @see MirroredTypesException
|
||||
* @jls 9.6.1 Annotation Type Elements
|
||||
*/
|
||||
<A extends Annotation> A getAnnotation(Class<A> annotationType);
|
||||
|
||||
/**
|
||||
* Returns annotations that are <em>present</em> on this construct.
|
||||
*
|
||||
* If there are no annotations <em>present</em> on this construct,
|
||||
* the return value is an array of length 0.
|
||||
*
|
||||
* The difference between this method and {@link #getAnnotation(Class)}
|
||||
* is that this method detects if its argument is a <em>repeatable
|
||||
* annotation type</em>, and if so, attempts to find one or more
|
||||
* annotations of that type by "looking through" a container annotation.
|
||||
*
|
||||
* <p> The annotations returned by this method could contain an element
|
||||
* whose value is of type {@code Class}.
|
||||
* This value cannot be returned directly: information necessary to
|
||||
* locate and load a class (such as the class loader to use) is
|
||||
* not available, and the class might not be loadable at all.
|
||||
* Attempting to read a {@code Class} object by invoking the relevant
|
||||
* method on the returned annotation
|
||||
* will result in a {@link MirroredTypeException},
|
||||
* from which the corresponding {@link TypeMirror} may be extracted.
|
||||
* Similarly, attempting to read a {@code Class[]}-valued element
|
||||
* will result in a {@link MirroredTypesException}.
|
||||
*
|
||||
* <blockquote>
|
||||
* <i>Note:</i> This method is unlike others in this and related
|
||||
* interfaces. It operates on runtime reflective information —
|
||||
* representations of annotation types currently loaded into the
|
||||
* VM — rather than on the representations defined by and used
|
||||
* throughout these interfaces. Consequently, calling methods on
|
||||
* the returned annotation object can throw many of the exceptions
|
||||
* that can be thrown when calling methods on an annotation object
|
||||
* returned by core reflection. This method is intended for
|
||||
* callers that are written to operate on a known, fixed set of
|
||||
* annotation types.
|
||||
* </blockquote>
|
||||
*
|
||||
* @param <A> the annotation type
|
||||
* @param annotationType the {@code Class} object corresponding to
|
||||
* the annotation type
|
||||
* @return this element's annotations for the specified annotation
|
||||
* type if present on this element, else an empty array
|
||||
*
|
||||
* @see #getAnnotationMirrors()
|
||||
* @see #getAnnotation(java.lang.Class)
|
||||
* @see java.lang.reflect.AnnotatedElement#getAnnotationsByType
|
||||
* @see EnumConstantNotPresentException
|
||||
* @see AnnotationTypeMismatchException
|
||||
* @see IncompleteAnnotationException
|
||||
* @see MirroredTypeException
|
||||
* @see MirroredTypesException
|
||||
* @jls 9.6 Annotation Types
|
||||
* @jls 9.6.1 Annotation Type Elements
|
||||
*/
|
||||
<A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType);
|
||||
}
|
@ -60,8 +60,7 @@ import javax.lang.model.util.*;
|
||||
* @see TypeMirror
|
||||
* @since 1.6
|
||||
*/
|
||||
public interface Element {
|
||||
|
||||
public interface Element extends javax.lang.model.AnnotatedConstruct {
|
||||
/**
|
||||
* Returns the type defined by this element.
|
||||
*
|
||||
@ -88,119 +87,6 @@ public interface Element {
|
||||
*/
|
||||
ElementKind getKind();
|
||||
|
||||
/**
|
||||
* Returns the annotations that are directly present on this element.
|
||||
*
|
||||
* <p> To get inherited annotations as well, use
|
||||
* {@link Elements#getAllAnnotationMirrors(Element) getAllAnnotationMirrors}.
|
||||
*
|
||||
* @see ElementFilter
|
||||
*
|
||||
* @return the annotations directly present on this element;
|
||||
* an empty list if there are none
|
||||
*/
|
||||
List<? extends AnnotationMirror> getAnnotationMirrors();
|
||||
|
||||
/**
|
||||
* Returns this element's annotation for the specified type if
|
||||
* such an annotation is present, else {@code null}. The
|
||||
* annotation may be either inherited or directly present on this
|
||||
* element.
|
||||
*
|
||||
* <p> The annotation returned by this method could contain an element
|
||||
* whose value is of type {@code Class}.
|
||||
* This value cannot be returned directly: information necessary to
|
||||
* locate and load a class (such as the class loader to use) is
|
||||
* not available, and the class might not be loadable at all.
|
||||
* Attempting to read a {@code Class} object by invoking the relevant
|
||||
* method on the returned annotation
|
||||
* will result in a {@link MirroredTypeException},
|
||||
* from which the corresponding {@link TypeMirror} may be extracted.
|
||||
* Similarly, attempting to read a {@code Class[]}-valued element
|
||||
* will result in a {@link MirroredTypesException}.
|
||||
*
|
||||
* <blockquote>
|
||||
* <i>Note:</i> This method is unlike others in this and related
|
||||
* interfaces. It operates on runtime reflective information —
|
||||
* representations of annotation types currently loaded into the
|
||||
* VM — rather than on the representations defined by and used
|
||||
* throughout these interfaces. Consequently, calling methods on
|
||||
* the returned annotation object can throw many of the exceptions
|
||||
* that can be thrown when calling methods on an annotation object
|
||||
* returned by core reflection. This method is intended for
|
||||
* callers that are written to operate on a known, fixed set of
|
||||
* annotation types.
|
||||
* </blockquote>
|
||||
*
|
||||
* @param <A> the annotation type
|
||||
* @param annotationType the {@code Class} object corresponding to
|
||||
* the annotation type
|
||||
* @return this element's annotation for the specified annotation
|
||||
* type if present on this element, else {@code null}
|
||||
*
|
||||
* @see #getAnnotationMirrors()
|
||||
* @see java.lang.reflect.AnnotatedElement#getAnnotation
|
||||
* @see EnumConstantNotPresentException
|
||||
* @see AnnotationTypeMismatchException
|
||||
* @see IncompleteAnnotationException
|
||||
* @see MirroredTypeException
|
||||
* @see MirroredTypesException
|
||||
*/
|
||||
<A extends Annotation> A getAnnotation(Class<A> annotationType);
|
||||
|
||||
/**
|
||||
* Returns annotations that are <em>present</em> on this element.
|
||||
*
|
||||
* If there are no annotations <em>present</em> on this element, the return
|
||||
* value is an array of length 0.
|
||||
*
|
||||
* The difference between this method and {@link #getAnnotation(Class)}
|
||||
* is that this method detects if its argument is a <em>repeatable
|
||||
* annotation type</em> (JLS 9.6), and if so, attempts to find one or more
|
||||
* annotations of that type by "looking through" a container annotation.
|
||||
*
|
||||
* <p> The annotations returned by this method could contain an element
|
||||
* whose value is of type {@code Class}.
|
||||
* This value cannot be returned directly: information necessary to
|
||||
* locate and load a class (such as the class loader to use) is
|
||||
* not available, and the class might not be loadable at all.
|
||||
* Attempting to read a {@code Class} object by invoking the relevant
|
||||
* method on the returned annotation
|
||||
* will result in a {@link MirroredTypeException},
|
||||
* from which the corresponding {@link TypeMirror} may be extracted.
|
||||
* Similarly, attempting to read a {@code Class[]}-valued element
|
||||
* will result in a {@link MirroredTypesException}.
|
||||
*
|
||||
* <blockquote>
|
||||
* <i>Note:</i> This method is unlike others in this and related
|
||||
* interfaces. It operates on runtime reflective information —
|
||||
* representations of annotation types currently loaded into the
|
||||
* VM — rather than on the representations defined by and used
|
||||
* throughout these interfaces. Consequently, calling methods on
|
||||
* the returned annotation object can throw many of the exceptions
|
||||
* that can be thrown when calling methods on an annotation object
|
||||
* returned by core reflection. This method is intended for
|
||||
* callers that are written to operate on a known, fixed set of
|
||||
* annotation types.
|
||||
* </blockquote>
|
||||
*
|
||||
* @param <A> the annotation type
|
||||
* @param annotationType the {@code Class} object corresponding to
|
||||
* the annotation type
|
||||
* @return this element's annotations for the specified annotation
|
||||
* type if present on this element, else an empty array
|
||||
*
|
||||
* @see #getAnnotationMirrors()
|
||||
* @see #getAnnotation(java.lang.Class)
|
||||
* @see java.lang.reflect.AnnotatedElement#getAnnotationsByType
|
||||
* @see EnumConstantNotPresentException
|
||||
* @see AnnotationTypeMismatchException
|
||||
* @see IncompleteAnnotationException
|
||||
* @see MirroredTypeException
|
||||
* @see MirroredTypesException
|
||||
*/
|
||||
<A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType);
|
||||
|
||||
/**
|
||||
* Returns the modifiers of this element, excluding annotations.
|
||||
* Implicit modifiers, such as the {@code public} and {@code static}
|
||||
@ -325,6 +211,19 @@ public interface Element {
|
||||
*/
|
||||
int hashCode();
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p> To get inherited annotations as well, use {@link
|
||||
* Elements#getAllAnnotationMirrors(Element)
|
||||
* getAllAnnotationMirrors}.
|
||||
*
|
||||
* @see ElementFilter
|
||||
* @since 1.6
|
||||
*/
|
||||
@Override
|
||||
List<? extends AnnotationMirror> getAnnotationMirrors();
|
||||
/**
|
||||
* Applies a visitor to this element.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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
|
||||
@ -68,6 +68,25 @@ public interface ExecutableElement extends Element, Parameterizable {
|
||||
*/
|
||||
List<? extends VariableElement> getParameters();
|
||||
|
||||
/**
|
||||
* Returns the receiver type of this executable,
|
||||
* or {@link javax.lang.model.type.NoType NoType} with
|
||||
* kind {@link javax.lang.model.type.TypeKind#NONE NONE}
|
||||
* if the executable has no receiver type.
|
||||
*
|
||||
* An executable which is an instance method, or a constructor of an
|
||||
* inner class, has a receiver type derived from the {@linkplain
|
||||
* #getEnclosingElement declaring type}.
|
||||
*
|
||||
* An executable which is a static method, or a constructor of a
|
||||
* non-inner class, or an initializer (static or instance), has no
|
||||
* receiver type.
|
||||
*
|
||||
* @return the receiver type of this executable
|
||||
* @since 1.8
|
||||
*/
|
||||
TypeMirror getReceiverType();
|
||||
|
||||
/**
|
||||
* Returns {@code true} if this method or constructor accepts a variable
|
||||
* number of arguments and returns {@code false} otherwise.
|
||||
|
@ -30,7 +30,6 @@ import java.util.List;
|
||||
|
||||
import javax.lang.model.element.ExecutableElement;
|
||||
|
||||
|
||||
/**
|
||||
* Represents the type of an executable. An <i>executable</i>
|
||||
* is a method, constructor, or initializer.
|
||||
@ -78,10 +77,21 @@ public interface ExecutableType extends TypeMirror {
|
||||
List<? extends TypeMirror> getParameterTypes();
|
||||
|
||||
/**
|
||||
* Returns the type of this executable's receiver parameter.
|
||||
* Returns the receiver type of this executable,
|
||||
* or {@link javax.lang.model.type.NoType NoType} with
|
||||
* kind {@link javax.lang.model.type.TypeKind#NONE NONE}
|
||||
* if the executable has no receiver type.
|
||||
*
|
||||
* @return the type of this executable's receiver parameter
|
||||
* TODO: null if none specified or always a valid value?
|
||||
* An executable which is an instance method, or a constructor of an
|
||||
* inner class, has a receiver type derived from the {@linkplain
|
||||
* ExecutableElement#getEnclosingElement declaring type}.
|
||||
*
|
||||
* An executable which is a static method, or a constructor of a
|
||||
* non-inner class, or an initializer (static or instance), has no
|
||||
* receiver type.
|
||||
*
|
||||
* @return the receiver type of this executable
|
||||
* @since 1.8
|
||||
*/
|
||||
TypeMirror getReceiverType();
|
||||
|
||||
|
@ -151,14 +151,7 @@ public enum TypeKind {
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
INTERSECTION,
|
||||
|
||||
/**
|
||||
* An annotated type.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
ANNOTATED;
|
||||
INTERSECTION;
|
||||
|
||||
/**
|
||||
* Returns {@code true} if this kind corresponds to a primitive
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2006, 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
|
||||
@ -25,6 +25,8 @@
|
||||
|
||||
package javax.lang.model.type;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.List;
|
||||
import javax.lang.model.element.*;
|
||||
import javax.lang.model.util.Types;
|
||||
|
||||
@ -55,7 +57,7 @@ import javax.lang.model.util.Types;
|
||||
* @see Types
|
||||
* @since 1.6
|
||||
*/
|
||||
public interface TypeMirror {
|
||||
public interface TypeMirror extends javax.lang.model.AnnotatedConstruct {
|
||||
|
||||
/**
|
||||
* Returns the {@code kind} of this type.
|
||||
|
@ -194,14 +194,4 @@ public interface TypeVisitor<R, P> {
|
||||
* @since 1.8
|
||||
*/
|
||||
R visitIntersection(IntersectionType t, P p);
|
||||
|
||||
/**
|
||||
* Visits an annotated type.
|
||||
*
|
||||
* @param t the type to visit
|
||||
* @param p a visitor-specified parameter
|
||||
* @return a visitor-specified result
|
||||
* @since 1.8
|
||||
*/
|
||||
R visitAnnotated(AnnotatedType t, P p);
|
||||
}
|
||||
|
@ -133,23 +133,6 @@ public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
|
||||
return visitUnknown(t, p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits an {@code AnnotatedType} element by calling {@code
|
||||
* visit} on the underlying type.
|
||||
|
||||
* @param t {@inheritDoc}
|
||||
* @param p {@inheritDoc}
|
||||
* @return the result of calling {@code visit} on the underlying type
|
||||
*
|
||||
* @since 1.8
|
||||
*
|
||||
* TODO: should xxxVisitor8 subclasses override this and call
|
||||
* the defaultAction?
|
||||
*/
|
||||
public R visitAnnotated(AnnotatedType t, P p) {
|
||||
return visit(t.getUnderlyingType(), p);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
@ -59,6 +59,13 @@ public interface Types {
|
||||
/**
|
||||
* Tests whether two {@code TypeMirror} objects represent the same type.
|
||||
*
|
||||
* <p>Since annotations are only meta-data associated with a type,
|
||||
* the set of annotations on either argument is <em>not</em> taken
|
||||
* into account when computing whether or not two {@code
|
||||
* TypeMirror} objects are the same type. In particular, two
|
||||
* {@code TypeMirror} objects can have different annotations and
|
||||
* still be considered the same.
|
||||
*
|
||||
* <p>Caveat: if either of the arguments to this method represents a
|
||||
* wildcard, this method will return false. As a consequence, a wildcard
|
||||
* is not the same type as itself. This might be surprising at first,
|
||||
@ -301,116 +308,4 @@ public interface Types {
|
||||
* for the given type
|
||||
*/
|
||||
TypeMirror asMemberOf(DeclaredType containing, Element element);
|
||||
|
||||
/**
|
||||
* Returns the annotations targeting the type.
|
||||
*
|
||||
* @param type the targeted type
|
||||
* @return the type annotations targeting the type
|
||||
*/
|
||||
List<? extends AnnotationMirror> typeAnnotationsOf(TypeMirror type);
|
||||
|
||||
/**
|
||||
* Returns the type's annotation for the specified type if
|
||||
* such an annotation is present, else {@code null}. The
|
||||
* annotation has to be directly present on this
|
||||
* element.
|
||||
*
|
||||
* <p> The annotation returned by this method could contain an element
|
||||
* whose value is of type {@code Class}.
|
||||
* This value cannot be returned directly: information necessary to
|
||||
* locate and load a class (such as the class loader to use) is
|
||||
* not available, and the class might not be loadable at all.
|
||||
* Attempting to read a {@code Class} object by invoking the relevant
|
||||
* method on the returned annotation
|
||||
* will result in a {@link MirroredTypeException},
|
||||
* from which the corresponding {@link TypeMirror} may be extracted.
|
||||
* Similarly, attempting to read a {@code Class[]}-valued element
|
||||
* will result in a {@link MirroredTypesException}.
|
||||
*
|
||||
* <blockquote>
|
||||
* <i>Note:</i> This method is unlike others in this and related
|
||||
* interfaces. It operates on runtime reflective information —
|
||||
* representations of annotation types currently loaded into the
|
||||
* VM — rather than on the representations defined by and used
|
||||
* throughout these interfaces. Consequently, calling methods on
|
||||
* the returned annotation object can throw many of the exceptions
|
||||
* that can be thrown when calling methods on an annotation object
|
||||
* returned by core reflection. This method is intended for
|
||||
* callers that are written to operate on a known, fixed set of
|
||||
* annotation types.
|
||||
* </blockquote>
|
||||
*
|
||||
* @param <A> the annotation type
|
||||
* @param type the targeted type
|
||||
* @param annotationType the {@code Class} object corresponding to
|
||||
* the annotation type
|
||||
* @return the type's annotation for the specified annotation
|
||||
* type if present on the type, else {@code null}
|
||||
*
|
||||
* @see Element#getAnnotationMirrors()
|
||||
* @see EnumConstantNotPresentException
|
||||
* @see AnnotationTypeMismatchException
|
||||
* @see IncompleteAnnotationException
|
||||
* @see MirroredTypeException
|
||||
* @see MirroredTypesException
|
||||
*/
|
||||
<A extends Annotation> A typeAnnotationOf(TypeMirror type, Class<A> annotationType);
|
||||
|
||||
/**
|
||||
* Returns the annotations targeting the method receiver type.
|
||||
*
|
||||
* @param type the targeted type
|
||||
* @return the receiver type of the executable type
|
||||
*/
|
||||
TypeMirror receiverTypeOf(ExecutableType type);
|
||||
|
||||
/**
|
||||
* Returns the type's annotation for the specified executable type
|
||||
* receiver if such an annotation is present, else {@code null}. The
|
||||
* annotation has to be directly present on this
|
||||
* element.
|
||||
*
|
||||
* <p> The annotation returned by this method could contain an element
|
||||
* whose value is of type {@code Class}.
|
||||
* This value cannot be returned directly: information necessary to
|
||||
* locate and load a class (such as the class loader to use) is
|
||||
* not available, and the class might not be loadable at all.
|
||||
* Attempting to read a {@code Class} object by invoking the relevant
|
||||
* method on the returned annotation
|
||||
* will result in a {@link MirroredTypeException},
|
||||
* from which the corresponding {@link TypeMirror} may be extracted.
|
||||
* Similarly, attempting to read a {@code Class[]}-valued element
|
||||
* will result in a {@link MirroredTypesException}.
|
||||
*
|
||||
* <blockquote>
|
||||
* <i>Note:</i> This method is unlike others in this and related
|
||||
* interfaces. It operates on runtime reflective information —
|
||||
* representations of annotation types currently loaded into the
|
||||
* VM — rather than on the representations defined by and used
|
||||
* throughout these interfaces. Consequently, calling methods on
|
||||
* the returned annotation object can throw many of the exceptions
|
||||
* that can be thrown when calling methods on an annotation object
|
||||
* returned by core reflection. This method is intended for
|
||||
* callers that are written to operate on a known, fixed set of
|
||||
* annotation types.
|
||||
* </blockquote>
|
||||
*
|
||||
* @param <A> the annotation type
|
||||
* @param type the method type
|
||||
* @param annotationType the {@code Class} object corresponding to
|
||||
* the annotation type
|
||||
* @return the type's annotation for the specified annotation
|
||||
* type if present on the type, else {@code null}
|
||||
*
|
||||
* @see Element#getAnnotationMirrors()
|
||||
* @see EnumConstantNotPresentException
|
||||
* @see AnnotationTypeMismatchException
|
||||
* @see IncompleteAnnotationException
|
||||
* @see MirroredTypeException
|
||||
* @see MirroredTypesException
|
||||
*/
|
||||
// TODO: no longer needed?
|
||||
// <A extends Annotation> A receiverTypeAnnotationOf(ExecutableType type, Class<A> annotationType);
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8006124
|
||||
* @bug 8006124 8009684
|
||||
* @summary Test javadoc support for profiles.
|
||||
* @author Bhavesh Patel
|
||||
* @library ../lib/
|
||||
@ -33,7 +33,7 @@
|
||||
public class TestProfiles extends JavadocTester {
|
||||
|
||||
//Test information.
|
||||
private static final String BUG_ID = "8006124";
|
||||
private static final String BUG_ID = "8006124-8009684";
|
||||
private static final String PROFILE_BUG_ID = BUG_ID + "-1";
|
||||
private static final String PACKAGE_BUG_ID = BUG_ID + "-2";
|
||||
//Javadoc arguments.
|
||||
@ -49,17 +49,17 @@ public class TestProfiles extends JavadocTester {
|
||||
// Tests for profile-overview-frame.html listing all profiles.
|
||||
{PROFILE_BUG_ID + FS + "profile-overview-frame.html",
|
||||
"<span><a href=\"overview-frame.html\" "
|
||||
+ "target=\"profileListFrame\">All Packages</a></span>"
|
||||
+ "target=\"packageListFrame\">All Packages</a></span>"
|
||||
},
|
||||
{PROFILE_BUG_ID + FS + "profile-overview-frame.html",
|
||||
"<li><a href=\"compact1-frame.html\" target=\"profileListFrame\">"
|
||||
"<li><a href=\"compact1-frame.html\" target=\"packageListFrame\">"
|
||||
+ "compact1</a></li>"
|
||||
},
|
||||
// Tests for profileName-frame.html listing all packages in a profile.
|
||||
{PROFILE_BUG_ID + FS + "compact2-frame.html",
|
||||
"<span><a href=\"overview-frame.html\" target=\"profileListFrame\">"
|
||||
"<span><a href=\"overview-frame.html\" target=\"packageListFrame\">"
|
||||
+ "All Packages</a></span><span><a href=\"profile-overview-frame.html\" "
|
||||
+ "target=\"profileListFrame\">All Profiles</a></span>"
|
||||
+ "target=\"packageListFrame\">All Profiles</a></span>"
|
||||
},
|
||||
{PROFILE_BUG_ID + FS + "compact2-frame.html",
|
||||
"<li><a href=\"pkg4/compact2-package-frame.html\" "
|
||||
@ -96,11 +96,15 @@ public class TestProfiles extends JavadocTester {
|
||||
//Test for "overview-frame.html" showing the "All Profiles" link.
|
||||
{PROFILE_BUG_ID + FS + "overview-frame.html",
|
||||
"<span><a href=\"profile-overview-frame.html\" "
|
||||
+ "target=\"profileListFrame\">All Profiles</a></span>"
|
||||
+ "target=\"packageListFrame\">All Profiles</a></span>"
|
||||
},
|
||||
//Test for "className.html" showing the profile information for the type.
|
||||
{PROFILE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html",
|
||||
"<div class=\"subTitle\">compact1, compact2, compact3</div>"
|
||||
},
|
||||
{PROFILE_BUG_ID + FS + "index.html",
|
||||
"<frame src=\"overview-frame.html\" name=\"packageListFrame\" " +
|
||||
"title=\"All Packages\">"
|
||||
}
|
||||
};
|
||||
private static final String[][] PROFILES_NEGATED_TEST = {
|
||||
@ -131,12 +135,12 @@ public class TestProfiles extends JavadocTester {
|
||||
private static final String[][] PACKAGES_NEGATED_TEST = {
|
||||
{PACKAGE_BUG_ID + FS + "profile-overview-frame.html",
|
||||
"<span><a href=\"overview-frame.html\" "
|
||||
+ "target=\"profileListFrame\">All Packages</a></span>"
|
||||
+ "target=\"packageListFrame\">All Packages</a></span>"
|
||||
},
|
||||
{PACKAGE_BUG_ID + FS + "compact2-frame.html",
|
||||
"<span><a href=\"overview-frame.html\" target=\"profileListFrame\">"
|
||||
"<span><a href=\"overview-frame.html\" target=\"packageListFrame\">"
|
||||
+ "All Packages</a></span><span><a href=\"profile-overview-frame.html\" "
|
||||
+ "target=\"profileListFrame\">All Profiles</a></span>"
|
||||
+ "target=\"packageListFrame\">All Profiles</a></span>"
|
||||
},
|
||||
{PACKAGE_BUG_ID + FS + "pkg2" + FS + "compact2-package-frame.html",
|
||||
"<a href=\"../compact2-summary.html\" target=\"classFrame\">"
|
||||
@ -151,7 +155,7 @@ public class TestProfiles extends JavadocTester {
|
||||
},
|
||||
{PACKAGE_BUG_ID + FS + "overview-frame.html",
|
||||
"<span><a href=\"profile-overview-frame.html\" "
|
||||
+ "target=\"profileListFrame\">All Profiles</a></span>"
|
||||
+ "target=\"packageListFrame\">All Profiles</a></span>"
|
||||
},
|
||||
{PACKAGE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html",
|
||||
"<div class=\"subTitle\">compact1, compact2, compact3</div>"
|
||||
|
@ -4,9 +4,7 @@
|
||||
*
|
||||
* 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.
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
@ -23,26 +21,24 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package javax.lang.model.type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.lang.model.element.AnnotationMirror;
|
||||
|
||||
/**
|
||||
* Represents an annotated type.
|
||||
*
|
||||
* As of the {@link javax.lang.model.SourceVersion#RELEASE_8
|
||||
* RELEASE_8} source version, annotated types can appear for all
|
||||
* type uses.
|
||||
*
|
||||
* @author Werner Dietl
|
||||
* @since 1.8
|
||||
/*
|
||||
* @test
|
||||
* @bug 8010317
|
||||
* @summary DocLint incorrectly reports some <pre> tags as empty
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:html EmptyPreTest.java
|
||||
*/
|
||||
public interface AnnotatedType extends TypeMirror,
|
||||
DeclaredType, TypeVariable, WildcardType,
|
||||
PrimitiveType, ArrayType {
|
||||
|
||||
List<? extends AnnotationMirror> getAnnotations();
|
||||
TypeMirror getUnderlyingType();
|
||||
public class EmptyPreTest {
|
||||
/** <pre> {@code xyzzy} </pre> */
|
||||
public void m1() { }
|
||||
|
||||
/** <pre> {@docRoot} </pre> */
|
||||
public void m2() { }
|
||||
|
||||
/** <pre> {@link java.lang.String} </pre> */
|
||||
public void m3() { }
|
||||
|
||||
/** <pre> {@value} </pre> */
|
||||
public static final int v1 = 1;
|
||||
}
|
@ -34,9 +34,7 @@ import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import com.sun.tools.javac.util.ArrayUtils;
|
||||
|
||||
//original test: test/tools/javac/4846262/Test.sh
|
||||
public class CheckEBCDICLocaleTest {
|
||||
|
||||
private static final String TestSrc =
|
||||
@ -46,11 +44,11 @@ public class CheckEBCDICLocaleTest {
|
||||
" }\n" +
|
||||
"}";
|
||||
|
||||
private static final String TestOut =
|
||||
"output/Test.java:3: error: not a statement\n" +
|
||||
private static final String TestOutTemplate =
|
||||
"output%1$sTest.java:3: error: not a statement\n" +
|
||||
" abcdefg\n" +
|
||||
" ^\n" +
|
||||
"output/Test.java:3: error: ';' expected\n" +
|
||||
"output%1$sTest.java:3: error: ';' expected\n" +
|
||||
" abcdefg\n" +
|
||||
" ^\n" +
|
||||
"2 errors\n";
|
||||
@ -62,38 +60,37 @@ public class CheckEBCDICLocaleTest {
|
||||
public void test() throws Exception {
|
||||
String native2asciiBinary = Paths.get(
|
||||
System.getProperty("test.jdk"),"bin", "native2ascii").toString();
|
||||
String testVMOpts = System.getProperty("test.tool.vm.opts");
|
||||
String[] mainArgs = ToolBox.getJavacBin();
|
||||
|
||||
ToolBox.createJavaFileFromSource(TestSrc);
|
||||
Files.createDirectory(Paths.get("output"));
|
||||
|
||||
//"${TESTJAVA}${FS}bin${FS}native2ascii" ${TESTTOOLVMOPTS} -reverse -encoding IBM1047 ${TESTSRC}${FS}Test.java Test.java
|
||||
ToolBox.AnyToolArgs nativeCmdParams =
|
||||
new ToolBox.AnyToolArgs()
|
||||
.setAllArgs(native2asciiBinary, testVMOpts,
|
||||
"-reverse", "-encoding", "IBM1047",
|
||||
"Test.java", "output/Test.java");
|
||||
.appendArgs(native2asciiBinary)
|
||||
.appendArgs(ToolBox.testToolVMOpts)
|
||||
.appendArgs("-reverse", "-encoding", "IBM1047", "Test.java",
|
||||
"output/Test.java");
|
||||
ToolBox.executeCommand(nativeCmdParams);
|
||||
|
||||
//"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -J-Duser.language=en -J-Duser.region=US -J-Dfile.encoding=IBM1047 Test.java 2>Test.tmp
|
||||
ToolBox.AnyToolArgs javacParams =
|
||||
new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL)
|
||||
.setAllArgs(ArrayUtils.concatOpen(mainArgs, "-J-Duser.language=en",
|
||||
.appendArgs(ToolBox.javacBinary)
|
||||
.appendArgs(ToolBox.testToolVMOpts)
|
||||
.appendArgs("-J-Duser.language=en",
|
||||
"-J-Duser.region=US", "-J-Dfile.encoding=IBM1047",
|
||||
"output/Test.java"))
|
||||
"output/Test.java")
|
||||
.setErrOutput(new File("Test.tmp"));
|
||||
ToolBox.executeCommand(javacParams);
|
||||
|
||||
//"${TESTJAVA}${FS}bin${FS}native2ascii" ${TESTTOOLVMOPTS} -encoding IBM1047 Test.tmp Test.out
|
||||
nativeCmdParams.setAllArgs(native2asciiBinary, "-encoding", "IBM1047",
|
||||
"Test.tmp", "Test.out");
|
||||
nativeCmdParams = new ToolBox.AnyToolArgs()
|
||||
.appendArgs(native2asciiBinary)
|
||||
.appendArgs(ToolBox.testToolVMOpts)
|
||||
.appendArgs("-encoding", "IBM1047", "Test.tmp", "Test.out");
|
||||
ToolBox.executeCommand(nativeCmdParams);
|
||||
|
||||
//diff ${DIFFOPTS} -c "${TESTSRC}${FS}Test.out" Test.out
|
||||
String goldenFile = String.format(TestOutTemplate, File.separator);
|
||||
ToolBox.compareLines(Paths.get("Test.out"),
|
||||
Arrays.asList(TestOut.split("\n")), null);
|
||||
|
||||
Arrays.asList(goldenFile.split("\n")), null, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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,7 +26,7 @@
|
||||
* @bug 4249112 4785453
|
||||
* @summary Verify that implicit member modifiers are set correctly.
|
||||
*
|
||||
* @compile/ref=MemberModifiers.out -source 1.4 -target 1.4.2 -Xlint:-options -XDdumpmodifiers=cfm MemberModifiers.java
|
||||
* @compile/ref=MemberModifiers.out -source 1.4 -target 1.5 -Xlint:-options -XDdumpmodifiers=cfm MemberModifiers.java
|
||||
*/
|
||||
|
||||
// Currently, we check only that members of final classes are not final.
|
||||
|
@ -31,9 +31,11 @@
|
||||
*/
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import com.sun.tools.javac.util.ArrayUtils;
|
||||
|
||||
//original test: test/tools/javac/ClassPathTest/ClassPathTest.sh
|
||||
public class ClassPathTest {
|
||||
@ -92,24 +94,31 @@ public class ClassPathTest {
|
||||
}
|
||||
|
||||
void checkCompileCommands() throws Exception {
|
||||
String[] mainArgs = ToolBox.getJavacBin();
|
||||
|
||||
// Without the -cp . parameter the command will fail seems like when called
|
||||
// from the command line, the current dir is added to the classpath
|
||||
// automatically but this is not happening when called using ProcessBuilder
|
||||
|
||||
// testJavac success ClassPathTest3.java
|
||||
String[] commonArgs = ArrayUtils.concatOpen(mainArgs, "-cp", ".");
|
||||
List<String> mainArgs = new ArrayList<>();
|
||||
mainArgs.add(ToolBox.javacBinary.toString());
|
||||
if (ToolBox.testToolVMOpts != null) {
|
||||
mainArgs.addAll(ToolBox.testToolVMOpts);
|
||||
}
|
||||
|
||||
ToolBox.AnyToolArgs successParams =
|
||||
new ToolBox.AnyToolArgs()
|
||||
.setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest3.java"));
|
||||
List<String> commonArgs = new ArrayList<>();
|
||||
commonArgs.addAll(mainArgs);
|
||||
commonArgs.addAll(Arrays.asList("-cp", "."));
|
||||
|
||||
ToolBox.AnyToolArgs successParams = new ToolBox.AnyToolArgs()
|
||||
.appendArgs(commonArgs)
|
||||
.appendArgs("ClassPathTest3.java");
|
||||
ToolBox.executeCommand(successParams);
|
||||
|
||||
// testJavac failure ClassPathTest1.java
|
||||
ToolBox.AnyToolArgs failParams =
|
||||
new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL)
|
||||
.setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest1.java"));
|
||||
.appendArgs(commonArgs)
|
||||
.appendArgs("ClassPathTest1.java");
|
||||
ToolBox.executeCommand(failParams);
|
||||
|
||||
// This is done inside the executeCommand method
|
||||
@ -119,29 +128,50 @@ public class ClassPathTest {
|
||||
extVars.put("CLASSPATH", "bar");
|
||||
|
||||
// testJavac success ClassPathTest2.java
|
||||
successParams.setAllArgs(ArrayUtils.concatOpen(mainArgs, "ClassPathTest2.java")).set(extVars);
|
||||
successParams = new ToolBox.AnyToolArgs()
|
||||
.appendArgs(mainArgs)
|
||||
.appendArgs("ClassPathTest2.java")
|
||||
.set(extVars);
|
||||
ToolBox.executeCommand(successParams);
|
||||
|
||||
// testJavac failure ClassPathTest1.java
|
||||
failParams.setAllArgs(ArrayUtils.concatOpen(mainArgs, "ClassPathTest1.java")).set(extVars);
|
||||
failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL)
|
||||
.appendArgs(mainArgs)
|
||||
.appendArgs("ClassPathTest1.java")
|
||||
.set(extVars);
|
||||
ToolBox.executeCommand(failParams);
|
||||
|
||||
// testJavac failure ClassPathTest3.java
|
||||
failParams.setAllArgs(ArrayUtils.concatOpen(mainArgs, "ClassPathTest3.java"));
|
||||
failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL)
|
||||
.appendArgs(mainArgs)
|
||||
.appendArgs("ClassPathTest3.java")
|
||||
.set(extVars);
|
||||
ToolBox.executeCommand(failParams);
|
||||
|
||||
// testJavac success -classpath foo ClassPathTest1.java
|
||||
|
||||
commonArgs = ArrayUtils.concatOpen(mainArgs, "-cp", "foo");
|
||||
successParams.setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest1.java"));
|
||||
commonArgs.clear();
|
||||
commonArgs.addAll(mainArgs);
|
||||
commonArgs.addAll(Arrays.asList("-cp", "foo"));
|
||||
|
||||
successParams = new ToolBox.AnyToolArgs()
|
||||
.appendArgs(commonArgs)
|
||||
.appendArgs("ClassPathTest1.java")
|
||||
.set(extVars);
|
||||
ToolBox.executeCommand(successParams);
|
||||
|
||||
// testJavac failure -classpath foo ClassPathTest2.java
|
||||
failParams.setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest2.java"));
|
||||
failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL)
|
||||
.appendArgs(commonArgs)
|
||||
.appendArgs("ClassPathTest2.java")
|
||||
.set(extVars);
|
||||
ToolBox.executeCommand(failParams);
|
||||
|
||||
// testJavac failure -classpath foo ClassPathTest3.java
|
||||
failParams.setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest3.java"));
|
||||
failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL)
|
||||
.appendArgs(commonArgs)
|
||||
.appendArgs("ClassPathTest3.java")
|
||||
.set(extVars);
|
||||
ToolBox.executeCommand(failParams);
|
||||
}
|
||||
|
||||
|
17
langtools/test/tools/javac/Diagnostics/8010387/T8010387.java
Normal file
17
langtools/test/tools/javac/Diagnostics/8010387/T8010387.java
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8010387
|
||||
* @summary rich diagnostic sometimes contain wrong type variable numbering
|
||||
* @compile/fail/ref=T8010387.out -XDrawDiagnostics -XDdiags=disambiguateTvars,where T8010387.java
|
||||
*/
|
||||
abstract class T8010387<X> {
|
||||
|
||||
interface F<X> { }
|
||||
|
||||
<P> void test() {
|
||||
m(new F<P>() { });
|
||||
}
|
||||
|
||||
|
||||
abstract <T> T8010387<?> m(F<? extends X> fx);
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
T8010387.java:12:9: compiler.err.cant.apply.symbol: kindname.method, m, T8010387.F<? extends X>, compiler.misc.anonymous.class: T8010387.F<P>, kindname.class, T8010387<X>, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: compiler.misc.anonymous.class: T8010387.F<P>, T8010387.F<? extends X>))
|
||||
- compiler.misc.where.description.typevar.1: X,P,T,{(compiler.misc.where.typevar: X, java.lang.Object, kindname.class, T8010387),(compiler.misc.where.typevar: P, java.lang.Object, kindname.method, <P>test()),(compiler.misc.where.typevar: T, java.lang.Object, kindname.method, <T>m(T8010387.F<? extends X>))}
|
||||
1 error
|
@ -91,7 +91,9 @@ public class ProtectedInnerClassesTest {
|
||||
//"${TESTJAVA}${FS}bin${FS}java" ${TESTVMOPTS} -classpath "${CLASSPATH}${PS}${TESTCLASSES}" p2.ProtectedInnerClass2
|
||||
ToolBox.AnyToolArgs javaParams =
|
||||
new ToolBox.AnyToolArgs()
|
||||
.setAllArgs(ToolBox.javaBinary, "-classpath", System.getProperty("user.dir"),
|
||||
.appendArgs(ToolBox.javaBinary)
|
||||
.appendArgs(ToolBox.testVMOpts)
|
||||
.appendArgs("-classpath", System.getProperty("user.dir"),
|
||||
"p2.ProtectedInnerClass2");
|
||||
ToolBox.executeCommand(javaParams);
|
||||
}
|
||||
@ -101,14 +103,15 @@ public class ProtectedInnerClassesTest {
|
||||
//@run compile p1/ProtectedInnerClass1.java
|
||||
ToolBox.JavaToolArgs javacParams =
|
||||
new ToolBox.JavaToolArgs()
|
||||
.setOptions("-d", ".")
|
||||
.appendArgs("-d", ".")
|
||||
.setSources(protectedInnerClass1Src);
|
||||
|
||||
ToolBox.javac(javacParams);
|
||||
|
||||
//@run compile/fail p2/ProtectedInnerClass3.java
|
||||
javacParams.setSources(protectedInnerClass3Src)
|
||||
.set(ToolBox.Expect.FAIL);
|
||||
javacParams = new ToolBox.JavaToolArgs(ToolBox.Expect.FAIL)
|
||||
.appendArgs("-d", ".")
|
||||
.setSources(protectedInnerClass3Src);
|
||||
ToolBox.javac(javacParams);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 5053846
|
||||
* @summary javac: MethodRef entries are duplicated in the constant pool
|
||||
*/
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
|
||||
public class MethodRefDupInConstantPoolTest {
|
||||
|
||||
private static final String methodToLookFor =
|
||||
"java/util/Vector.iterator:()Ljava/util/Iterator;";
|
||||
|
||||
public static void main(String[] args) {
|
||||
new MethodRefDupInConstantPoolTest().run();
|
||||
}
|
||||
|
||||
void run() {
|
||||
check("-v", Paths.get(System.getProperty("test.classes"),
|
||||
"TestHelper1.class").toString());
|
||||
check("-v", Paths.get(System.getProperty("test.classes"),
|
||||
"TestHelper2.class").toString());
|
||||
}
|
||||
|
||||
void check(String... params) {
|
||||
StringWriter s;
|
||||
String out;
|
||||
try (PrintWriter pw = new PrintWriter(s = new StringWriter())) {
|
||||
com.sun.tools.javap.Main.run(params, pw);
|
||||
out = s.toString();
|
||||
}
|
||||
String constantPool = getConstantPool(out);
|
||||
if (constantPool.indexOf(methodToLookFor) !=
|
||||
constantPool.lastIndexOf(methodToLookFor)) {
|
||||
throw new AssertionError("There is more than one entry for the method seek " +
|
||||
methodToLookFor);
|
||||
}
|
||||
}
|
||||
|
||||
String getConstantPool(String out) {
|
||||
int start = out.indexOf("Constant pool:");
|
||||
int end = out.indexOf("{");
|
||||
return out.substring(start, end);
|
||||
}
|
||||
}
|
||||
|
||||
class TestHelper1 {
|
||||
void m() {
|
||||
Vector v = new Vector();
|
||||
Iterator iter = v.iterator();
|
||||
while (iter.hasNext()) {
|
||||
Object o = iter.next();
|
||||
Object o2 = o;
|
||||
}
|
||||
for (Object o: v) {
|
||||
Object o2 = o;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class TestHelper2<X extends Number & Iterable<String>> {
|
||||
void test(X x) {
|
||||
for (String s : x) { }
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8006547
|
||||
* @compile DefaultTarget.java
|
||||
*/
|
||||
|
||||
@Target({
|
||||
ElementType.CONSTRUCTOR,
|
||||
ElementType.PARAMETER,
|
||||
ElementType.TYPE,
|
||||
ElementType.METHOD,
|
||||
ElementType.LOCAL_VARIABLE,
|
||||
ElementType.PACKAGE,
|
||||
ElementType.ANNOTATION_TYPE,
|
||||
ElementType.FIELD,
|
||||
})
|
||||
@interface Container {
|
||||
DefaultTarget[] value();
|
||||
}
|
||||
|
||||
@Repeatable(Container.class)
|
||||
public @interface DefaultTarget {}
|
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8006547
|
||||
* @compile/fail/ref=DefaultTargetTypeParameter.out -XDrawDiagnostics DefaultTargetTypeParameter.java
|
||||
*/
|
||||
|
||||
@Target({
|
||||
ElementType.TYPE_PARAMETER,
|
||||
})
|
||||
@interface Container {
|
||||
DefaultTargetTypeParameter[] value();
|
||||
}
|
||||
|
||||
@Repeatable(Container.class)
|
||||
public @interface DefaultTargetTypeParameter {}
|
@ -0,0 +1,2 @@
|
||||
DefaultTargetTypeParameter.java:39:1: compiler.err.invalid.repeatable.annotation.incompatible.target: Container, DefaultTargetTypeParameter
|
||||
1 error
|
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8006547
|
||||
* @compile/fail/ref=DefaultTargetTypeUse.out -XDrawDiagnostics DefaultTargetTypeUse.java
|
||||
*/
|
||||
|
||||
@Target({
|
||||
ElementType.TYPE_USE,
|
||||
})
|
||||
@interface Container {
|
||||
DefaultTargetTypeUse[] value();
|
||||
}
|
||||
|
||||
@Repeatable(Container.class)
|
||||
public @interface DefaultTargetTypeUse {}
|
@ -0,0 +1,2 @@
|
||||
DefaultTargetTypeUse.java:39:1: compiler.err.invalid.repeatable.annotation.incompatible.target: Container, DefaultTargetTypeUse
|
||||
1 error
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8006547
|
||||
* @compile NoTargetOnContainer.java
|
||||
*/
|
||||
|
||||
@interface FooContainer {
|
||||
Foo[] value();
|
||||
}
|
||||
|
||||
@Target({
|
||||
ElementType.CONSTRUCTOR,
|
||||
ElementType.PARAMETER,
|
||||
ElementType.TYPE,
|
||||
ElementType.METHOD,
|
||||
ElementType.LOCAL_VARIABLE,
|
||||
ElementType.PACKAGE,
|
||||
ElementType.ANNOTATION_TYPE,
|
||||
ElementType.FIELD,
|
||||
})
|
||||
@Repeatable(FooContainer.class)
|
||||
@interface Foo {}
|
||||
|
||||
class NoTargetOnContainer {}
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8006547
|
||||
* @compile NoTargetOnContainer2.java
|
||||
*/
|
||||
|
||||
@interface FooContainer {
|
||||
Foo[] value();
|
||||
}
|
||||
|
||||
@Target({
|
||||
ElementType.CONSTRUCTOR,
|
||||
ElementType.PARAMETER,
|
||||
ElementType.TYPE,
|
||||
ElementType.METHOD,
|
||||
ElementType.LOCAL_VARIABLE,
|
||||
ElementType.PACKAGE,
|
||||
ElementType.ANNOTATION_TYPE,
|
||||
ElementType.FIELD,
|
||||
ElementType.TYPE_USE,
|
||||
ElementType.TYPE_PARAMETER})
|
||||
@Repeatable(FooContainer.class)
|
||||
@interface Foo {}
|
||||
|
||||
class NoTargetOnContainer2 {}
|
@ -146,6 +146,7 @@ public class Helper {
|
||||
public static final String template =
|
||||
"/*PACKAGE*/\n"
|
||||
+ "//pkg test;\n\n"
|
||||
+ "/*ANNODATA*/\n" // import statements, declaration of Foo/FooContainer
|
||||
+ "/*TYPE*/ //class\n"
|
||||
+ "class #ClassName {\n"
|
||||
+ " /*FIELD*/ //instance var\n"
|
||||
|
@ -21,245 +21,404 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 7195131
|
||||
* @author sogoel
|
||||
* @summary Combo test for all possible combinations for Target values
|
||||
* @ignore 8008339 Test TargetAnnoCombo.java is broken
|
||||
* @bug 7151010 8006547 8007766
|
||||
* @summary Default test cases for running combinations for Target values
|
||||
* @build Helper
|
||||
* @compile TargetAnnoCombo.java TestCaseGenerator.java
|
||||
* @run main TargetAnnoCombo
|
||||
*/
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.EnumSet;
|
||||
import javax.tools.Diagnostic;
|
||||
import javax.tools.DiagnosticCollector;
|
||||
import javax.tools.JavaFileObject;
|
||||
|
||||
/*
|
||||
* TargetAnnoCombo gets a list of test case numbers using TestCaseGenerator.
|
||||
* For each of the test case number, @Target sets for base and container annotations
|
||||
* are determined, source files are generated, compiled, and the result is verified
|
||||
* based on if the @Target set for base and container is a positive or negative combination.
|
||||
*
|
||||
* @Target sets for base and container annotations are determined using a bit mapping of
|
||||
* 10 ElementType enum constants defined in JDK8.
|
||||
*
|
||||
* Bit Target value
|
||||
* 0 "ElementType.ANNOTATION_TYPE"
|
||||
* 1 "ElementType.CONSTRUCTOR"
|
||||
* 2 "ElementType.FIELD"
|
||||
* 3 "ElementType.LOCAL_VARIABLE"
|
||||
* 4 "ElementType.METHOD"
|
||||
* 5 "ElementType.TYPE"
|
||||
* 6 "ElementType.PARAMETER"
|
||||
* 7 "ElementType.PACKAGE"
|
||||
* 8 "ElementType.TYPE_USE"
|
||||
* 9 "ElementType.TYPE_PARAMETER"
|
||||
*
|
||||
* Group 1:
|
||||
* 20 bits mapping, representing a test case number, is used for all target set
|
||||
* combinations ( 0 to 1048575 ) including empty @Target sets => @Target({}).
|
||||
* From this 20 bits, 10 bits are for base followed by 10 bits for container
|
||||
* where each bit maps to an ElementType enum constant defined in JDK8.
|
||||
*
|
||||
* Examples:
|
||||
* Test case number: 4, binary: 100 => container=100, base=[], container=["ElementType.FIELD"]
|
||||
* Test case number: 1003575, binary: 11110101000000110111 => base=1111010100, container=0000110111;
|
||||
* base=["ElementType.PARAMETER", "ElementType.TYPE_USE", "ElementType.METHOD", "ElementType.FIELD", "ElementType.PACKAGE", "ElementType.TYPE_PARAMETER"],
|
||||
* container=["ElementType.TYPE", "ElementType.METHOD", "ElementType.ANNOTATION_TYPE", "ElementType.CONSTRUCTOR", "ElementType.FIELD"]
|
||||
*
|
||||
* In the following groups, no @Target set is represented by null.
|
||||
* Group 2:
|
||||
* @Target is not defined on base.
|
||||
* Target sets for container are determined using the 10-bit binary number
|
||||
* resulting in 1024 test cases, mapping them to test case numbers from
|
||||
* 1048576 to (1048576 + 1023) => 1048576 to 1049599.
|
||||
*
|
||||
* Example:
|
||||
* Test case number: 1048587 => 1048587 - 1048576 = test case 11 in Group 2, binary: 1011 =>
|
||||
* base = null,
|
||||
* container = ["ElementType.ANNOTATION_TYPE","ElementType.CONSTRUCTOR","ElementType.LOCAL_VARIABLE"]
|
||||
*
|
||||
* Group 3:
|
||||
* @Target is not defined on container
|
||||
* Target sets for base are determined using the 10-bit binary number
|
||||
* resulting in 1024 test cases, mapping them to test case numbers from
|
||||
* 1049600 to (1049600 + 1023) => 1049600 to 1050623.
|
||||
*
|
||||
* Example:
|
||||
* Test case number: 1049708 => 1049708 - 1049600 = test case 108 in Group 3, binary: 1101100 =>
|
||||
* base = ["ElementType.FIELD", "ElementType.LOCAL_VARIABLE", "ElementType.TYPE", "ElementType.PARAMETER"],
|
||||
* container = null
|
||||
*
|
||||
* For the above group, test case number: 1049855 gives compiler error, JDK-8006547 filed
|
||||
*
|
||||
* Group 4:
|
||||
* @Target not defined for both base and container annotations.
|
||||
*
|
||||
* This is the last test and corresponds to test case number 1050624. base=null, container=null
|
||||
*
|
||||
* Examples to run this test:
|
||||
* 1. Run a specific test case number:
|
||||
* ${JTREG} -DTestCaseNum=10782 -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java
|
||||
* 2. Run specific number of tests:
|
||||
* ${JTREG} -DNumberOfTests=4 -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java
|
||||
* 3. Run specific number of tests with a seed:
|
||||
* ${JTREG} -DNumberOfTests=4 -DTestSeed=-972894659 -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java
|
||||
* 4. Run tests in default mode (number of tests = 1000):
|
||||
* ${JTREG} -DTestMode=DEFAULT -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java
|
||||
* 5. Run all tests (FULL mode):
|
||||
* ${JTREG} -DTestMode=FULL -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java
|
||||
*
|
||||
*/
|
||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.ElementType.PACKAGE;
|
||||
import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
|
||||
import static java.lang.annotation.ElementType.TYPE_USE;
|
||||
import static java.lang.annotation.ElementType.TYPE_PARAMETER;
|
||||
|
||||
public class TargetAnnoCombo {
|
||||
int errors = 0;
|
||||
|
||||
static final String TESTPKG = "testpkg";
|
||||
/*
|
||||
* Set it to true to get more debug information including base and
|
||||
* container target sets for a given test case number
|
||||
*/
|
||||
|
||||
// Set it to true to get more debug information including base and container
|
||||
// target sets for a given test case.
|
||||
static final boolean DEBUG = false;
|
||||
|
||||
// JDK 5/6/7/8 Targets
|
||||
static final String[] targetVals = {"ElementType.ANNOTATION_TYPE",
|
||||
"ElementType.CONSTRUCTOR", "ElementType.FIELD",
|
||||
"ElementType.LOCAL_VARIABLE", "ElementType.METHOD",
|
||||
"ElementType.TYPE", "ElementType.PARAMETER",
|
||||
"ElementType.PACKAGE", "ElementType.TYPE_USE",
|
||||
"ElementType.TYPE_PARAMETER"};
|
||||
// Define constant target sets to be used for the combination of the target values.
|
||||
final static Set<ElementType> noSet = null;
|
||||
final static Set<ElementType> empty = EnumSet.noneOf(ElementType.class);
|
||||
|
||||
// TYPE_USE and TYPE_PARAMETER (added in JDK8) are not part of default Target set
|
||||
static final int DEFAULT_TARGET_CNT = 8;
|
||||
// [TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE,
|
||||
// PACKAGE, TYPE_PARAMETER, TYPE_USE]
|
||||
final static Set<ElementType> allTargets = EnumSet.allOf(ElementType.class);
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
// [TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE,
|
||||
// PACKAGE]
|
||||
final static Set<ElementType> jdk7 = EnumSet.range(TYPE, PACKAGE);
|
||||
|
||||
/* maxTestNum = (base and container combinations of targetVals elems [0 - 1048575 combos])
|
||||
* + (combinations where base or container has no Target [1024 combos])
|
||||
* + (no -1 even though 1st test is number 0 as last test is where both
|
||||
* base and container have no target)
|
||||
*/
|
||||
// [TYPE_USE, TYPE_PARAMETER]
|
||||
final static Set<ElementType> jdk8 = EnumSet.range(TYPE_PARAMETER, TYPE_USE);
|
||||
|
||||
int maxTestNum = (int)Math.pow(2, 2*targetVals.length) + 2*(int)Math.pow(2, targetVals.length);
|
||||
TestCaseGenerator tcg = new TestCaseGenerator(maxTestNum);
|
||||
TargetAnnoCombo tac = new TargetAnnoCombo();
|
||||
// List of test cases to run. This list is created in generate().
|
||||
// To run a specific test cases add case number in @run main line.
|
||||
List<TestCase> testCases = new ArrayList<TestCase>();
|
||||
|
||||
int testCtr = 0;
|
||||
int testCase = -1;
|
||||
while ( (testCase=tcg.getNextTestCase()) != -1 ) {
|
||||
tac.executeTestCase(testCase, maxTestNum);
|
||||
testCtr++;
|
||||
int errors = 0;
|
||||
|
||||
// Identify test cases that fail.
|
||||
enum IgnoreKind {
|
||||
RUN,
|
||||
IGNORE
|
||||
};
|
||||
|
||||
private class TestCase {
|
||||
|
||||
private Set<ElementType> baseAnnotations;
|
||||
private Set<ElementType> containerAnnotations;
|
||||
private IgnoreKind ignore;
|
||||
|
||||
public TestCase(Set<ElementType> baseAnnotations, Set<ElementType> containerAnnotations) {
|
||||
this(baseAnnotations, containerAnnotations, IgnoreKind.RUN);
|
||||
}
|
||||
|
||||
System.out.println("Total tests run: " + testCtr);
|
||||
if (tac.errors > 0)
|
||||
throw new Exception(tac.errors + " errors found");
|
||||
public TestCase(Set<ElementType> baseAnnotations, Set<ElementType> containerAnnotations,
|
||||
IgnoreKind ignoreKind) {
|
||||
this.baseAnnotations = baseAnnotations;
|
||||
this.containerAnnotations = containerAnnotations;
|
||||
this.ignore = ignoreKind;
|
||||
}
|
||||
|
||||
public Set getBaseAnnotations() {
|
||||
return baseAnnotations;
|
||||
}
|
||||
|
||||
public Set getContainerAnnotations() {
|
||||
return containerAnnotations;
|
||||
}
|
||||
|
||||
public boolean isIgnored() {
|
||||
return ignore == IgnoreKind.IGNORE;
|
||||
}
|
||||
|
||||
// Determine if a testCase should compile or not.
|
||||
private boolean isValidSubSet() {
|
||||
/*
|
||||
* RULE 1: conAnnoTarget should be a subset of baseAnnoTarget
|
||||
* RULE 2: For empty @Target ({}) - annotation cannot be applied anywhere
|
||||
* - Empty sets for both is valid
|
||||
* - Empty baseTarget set is invalid with non-empty conTarget set
|
||||
* - Non-empty baseTarget set is valid with empty conTarget set
|
||||
* RULE 3: For no @Target specified - annotation can be applied to any JDK 7 targets
|
||||
* - No @Target for both is valid
|
||||
* - No @Target for baseTarget set with @Target conTarget set is valid
|
||||
* - @Target for baseTarget set with no @Target for conTarget is invalid
|
||||
*/
|
||||
|
||||
|
||||
/* If baseAnno has no @Target, Foo can be either applied to @Target specified
|
||||
* for container annotation else will be applicable for all default targets
|
||||
* if no @Target is present for container annotation.
|
||||
* In both cases, the set will be a valid set with no @Target for base annotation
|
||||
*/
|
||||
if (baseAnnotations == null) {
|
||||
if (containerAnnotations == null) {
|
||||
return true;
|
||||
}
|
||||
return !(containerAnnotations.contains(TYPE_USE) ||
|
||||
containerAnnotations.contains(TYPE_PARAMETER));
|
||||
}
|
||||
|
||||
Set<ElementType> tempBaseSet = EnumSet.noneOf(ElementType.class);
|
||||
tempBaseSet.addAll(baseAnnotations);
|
||||
// If BaseAnno has TYPE, then ANNOTATION_TYPE is allowed by default.
|
||||
if (baseAnnotations.contains(TYPE)) {
|
||||
tempBaseSet.add(ANNOTATION_TYPE);
|
||||
}
|
||||
|
||||
// If containerAnno has no @Target, only valid case if baseAnnoTarget has
|
||||
// all targets defined else invalid set.
|
||||
if (containerAnnotations == null) {
|
||||
return tempBaseSet.containsAll(jdk7);
|
||||
}
|
||||
|
||||
// At this point, neither conAnnoTarget or baseAnnoTarget are null.
|
||||
if (containerAnnotations.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// At this point, conAnnoTarget is non-empty.
|
||||
if (baseAnnotations.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// At this point, neither conAnnoTarget or baseAnnoTarget are empty.
|
||||
return tempBaseSet.containsAll(containerAnnotations);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* For given testCase, determine the base and container annotation Target sets,
|
||||
* get if testCase should compile, get test source file(s), get compilation result and verify.
|
||||
*
|
||||
*/
|
||||
private void executeTestCase(int testCase, int maxTestNum) {
|
||||
|
||||
// Determine base and container annotation Target sets for the testCase
|
||||
Set<String> baseAnnoTarget = null;
|
||||
Set<String> conAnnoTarget = null;
|
||||
|
||||
//Number of base and container combinations [0 - 1048575 combos]
|
||||
int baseContCombos = (int)Math.pow(2, 2*targetVals.length);
|
||||
//Number of either base or container combinations when one of them has no @Target [1024 combos]
|
||||
int targetValsCombos = (int)Math.pow(2, targetVals.length);
|
||||
|
||||
if (testCase >= baseContCombos) {
|
||||
//Base annotation do not have @Target
|
||||
if (testCase < baseContCombos + targetValsCombos) {
|
||||
baseAnnoTarget = null;
|
||||
conAnnoTarget = getSetFromBitVec(Integer.toBinaryString(testCase - baseContCombos));
|
||||
} else if (testCase < baseContCombos + 2*targetValsCombos) {
|
||||
//Container annotation do not have @Target
|
||||
baseAnnoTarget = getSetFromBitVec(Integer.toBinaryString(testCase - baseContCombos - targetValsCombos));
|
||||
conAnnoTarget = null;
|
||||
} else {
|
||||
//Both Base and Container annotation do not have @Target
|
||||
baseAnnoTarget = null;
|
||||
conAnnoTarget = null;
|
||||
}
|
||||
} else {
|
||||
//TestCase number is represented as 10-bits for base followed by container bits
|
||||
String bin = Integer.toBinaryString(testCase);
|
||||
String base="", cont=bin;
|
||||
if (bin.length() > targetVals.length){
|
||||
base = bin.substring(0, bin.length() - targetVals.length);
|
||||
cont = bin.substring(bin.length() - targetVals.length,bin.length());
|
||||
}
|
||||
baseAnnoTarget = getSetFromBitVec(base);
|
||||
conAnnoTarget = getSetFromBitVec(cont);
|
||||
public static void main(String args[]) throws Exception {
|
||||
TargetAnnoCombo tac = new TargetAnnoCombo();
|
||||
// Generates all test cases to be run.
|
||||
tac.generate();
|
||||
List<Integer> cases = new ArrayList<Integer>();
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
cases.add(Integer.parseInt(args[i]));
|
||||
}
|
||||
if (cases.isEmpty()) {
|
||||
tac.run();
|
||||
} else {
|
||||
for (int index : cases) {
|
||||
tac.executeTestCase(tac.testCases.get(index), index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
debugPrint("Test case number = " + testCase + " => binary = " + Integer.toBinaryString(testCase));
|
||||
debugPrint(" => baseAnnoTarget = " + baseAnnoTarget);
|
||||
debugPrint(" => containerAnnoTarget = " + conAnnoTarget);
|
||||
private void generate() {
|
||||
// Adding test cases to run.
|
||||
testCases.addAll(Arrays.asList(
|
||||
// No base target against no container target.
|
||||
new TestCase(noSet, noSet),
|
||||
// No base target against empty container target.
|
||||
new TestCase(noSet, empty),
|
||||
// No base target against TYPE_USE only container target.
|
||||
new TestCase(noSet, less(jdk8, TYPE_PARAMETER)),
|
||||
// No base target against TYPE_PARAMETER only container target.
|
||||
new TestCase(noSet, less(jdk8, TYPE_USE)),
|
||||
// No base target against TYPE_USE + TYPE_PARAMETER only container target.
|
||||
new TestCase(noSet, jdk8),
|
||||
// No base target against TYPE_USE + some selection of jdk7 targets.
|
||||
new TestCase(noSet,
|
||||
plus(EnumSet.range(TYPE, LOCAL_VARIABLE), TYPE_USE)),
|
||||
// No base target against TYPE_PARAMETER + some selection of jdk7 targets.
|
||||
new TestCase(noSet,
|
||||
plus(EnumSet.range(TYPE, LOCAL_VARIABLE), TYPE_PARAMETER)),
|
||||
// No base target against each jdk7 target alone as container target.
|
||||
new TestCase(noSet, plus(empty, TYPE)),
|
||||
new TestCase(noSet, plus(empty, PARAMETER)),
|
||||
new TestCase(noSet, plus(empty, PACKAGE)),
|
||||
new TestCase(noSet, plus(empty, METHOD)),
|
||||
new TestCase(noSet, plus(empty, LOCAL_VARIABLE)),
|
||||
new TestCase(noSet, plus(empty, FIELD)),
|
||||
new TestCase(noSet, plus(empty, CONSTRUCTOR)),
|
||||
new TestCase(noSet, plus(empty, ANNOTATION_TYPE)),
|
||||
// Empty base target against no container target.
|
||||
new TestCase(empty, noSet),
|
||||
// Empty base target against empty container target.
|
||||
new TestCase(empty, empty),
|
||||
// Empty base target against any lone container target.
|
||||
new TestCase(empty, plus(empty, TYPE)),
|
||||
new TestCase(empty, plus(empty, PARAMETER)),
|
||||
new TestCase(empty, plus(empty, PACKAGE)),
|
||||
new TestCase(empty, plus(empty, METHOD)),
|
||||
new TestCase(empty, plus(empty, LOCAL_VARIABLE)),
|
||||
new TestCase(empty, plus(empty, FIELD)),
|
||||
new TestCase(empty, plus(empty, CONSTRUCTOR)),
|
||||
new TestCase(empty, plus(empty, ANNOTATION_TYPE)),
|
||||
new TestCase(empty, less(jdk8, TYPE_USE)),
|
||||
new TestCase(empty, less(jdk8, TYPE_PARAMETER)),
|
||||
// No container target against all all-but one jdk7 targets.
|
||||
new TestCase(less(jdk7, TYPE), noSet),
|
||||
new TestCase(less(jdk7, PARAMETER), noSet),
|
||||
new TestCase(less(jdk7, PACKAGE), noSet),
|
||||
new TestCase(less(jdk7, METHOD), noSet),
|
||||
new TestCase(less(jdk7, LOCAL_VARIABLE), noSet),
|
||||
new TestCase(less(jdk7, FIELD), noSet),
|
||||
new TestCase(less(jdk7, CONSTRUCTOR), noSet),
|
||||
new TestCase(less(jdk7, ANNOTATION_TYPE), noSet),
|
||||
// No container against all but TYPE and ANNOTATION_TYPE
|
||||
new TestCase(less(jdk7, TYPE, ANNOTATION_TYPE), noSet),
|
||||
// No container against jdk7 targets.
|
||||
new TestCase(jdk7, noSet),
|
||||
// No container against jdk7 targets plus one or both of TYPE_USE, TYPE_PARAMETER
|
||||
new TestCase(plus(jdk7, TYPE_USE), noSet),
|
||||
new TestCase(plus(jdk7, TYPE_PARAMETER), noSet),
|
||||
new TestCase(allTargets, noSet),
|
||||
// Empty container target against any lone target.
|
||||
new TestCase(plus(empty, TYPE), empty),
|
||||
new TestCase(plus(empty, PARAMETER), empty),
|
||||
new TestCase(plus(empty, PACKAGE), empty),
|
||||
new TestCase(plus(empty, METHOD), empty),
|
||||
new TestCase(plus(empty, LOCAL_VARIABLE), empty),
|
||||
new TestCase(plus(empty, FIELD), empty),
|
||||
new TestCase(plus(empty, CONSTRUCTOR), empty),
|
||||
new TestCase(plus(empty, ANNOTATION_TYPE), empty),
|
||||
new TestCase(plus(empty, TYPE_USE), empty),
|
||||
new TestCase(plus(empty, TYPE_PARAMETER), empty),
|
||||
// All base targets against all container targets.
|
||||
new TestCase(allTargets, allTargets),
|
||||
// All base targets against all but one container targets.
|
||||
new TestCase(allTargets, less(allTargets, TYPE)),
|
||||
new TestCase(allTargets, less(allTargets, PARAMETER)),
|
||||
new TestCase(allTargets, less(allTargets, PACKAGE)),
|
||||
new TestCase(allTargets, less(allTargets, METHOD)),
|
||||
new TestCase(allTargets, less(allTargets, LOCAL_VARIABLE)),
|
||||
new TestCase(allTargets, less(allTargets, FIELD)),
|
||||
new TestCase(allTargets, less(allTargets, CONSTRUCTOR)),
|
||||
new TestCase(allTargets, less(allTargets, ANNOTATION_TYPE)),
|
||||
new TestCase(allTargets, less(allTargets, TYPE_USE)),
|
||||
new TestCase(allTargets, less(allTargets, TYPE_PARAMETER)),
|
||||
// All container targets against all but one base targets.
|
||||
new TestCase(less(allTargets, TYPE), allTargets),
|
||||
new TestCase(less(allTargets, PARAMETER), allTargets),
|
||||
new TestCase(less(allTargets, PACKAGE), allTargets),
|
||||
new TestCase(less(allTargets, METHOD), allTargets),
|
||||
new TestCase(less(allTargets, LOCAL_VARIABLE), allTargets),
|
||||
new TestCase(less(allTargets, FIELD), allTargets),
|
||||
new TestCase(less(allTargets, CONSTRUCTOR), allTargets),
|
||||
new TestCase(less(allTargets, ANNOTATION_TYPE), allTargets),
|
||||
new TestCase(less(allTargets, TYPE_USE), allTargets),
|
||||
new TestCase(less(allTargets, TYPE_PARAMETER), allTargets)));
|
||||
// Generates 100 test cases for any lone base target contained in Set
|
||||
// allTargets against any lone container target.
|
||||
for (ElementType b : allTargets) {
|
||||
for (ElementType c : allTargets) {
|
||||
testCases.add(new TestCase(plus(empty, b), plus(empty, c)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Determine if a testCase should compile or not
|
||||
String className = "TC" + testCase;
|
||||
boolean shouldCompile = isValidSubSet(baseAnnoTarget, conAnnoTarget);
|
||||
void run() throws Exception {
|
||||
int testCtr = 0;
|
||||
for (TestCase tc : testCases) {
|
||||
if (!tc.isIgnored()) {
|
||||
executeTestCase(tc, testCases.indexOf(tc));
|
||||
testCtr++;
|
||||
}
|
||||
}
|
||||
System.out.println("Total tests run: " + testCtr);
|
||||
if (errors > 0) {
|
||||
throw new Exception(errors + " errors found");
|
||||
}
|
||||
}
|
||||
|
||||
// Get test source file(s)
|
||||
Iterable<? extends JavaFileObject> files = getFileList(className, baseAnnoTarget,
|
||||
conAnnoTarget, shouldCompile);
|
||||
private void executeTestCase(TestCase testCase, int index) {
|
||||
debugPrint("Test case number = " + index);
|
||||
debugPrint(" => baseAnnoTarget = " + testCase.getBaseAnnotations());
|
||||
debugPrint(" => containerAnnoTarget = " + testCase.getContainerAnnotations());
|
||||
|
||||
// Get result of compiling test src file(s)
|
||||
String className = "TC" + index;
|
||||
boolean shouldCompile = testCase.isValidSubSet();
|
||||
Iterable<? extends JavaFileObject> files = getFileList(className, testCase, shouldCompile);
|
||||
// Get result of compiling test src file(s).
|
||||
boolean result = getCompileResult(className, shouldCompile, files);
|
||||
|
||||
// List test src code if test fails
|
||||
if(!result) {
|
||||
System.out.println("FAIL: Test " + testCase);
|
||||
// List test src code if test fails.
|
||||
if (!result) {
|
||||
System.out.println("FAIL: Test " + index);
|
||||
try {
|
||||
for (JavaFileObject f: files) {
|
||||
for (JavaFileObject f : files) {
|
||||
System.out.println("File: " + f.getName() + "\n" + f.getCharContent(true));
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
System.out.println("Exception: " + ioe);
|
||||
}
|
||||
} else {
|
||||
debugPrint("PASS: Test " + testCase);
|
||||
debugPrint("PASS: Test " + index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Get a Set<String> based on bits that are set to 1
|
||||
public Set<String> getSetFromBitVec(String bitVec) {
|
||||
Set<String> ret = new HashSet<>();
|
||||
char[] bit = bitVec.toCharArray();
|
||||
for (int i=bit.length-1, j=0; i>=0; i--, j++){
|
||||
if (bit[i] == '1') {
|
||||
ret.add(targetVals[j]);
|
||||
// Create src code and corresponding JavaFileObjects.
|
||||
private Iterable<? extends JavaFileObject> getFileList(String className,
|
||||
TestCase testCase, boolean shouldCompile) {
|
||||
Set<ElementType> baseAnnoTarget = testCase.getBaseAnnotations();
|
||||
Set<ElementType> conAnnoTarget = testCase.getContainerAnnotations();
|
||||
String srcContent = "";
|
||||
String pkgInfoContent = "";
|
||||
String template = Helper.template;
|
||||
String baseTarget = "", conTarget = "";
|
||||
|
||||
String target = Helper.ContentVars.TARGET.getVal();
|
||||
if (baseAnnoTarget != null) {
|
||||
String tmp = target.replace("#VAL", convertToString(baseAnnoTarget).toString());
|
||||
baseTarget = tmp.replace("[", "{").replace("]", "}");
|
||||
}
|
||||
if (conAnnoTarget != null) {
|
||||
String tmp = target.replace("#VAL", convertToString(conAnnoTarget).toString());
|
||||
conTarget = tmp.replace("[", "{").replace("]", "}");
|
||||
}
|
||||
|
||||
String annoData = Helper.ContentVars.IMPORTSTMTS.getVal()
|
||||
+ conTarget
|
||||
+ Helper.ContentVars.CONTAINER.getVal()
|
||||
+ baseTarget
|
||||
+ Helper.ContentVars.REPEATABLE.getVal()
|
||||
+ Helper.ContentVars.BASE.getVal();
|
||||
|
||||
JavaFileObject pkgInfoFile = null;
|
||||
|
||||
// If shouldCompile = true and no @Target is specified for container annotation,
|
||||
// then all 8 ElementType enum constants are applicable as targets for
|
||||
// container annotation.
|
||||
if (shouldCompile && conAnnoTarget == null) {
|
||||
Set<ElementType> copySet = EnumSet.noneOf(ElementType.class);
|
||||
copySet.addAll(jdk7);
|
||||
conAnnoTarget = copySet;
|
||||
}
|
||||
|
||||
if (shouldCompile) {
|
||||
boolean isPkgCasePresent = conAnnoTarget.contains(PACKAGE);
|
||||
String repeatableAnno = Helper.ContentVars.BASEANNO.getVal()
|
||||
+ " " + Helper.ContentVars.BASEANNO.getVal();
|
||||
for (ElementType s : conAnnoTarget) {
|
||||
String replaceStr = "/*" + s.name() + "*/";
|
||||
if (s.name().equalsIgnoreCase("PACKAGE")) {
|
||||
//Create packageInfo file.
|
||||
String pkgInfoName = TESTPKG + "." + "package-info";
|
||||
pkgInfoContent = repeatableAnno + "\npackage " + TESTPKG + ";" + annoData;
|
||||
pkgInfoFile = Helper.getFile(pkgInfoName, pkgInfoContent);
|
||||
} else {
|
||||
template = template.replace(replaceStr, repeatableAnno);
|
||||
if (!isPkgCasePresent) {
|
||||
srcContent = template.replace(
|
||||
"/*ANNODATA*/", annoData).replace("#ClassName", className);
|
||||
} else {
|
||||
replaceStr = "/*PACKAGE*/";
|
||||
String tmp = template.replace(replaceStr, "package " + TESTPKG + ";");
|
||||
srcContent = tmp.replace("#ClassName", className);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// For invalid cases, compilation should fail at declaration site.
|
||||
template = "class #ClassName {}";
|
||||
srcContent = annoData + template.replace("#ClassName", className);
|
||||
}
|
||||
return ret;
|
||||
JavaFileObject srcFile = Helper.getFile(className, srcContent);
|
||||
Iterable<? extends JavaFileObject> files = null;
|
||||
if (pkgInfoFile != null) {
|
||||
files = Arrays.asList(pkgInfoFile, srcFile);
|
||||
} else {
|
||||
files = Arrays.asList(srcFile);
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
// Compile the test source file(s) and return test result
|
||||
// Compile the test source file(s) and return test result.
|
||||
private boolean getCompileResult(String className, boolean shouldCompile,
|
||||
Iterable<? extends JavaFileObject> files) {
|
||||
|
||||
DiagnosticCollector<JavaFileObject> diagnostics =
|
||||
new DiagnosticCollector<JavaFileObject>();
|
||||
Helper.compileCode(diagnostics, files);
|
||||
|
||||
// Test case pass or fail
|
||||
// Test case pass or fail.
|
||||
boolean ok = false;
|
||||
|
||||
String errMesg = "";
|
||||
int numDiags = diagnostics.getDiagnostics().size();
|
||||
|
||||
if (numDiags == 0) {
|
||||
if (shouldCompile) {
|
||||
debugPrint("Test passed, compiled as expected.");
|
||||
@ -270,201 +429,80 @@ public class TargetAnnoCombo {
|
||||
}
|
||||
} else {
|
||||
if (shouldCompile) {
|
||||
// did not compile
|
||||
// did not compile.
|
||||
errMesg = "Test failed, did not compile.";
|
||||
ok = false;
|
||||
} else {
|
||||
// Error in compilation as expected
|
||||
String expectedErrKey = "compiler.err.invalid.repeatable." +
|
||||
"annotation.incompatible.target";
|
||||
// Error in compilation as expected.
|
||||
String expectedErrKey = "compiler.err.invalid.repeatable."
|
||||
+ "annotation.incompatible.target";
|
||||
for (Diagnostic<?> d : diagnostics.getDiagnostics()) {
|
||||
if((d.getKind() == Diagnostic.Kind.ERROR) &&
|
||||
d.getCode().contains(expectedErrKey)) {
|
||||
// Error message as expected
|
||||
if ((d.getKind() == Diagnostic.Kind.ERROR)
|
||||
&& d.getCode().contains(expectedErrKey)) {
|
||||
// Error message as expected.
|
||||
debugPrint("Error message as expected.");
|
||||
ok = true;
|
||||
break;
|
||||
} else {
|
||||
// error message is incorrect
|
||||
// error message is incorrect.
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if (!ok) {
|
||||
errMesg = "Incorrect error received when compiling " +
|
||||
className + ", expected: " + expectedErrKey;
|
||||
errMesg = "Incorrect error received when compiling "
|
||||
+ className + ", expected: " + expectedErrKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!ok) {
|
||||
if (!ok) {
|
||||
error(errMesg);
|
||||
for (Diagnostic<?> d : diagnostics.getDiagnostics())
|
||||
for (Diagnostic<?> d : diagnostics.getDiagnostics()) {
|
||||
System.out.println(" Diags: " + d);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
private Set<ElementType> less(Set<ElementType> base, ElementType... sub) {
|
||||
Set<ElementType> res = EnumSet.noneOf(ElementType.class);
|
||||
res.addAll(base);
|
||||
for (ElementType t : sub) {
|
||||
res.remove(t);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private Set<ElementType> plus(Set<ElementType> base, ElementType... add) {
|
||||
Set<ElementType> res = EnumSet.noneOf(ElementType.class);
|
||||
res.addAll(base);
|
||||
for (ElementType t : add) {
|
||||
res.add(t);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
// Iterate target set and add "ElementType." in front of every target type.
|
||||
private List<String> convertToString(Set<ElementType> annoTarget) {
|
||||
if (annoTarget == null) {
|
||||
return null;
|
||||
}
|
||||
List<String> annoTargets = new ArrayList<String>();
|
||||
for (ElementType e : annoTarget) {
|
||||
annoTargets.add("ElementType." + e.name());
|
||||
}
|
||||
return annoTargets;
|
||||
}
|
||||
|
||||
private void debugPrint(String string) {
|
||||
if(DEBUG)
|
||||
if (DEBUG) {
|
||||
System.out.println(string);
|
||||
}
|
||||
}
|
||||
|
||||
// Create src code and corresponding JavaFileObjects
|
||||
private Iterable<? extends JavaFileObject> getFileList(String className,
|
||||
Set<String> baseAnnoTarget, Set<String> conAnnoTarget,
|
||||
boolean shouldCompile) {
|
||||
|
||||
String srcContent = "";
|
||||
String pkgInfoContent = "";
|
||||
String template = Helper.template;
|
||||
String baseTarget = "", conTarget = "";
|
||||
|
||||
String target = Helper.ContentVars.TARGET.getVal();
|
||||
if(baseAnnoTarget != null) {
|
||||
baseTarget = target.replace("#VAL", baseAnnoTarget.toString())
|
||||
.replace("[", "{").replace("]", "}");
|
||||
}
|
||||
if(conAnnoTarget != null) {
|
||||
conTarget = target.replace("#VAL", conAnnoTarget.toString())
|
||||
.replace("[", "{").replace("]", "}");
|
||||
}
|
||||
|
||||
String annoData = Helper.ContentVars.IMPORTSTMTS.getVal() +
|
||||
conTarget +
|
||||
Helper.ContentVars.CONTAINER.getVal() +
|
||||
baseTarget +
|
||||
Helper.ContentVars.REPEATABLE.getVal() +
|
||||
Helper.ContentVars.BASE.getVal();
|
||||
|
||||
JavaFileObject pkgInfoFile = null;
|
||||
|
||||
/*
|
||||
* If shouldCompile = true and no @Target is specified for container annotation,
|
||||
* then all 8 ElementType enum constants are applicable as targets for
|
||||
* container annotation.
|
||||
*/
|
||||
if(shouldCompile && conAnnoTarget == null) {
|
||||
//conAnnoTarget = new HashSet<String>(Arrays.asList(targetVals));
|
||||
conAnnoTarget = getDefaultTargetSet();
|
||||
}
|
||||
|
||||
if(shouldCompile) {
|
||||
boolean isPkgCasePresent = new ArrayList<String>(conAnnoTarget).contains("ElementType.PACKAGE");
|
||||
String repeatableAnno = Helper.ContentVars.BASEANNO.getVal() + " " + Helper.ContentVars.BASEANNO.getVal();
|
||||
for(String s: conAnnoTarget) {
|
||||
s = s.replace("ElementType.","");
|
||||
String replaceStr = "/*"+s+"*/";
|
||||
if(s.equalsIgnoreCase("PACKAGE")) {
|
||||
//Create packageInfo file
|
||||
String pkgInfoName = TESTPKG + "." + "package-info";
|
||||
pkgInfoContent = repeatableAnno + "\npackage " + TESTPKG + ";" + annoData;
|
||||
pkgInfoFile = Helper.getFile(pkgInfoName, pkgInfoContent);
|
||||
} else {
|
||||
template = template.replace(replaceStr, repeatableAnno);
|
||||
//srcContent = template.replace("#ClassName",className);
|
||||
if(!isPkgCasePresent) {
|
||||
srcContent = template.replace("/*ANNODATA*/", annoData).replace("#ClassName",className);
|
||||
} else {
|
||||
replaceStr = "/*PACKAGE*/";
|
||||
srcContent = template.replace(replaceStr, "package " + TESTPKG + ";")
|
||||
.replace("#ClassName", className);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// For invalid cases, compilation should fail at declaration site
|
||||
template = "class #ClassName {}";
|
||||
srcContent = annoData + template.replace("#ClassName",className);
|
||||
}
|
||||
JavaFileObject srcFile = Helper.getFile(className, srcContent);
|
||||
Iterable<? extends JavaFileObject> files = null;
|
||||
if(pkgInfoFile != null)
|
||||
files = Arrays.asList(pkgInfoFile,srcFile);
|
||||
else
|
||||
files = Arrays.asList(srcFile);
|
||||
return files;
|
||||
}
|
||||
|
||||
private Set<String> getDefaultTargetSet() {
|
||||
Set<String> defaultSet = new HashSet<>();
|
||||
int ctr = 0;
|
||||
for(String s : targetVals) {
|
||||
if(ctr++ < DEFAULT_TARGET_CNT) {
|
||||
defaultSet.add(s);
|
||||
}
|
||||
}
|
||||
return defaultSet;
|
||||
}
|
||||
|
||||
private boolean isValidSubSet(Set<String> baseAnnoTarget, Set<String> conAnnoTarget) {
|
||||
/*
|
||||
* RULE 1: conAnnoTarget should be a subset of baseAnnoTarget
|
||||
* RULE 2: For empty @Target ({}) - annotation cannot be applied anywhere
|
||||
* - Empty sets for both is valid
|
||||
* - Empty baseTarget set is invalid with non-empty conTarget set
|
||||
* - Non-empty baseTarget set is valid with empty conTarget set
|
||||
* RULE 3: For no @Target specified - annotation can be applied to any JDK 7 targets
|
||||
* - No @Target for both is valid
|
||||
* - No @Target for baseTarget set with @Target conTarget set is valid
|
||||
* - @Target for baseTarget set with no @Target for conTarget is invalid
|
||||
*/
|
||||
|
||||
|
||||
/* If baseAnno has no @Target, Foo can be either applied to @Target specified for container annotation
|
||||
* else will be applicable for all default targets if no @Target is present for container annotation.
|
||||
* In both cases, the set will be a valid set with no @Target for base annotation
|
||||
*/
|
||||
if(baseAnnoTarget == null) {
|
||||
if(conAnnoTarget == null) return true;
|
||||
return !(conAnnoTarget.contains("ElementType.TYPE_USE") || conAnnoTarget.contains("ElementType.TYPE_PARAMETER"));
|
||||
}
|
||||
|
||||
Set<String> tempBaseSet = new HashSet<>(baseAnnoTarget);
|
||||
// If BaseAnno has TYPE, then ANNOTATION_TYPE is allowed by default
|
||||
if(baseAnnoTarget.contains("ElementType.TYPE")) {
|
||||
tempBaseSet.add("ElementType.ANNOTATION_TYPE");
|
||||
}
|
||||
|
||||
/*
|
||||
* If containerAnno has no @Target, only valid case if baseAnnoTarget has all targets defined
|
||||
* else invalid set
|
||||
*/
|
||||
if(conAnnoTarget == null) {
|
||||
return (tempBaseSet.containsAll(getDefaultTargetSet()));
|
||||
}
|
||||
|
||||
// At this point, neither conAnnoTarget or baseAnnoTarget are null
|
||||
if(conAnnoTarget.size() == 0) return true;
|
||||
|
||||
// At this point, conAnnoTarget is non-empty
|
||||
if (baseAnnoTarget.size() == 0) return false;
|
||||
|
||||
// At this point, neither conAnnoTarget or baseAnnoTarget are empty
|
||||
return tempBaseSet.containsAll(conAnnoTarget);
|
||||
}
|
||||
|
||||
void error(String msg) {
|
||||
private void error(String msg) {
|
||||
System.out.println("ERROR: " + msg);
|
||||
errors++;
|
||||
}
|
||||
|
||||
// Lists the start and end range for the given set of target vals
|
||||
void showGroups() {
|
||||
//Group 1: All target set combinations ( 0 to 1048575 ) including empty @Target sets => @Target({})
|
||||
int grpEnd1 = (int)Math.pow(2, 2*targetVals.length) - 1;
|
||||
System.out.println("[Group 1]: 0 - " + grpEnd1);
|
||||
|
||||
//Group 2: @Target not defined for base annotation ( 1048576 - 1049599 ).
|
||||
System.out.print("[Group 2]: " + (grpEnd1 + 1) + " - ");
|
||||
int grpEnd2 = grpEnd1 + 1 + (int)Math.pow(2, targetVals.length) - 1;
|
||||
System.out.println(grpEnd2);
|
||||
|
||||
//Group 3: @Target not defined for container annotation ( 1049600 - 1050623 ).
|
||||
System.out.print("[Group 3]: " + (grpEnd2 + 1) + " - ");
|
||||
int grpEnd3 = grpEnd2 + 1 + (int)Math.pow(2, targetVals.length) - 1;
|
||||
System.out.println(grpEnd3);
|
||||
|
||||
//Group 4: @Target not defined for both base and container annotations ( 1050624 ).
|
||||
System.out.println("[Group 4]: " + (grpEnd3 + 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,191 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/* System properties:
|
||||
* NumberOfTests, TestMode, and TestCaseNum are mutually exclusive
|
||||
* TestSeed will be used only with NumberOfTests or TestMode, otherwise it will be ignored
|
||||
* -DNumberOfTests=[0 to 2^20+2^11+1]
|
||||
* -DTestMode=[FULL|DEFAULT]
|
||||
* -DTestSeed=[seedNumber]
|
||||
* -DTestCaseNum=[0 to 2^20+2^11+1]
|
||||
*/
|
||||
public class TestCaseGenerator {
|
||||
// Total number of tests to be run
|
||||
int numberOfTests = -1;
|
||||
//Single test case
|
||||
int testCaseNum = -1;
|
||||
//Seed used to generate test cases
|
||||
int testSeed;
|
||||
|
||||
int maxTestNum;
|
||||
Random randNum;
|
||||
|
||||
// used in getNextTestCase
|
||||
int curTestNum;
|
||||
int testCompletedCount;
|
||||
HashSet<Integer> uniqueTestSet;
|
||||
|
||||
static final int DEFAULT_TEST_COUNT = 250;
|
||||
|
||||
/*
|
||||
* Get parameter values from command line to set numberOfTests, testCaseNum,
|
||||
* and testSeed
|
||||
*/
|
||||
public TestCaseGenerator(int maxTestNum) {
|
||||
this.maxTestNum = maxTestNum;
|
||||
|
||||
// Set values for variables based on input from command line
|
||||
|
||||
// TestMode system property
|
||||
String testModeVal = System.getProperty("TestMode");
|
||||
if(testModeVal != null && !testModeVal.isEmpty()) {
|
||||
switch (testModeVal.toUpperCase()) {
|
||||
case "FULL":
|
||||
numberOfTests = maxTestNum;
|
||||
break;
|
||||
case "DEFAULT":
|
||||
numberOfTests = DEFAULT_TEST_COUNT;
|
||||
break;
|
||||
default:
|
||||
System.out.println("Invalid property value " + testModeVal +
|
||||
" for numberOfTests. Possible range: 0 to " +
|
||||
maxTestNum + ". Ignoring property");
|
||||
numberOfTests = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// NumberOfTests system property
|
||||
String numTestsStr = System.getProperty("NumberOfTests");
|
||||
if(numTestsStr != null && !numTestsStr.isEmpty()) {
|
||||
int numTests = -1;
|
||||
try {
|
||||
numTests = Integer.parseInt(numTestsStr);
|
||||
if (numTests < 0 || numTests > maxTestNum) {
|
||||
throw new NumberFormatException();
|
||||
}
|
||||
} catch(NumberFormatException nfe) {
|
||||
System.out.println("Invalid NumberOfTests property value " +
|
||||
numTestsStr + ". Possible range: 0 to " + maxTestNum +
|
||||
"Reset to default: " + DEFAULT_TEST_COUNT);
|
||||
numTests = DEFAULT_TEST_COUNT;
|
||||
}
|
||||
|
||||
if (numberOfTests != -1 && numTests != -1) {
|
||||
System.out.println("TestMode and NumberOfTests cannot be set together. Ignoring TestMode.");
|
||||
}
|
||||
numberOfTests = numTests;
|
||||
}
|
||||
|
||||
// TestSeed system property
|
||||
String seedVal = System.getProperty("TestSeed");
|
||||
if(seedVal != null && !seedVal.isEmpty()) {
|
||||
try {
|
||||
testSeed = Integer.parseInt(seedVal);
|
||||
} catch(NumberFormatException nfe) {
|
||||
Random srand = new Random();
|
||||
testSeed = srand.nextInt();
|
||||
}
|
||||
} else {
|
||||
Random srand = new Random();
|
||||
testSeed = srand.nextInt();
|
||||
}
|
||||
|
||||
// TestCaseNum system property
|
||||
String testNumStr = System.getProperty("TestCaseNum");
|
||||
if(testNumStr != null && !testNumStr.isEmpty()) {
|
||||
try {
|
||||
testCaseNum = Integer.parseInt(testNumStr);
|
||||
if (testCaseNum < 0 || testCaseNum > maxTestNum) {
|
||||
throw new NumberFormatException();
|
||||
}
|
||||
} catch(NumberFormatException nfe) {
|
||||
System.out.println("Invalid TestCaseNumber property value " +
|
||||
testNumStr + ". Possible value in range: 0 to " +
|
||||
maxTestNum + ". Defaulting to last test case.");
|
||||
testCaseNum = maxTestNum;
|
||||
}
|
||||
|
||||
if ( numberOfTests != -1) {
|
||||
System.out.println("TestMode or NumberOfTests cannot be set along with TestCaseNum. Ignoring TestCaseNumber.");
|
||||
testCaseNum = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (numberOfTests == -1 && testCaseNum == -1) {
|
||||
numberOfTests = DEFAULT_TEST_COUNT;
|
||||
System.out.println("Setting TestMode to default, will run " + numberOfTests + "tests.");
|
||||
}
|
||||
|
||||
/*
|
||||
* By this point in code, we will have:
|
||||
* - testSeed: as per TestSeed or a Random one
|
||||
* - numberOfTests to run or -1 to denote not set
|
||||
* - testCaseNum to run or -1 to denote not set
|
||||
*/
|
||||
|
||||
/*
|
||||
* If numberOfTests = maxTestNum, all tests are to be run,
|
||||
* so no randNum will be required
|
||||
*/
|
||||
if (numberOfTests != -1 && numberOfTests < maxTestNum) {
|
||||
System.out.println("Seed = " + testSeed);
|
||||
randNum = new Random(testSeed);
|
||||
uniqueTestSet = new HashSet<>();
|
||||
}
|
||||
|
||||
testCompletedCount = 0;
|
||||
// to be used to keep sequential count when running all tests
|
||||
curTestNum = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* returns next test case number to run
|
||||
* returns -1 when there are no more tests to run
|
||||
*/
|
||||
public int getNextTestCase() {
|
||||
if (testCaseNum != -1) {
|
||||
int nextTC = testCaseNum;
|
||||
testCaseNum = -1;
|
||||
return nextTC;
|
||||
}
|
||||
if (++testCompletedCount <= numberOfTests) {
|
||||
if (numberOfTests == maxTestNum) {
|
||||
//all the tests need to be run, so just return
|
||||
//next test case sequentially
|
||||
return curTestNum++;
|
||||
} else {
|
||||
int nextTC = -1;
|
||||
// Ensuring unique test are run
|
||||
while(!uniqueTestSet.add(nextTC = randNum.nextInt(maxTestNum))) {
|
||||
}
|
||||
return nextTC;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
@ -179,7 +179,6 @@ class MyScanner extends Scanner {
|
||||
|
||||
@Override
|
||||
public Scanner newScanner(CharSequence input, boolean keepDocComments) {
|
||||
assert !keepDocComments;
|
||||
if (input instanceof CharBuffer) {
|
||||
return new MyScanner(this, (CharBuffer)input, test);
|
||||
} else {
|
||||
@ -190,7 +189,6 @@ class MyScanner extends Scanner {
|
||||
|
||||
@Override
|
||||
public Scanner newScanner(char[] input, int inputLength, boolean keepDocComments) {
|
||||
assert !keepDocComments;
|
||||
return new MyScanner(this, input, inputLength, test);
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ class MessageFile {
|
||||
}
|
||||
|
||||
void insertAfter(Line l) {
|
||||
assert prev == null && next == null;
|
||||
assert l.prev == null && l.next == null;
|
||||
l.prev = this;
|
||||
l.next = next;
|
||||
if (next == null)
|
||||
@ -82,7 +82,7 @@ class MessageFile {
|
||||
}
|
||||
|
||||
void insertBefore(Line l) {
|
||||
assert prev == null && next == null;
|
||||
assert l.prev == null && l.next == null;
|
||||
l.prev = prev;
|
||||
l.next = this;
|
||||
if (prev == null)
|
||||
|
@ -409,5 +409,3 @@ public class MessageInfo {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
38
langtools/test/tools/javac/lambda/DoubleStaticImport.java
Normal file
38
langtools/test/tools/javac/lambda/DoubleStaticImport.java
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8009820
|
||||
* @summary AssertionError when compiling java code with two identical static imports
|
||||
* @compile DoubleStaticImport.java
|
||||
*/
|
||||
|
||||
import static java.lang.Thread.holdsLock;
|
||||
import static java.lang.Thread.holdsLock; //dup
|
||||
|
||||
class DoubleStaticImport {
|
||||
public void test() {
|
||||
holdsLock(null);
|
||||
}
|
||||
}
|
41
langtools/test/tools/javac/lambda/Intersection02.java
Normal file
41
langtools/test/tools/javac/lambda/Intersection02.java
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8010101
|
||||
* @summary Intersection type cast issues redundant unchecked warning
|
||||
* @compile/fail/ref=Intersection02.out -Werror -Xlint:unchecked -XDrawDiagnostics Intersection02.java
|
||||
*/
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
class Intersection02 {
|
||||
|
||||
interface P<X> { }
|
||||
|
||||
void test(List<String> ls) {
|
||||
Object o1 = (List<String> & Serializable)ls;
|
||||
Object o2 = (List<String> & Serializable & P<String>)ls;
|
||||
}
|
||||
}
|
4
langtools/test/tools/javac/lambda/Intersection02.out
Normal file
4
langtools/test/tools/javac/lambda/Intersection02.out
Normal file
@ -0,0 +1,4 @@
|
||||
Intersection02.java:39:62: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), java.util.List<java.lang.String>, java.lang.Object&java.util.List<java.lang.String>&java.io.Serializable&Intersection02.P<java.lang.String>
|
||||
- compiler.err.warnings.and.werror
|
||||
1 error
|
||||
1 warning
|
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 8010010
|
||||
@summary NPE generating serializedLambdaName for nested lambda
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class LambdaLambdaSerialized {
|
||||
|
||||
static int assertionCount = 0;
|
||||
|
||||
static void assertTrue(boolean cond) {
|
||||
assertionCount++;
|
||||
if (!cond)
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
// Write lambdas out
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ObjectOutput out = new ObjectOutputStream(baos);
|
||||
LSI<LSI<Map>> ssi = () -> (() -> new HashMap());
|
||||
write(out, ssi );
|
||||
out.flush();
|
||||
out.close();
|
||||
|
||||
// Read them back
|
||||
ByteArrayInputStream bais =
|
||||
new ByteArrayInputStream(baos.toByteArray());
|
||||
ObjectInputStream in = new ObjectInputStream(bais);
|
||||
readAssert(in, "[X]");
|
||||
in.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
static void write(ObjectOutput out, LSI<LSI<Map>> lamb) throws IOException {
|
||||
out.writeObject(lamb);
|
||||
}
|
||||
|
||||
static void readAssert(ObjectInputStream in, String expected) throws IOException, ClassNotFoundException {
|
||||
LSI<LSI<Map>> ls = (LSI<LSI<Map>>) in.readObject();
|
||||
Map result = ls.get().get();
|
||||
System.out.printf("Result: %s\n", result);
|
||||
}
|
||||
}
|
||||
|
||||
interface LSI<T> extends Serializable {
|
||||
T get();
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
TargetType28.java:20:32: compiler.err.prob.found.req: (compiler.misc.incompatible.eq.upper.bounds: X, java.lang.String,R, java.lang.Object,java.lang.Number)
|
||||
TargetType28.java:20:32: compiler.err.prob.found.req: (compiler.misc.incompatible.eq.upper.bounds: X, R,java.lang.String, java.lang.Object,java.lang.Number)
|
||||
1 error
|
||||
|
50
langtools/test/tools/javac/lambda/TargetType67.java
Normal file
50
langtools/test/tools/javac/lambda/TargetType67.java
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8010303
|
||||
* @summary Graph inference: missing incorporation step causes spurious inference error
|
||||
* @compile TargetType67.java
|
||||
*/
|
||||
class TargetType67 {
|
||||
|
||||
interface Func<A, B> {
|
||||
B f(A a);
|
||||
}
|
||||
|
||||
class List<X> {
|
||||
|
||||
<M> List<M> map(Func<X, M> f) {
|
||||
return null;
|
||||
}
|
||||
|
||||
<A> List<A> apply(final List<Func<X, A>> lf) {
|
||||
return null;
|
||||
}
|
||||
|
||||
<B, C> List<C> bind(final List<B> lb, final Func<X, Func<B, C>> f) {
|
||||
return lb.apply(map(f));
|
||||
}
|
||||
}
|
||||
}
|
63
langtools/test/tools/javac/lambda/TargetType68.java
Normal file
63
langtools/test/tools/javac/lambda/TargetType68.java
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8010303
|
||||
* @summary Graph inference: missing incorporation step causes spurious inference error
|
||||
* @compile TargetType68.java
|
||||
*/
|
||||
import java.util.*;
|
||||
|
||||
class TargetType68 {
|
||||
|
||||
//derived from FX 2.2 API
|
||||
static class XYChart<X,Y> {
|
||||
static final class Series<X,Y> {
|
||||
Series(java.lang.String name, ObservableList<XYChart.Data<X,Y>> data) { }
|
||||
}
|
||||
|
||||
static final class Data<X,Y> { }
|
||||
|
||||
ObservableList<XYChart.Series<X,Y>> getData() { return null; }
|
||||
}
|
||||
|
||||
//derived from FX 2.2 API
|
||||
interface ObservableList<X> extends List<X> {
|
||||
boolean setAll(Collection<? extends X> col);
|
||||
}
|
||||
|
||||
//derived from FX 2.2 API
|
||||
static class FXCollections {
|
||||
static <E> ObservableList<E> observableList(List<E> l) { return null; }
|
||||
}
|
||||
|
||||
private void testMethod() {
|
||||
XYChart<Number, Number> numberChart = null;
|
||||
List<XYChart.Data<Number, Number>> data_1 = new ArrayList<>();
|
||||
List<XYChart.Data<Number, Number>> data_2 = new ArrayList<>();
|
||||
numberChart.getData().setAll(
|
||||
Arrays.asList(new XYChart.Series<>("Data", FXCollections.observableList(data_1)),
|
||||
new XYChart.Series<>("Data", FXCollections.observableList(data_2))));
|
||||
}
|
||||
}
|
51
langtools/test/tools/javac/lambda/TargetType69.java
Normal file
51
langtools/test/tools/javac/lambda/TargetType69.java
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8010303
|
||||
* @summary Graph inference: missing incorporation step causes spurious inference error
|
||||
* @compile TargetType68.java
|
||||
*/
|
||||
import java.util.*;
|
||||
|
||||
class TargetType68 {
|
||||
|
||||
interface Function<X,Y> {
|
||||
Y m(X x);
|
||||
}
|
||||
|
||||
abstract class TabulationAssertion<T, U> { }
|
||||
|
||||
class GroupedMapAssertion<K, M1 extends Map<K, ?>> extends TabulationAssertion<Integer, M1> {
|
||||
GroupedMapAssertion(Function<Integer, K> classifier) { }
|
||||
}
|
||||
|
||||
|
||||
<T, M2 extends Map> void exerciseMapTabulation(Function<T, ? extends M2> collector,
|
||||
TabulationAssertion<T, M2> assertion) { }
|
||||
|
||||
void test(Function<Integer, Integer> classifier, Function<Integer, Map<Integer, List<Integer>>> coll) {
|
||||
exerciseMapTabulation(coll, new GroupedMapAssertion<>(classifier));
|
||||
}
|
||||
}
|
@ -0,0 +1,365 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8009649
|
||||
* @summary Lambda back-end should generate invokespecial for method handles referring to private instance methods
|
||||
* @library ../../lib
|
||||
* @build JavacTestingAbstractThreadedTest
|
||||
* @run main/othervm TestLambdaBytecode
|
||||
*/
|
||||
|
||||
// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
|
||||
// see JDK-8006746
|
||||
|
||||
import com.sun.tools.classfile.Attribute;
|
||||
import com.sun.tools.classfile.BootstrapMethods_attribute;
|
||||
import com.sun.tools.classfile.ClassFile;
|
||||
import com.sun.tools.classfile.Code_attribute;
|
||||
import com.sun.tools.classfile.ConstantPool.*;
|
||||
import com.sun.tools.classfile.Instruction;
|
||||
import com.sun.tools.classfile.Method;
|
||||
|
||||
import com.sun.tools.javac.api.JavacTaskImpl;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.tools.Diagnostic;
|
||||
import javax.tools.JavaFileObject;
|
||||
import javax.tools.SimpleJavaFileObject;
|
||||
|
||||
import static com.sun.tools.javac.jvm.ClassFile.*;
|
||||
|
||||
public class TestLambdaBytecode
|
||||
extends JavacTestingAbstractThreadedTest
|
||||
implements Runnable {
|
||||
|
||||
enum ClassKind {
|
||||
CLASS("class"),
|
||||
INTERFACE("interface");
|
||||
|
||||
String classStr;
|
||||
|
||||
ClassKind(String classStr) {
|
||||
this.classStr = classStr;
|
||||
}
|
||||
}
|
||||
|
||||
enum AccessKind {
|
||||
PUBLIC("public"),
|
||||
PRIVATE("private");
|
||||
|
||||
String accessStr;
|
||||
|
||||
AccessKind(String accessStr) {
|
||||
this.accessStr = accessStr;
|
||||
}
|
||||
}
|
||||
|
||||
enum StaticKind {
|
||||
STATIC("static"),
|
||||
INSTANCE("");
|
||||
|
||||
String staticStr;
|
||||
|
||||
StaticKind(String staticStr) {
|
||||
this.staticStr = staticStr;
|
||||
}
|
||||
}
|
||||
|
||||
enum DefaultKind {
|
||||
DEFAULT("default"),
|
||||
NO_DEFAULT("");
|
||||
|
||||
String defaultStr;
|
||||
|
||||
DefaultKind(String defaultStr) {
|
||||
this.defaultStr = defaultStr;
|
||||
}
|
||||
}
|
||||
|
||||
enum ExprKind {
|
||||
LAMBDA("Runnable r = ()->{ target(); };");
|
||||
|
||||
String exprString;
|
||||
|
||||
ExprKind(String exprString) {
|
||||
this.exprString = exprString;
|
||||
}
|
||||
}
|
||||
|
||||
static class MethodKind {
|
||||
ClassKind ck;
|
||||
AccessKind ak;
|
||||
StaticKind sk;
|
||||
DefaultKind dk;
|
||||
|
||||
MethodKind(ClassKind ck, AccessKind ak, StaticKind sk, DefaultKind dk) {
|
||||
this.ck = ck;
|
||||
this.ak = ak;
|
||||
this.sk = sk;
|
||||
this.dk = dk;
|
||||
}
|
||||
|
||||
boolean inInterface() {
|
||||
return ck == ClassKind.INTERFACE;
|
||||
}
|
||||
|
||||
boolean isPrivate() {
|
||||
return ak == AccessKind.PRIVATE;
|
||||
}
|
||||
|
||||
boolean isStatic() {
|
||||
return sk == StaticKind.STATIC;
|
||||
}
|
||||
|
||||
boolean isDefault() {
|
||||
return dk == DefaultKind.DEFAULT;
|
||||
}
|
||||
|
||||
boolean isOK() {
|
||||
if (isDefault() && (!inInterface() || isStatic())) {
|
||||
return false;
|
||||
} else if (inInterface() &&
|
||||
((!isStatic() && !isDefault()) || isPrivate())) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
String mods() {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append(ak.accessStr);
|
||||
buf.append(' ');
|
||||
buf.append(sk.staticStr);
|
||||
buf.append(' ');
|
||||
buf.append(dk.defaultStr);
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String... args) throws Exception {
|
||||
for (ClassKind ck : ClassKind.values()) {
|
||||
for (AccessKind ak1 : AccessKind.values()) {
|
||||
for (StaticKind sk1 : StaticKind.values()) {
|
||||
for (DefaultKind dk1 : DefaultKind.values()) {
|
||||
for (AccessKind ak2 : AccessKind.values()) {
|
||||
for (StaticKind sk2 : StaticKind.values()) {
|
||||
for (DefaultKind dk2 : DefaultKind.values()) {
|
||||
for (ExprKind ek : ExprKind.values()) {
|
||||
pool.execute(new TestLambdaBytecode(ck, ak1, ak2, sk1, sk2, dk1, dk2, ek));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkAfterExec();
|
||||
}
|
||||
|
||||
MethodKind mk1, mk2;
|
||||
ExprKind ek;
|
||||
DiagChecker dc;
|
||||
|
||||
TestLambdaBytecode(ClassKind ck, AccessKind ak1, AccessKind ak2, StaticKind sk1,
|
||||
StaticKind sk2, DefaultKind dk1, DefaultKind dk2, ExprKind ek) {
|
||||
mk1 = new MethodKind(ck, ak1, sk1, dk1);
|
||||
mk2 = new MethodKind(ck, ak2, sk2, dk2);
|
||||
this.ek = ek;
|
||||
dc = new DiagChecker();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
int id = checkCount.incrementAndGet();
|
||||
JavaSource source = new JavaSource(id);
|
||||
JavacTaskImpl ct = (JavacTaskImpl)comp.getTask(null, fm.get(), dc,
|
||||
null, null, Arrays.asList(source));
|
||||
try {
|
||||
ct.generate();
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
throw new AssertionError(
|
||||
String.format("Error thrown when compiling following code\n%s",
|
||||
source.source));
|
||||
}
|
||||
if (dc.diagFound) {
|
||||
boolean errorExpected = !mk1.isOK() || !mk2.isOK();
|
||||
errorExpected |= mk1.isStatic() && !mk2.isStatic();
|
||||
|
||||
if (!errorExpected) {
|
||||
throw new AssertionError(
|
||||
String.format("Diags found when compiling following code\n%s\n\n%s",
|
||||
source.source, dc.printDiags()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
verifyBytecode(id, source);
|
||||
}
|
||||
|
||||
void verifyBytecode(int id, JavaSource source) {
|
||||
File compiledTest = new File(String.format("Test%d.class", id));
|
||||
try {
|
||||
ClassFile cf = ClassFile.read(compiledTest);
|
||||
Method testMethod = null;
|
||||
for (Method m : cf.methods) {
|
||||
if (m.getName(cf.constant_pool).equals("test")) {
|
||||
testMethod = m;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (testMethod == null) {
|
||||
throw new Error("Test method not found");
|
||||
}
|
||||
Code_attribute ea =
|
||||
(Code_attribute)testMethod.attributes.get(Attribute.Code);
|
||||
if (testMethod == null) {
|
||||
throw new Error("Code attribute for test() method not found");
|
||||
}
|
||||
|
||||
int bsmIdx = -1;
|
||||
|
||||
for (Instruction i : ea.getInstructions()) {
|
||||
if (i.getMnemonic().equals("invokedynamic")) {
|
||||
CONSTANT_InvokeDynamic_info indyInfo =
|
||||
(CONSTANT_InvokeDynamic_info)cf
|
||||
.constant_pool.get(i.getShort(1));
|
||||
bsmIdx = indyInfo.bootstrap_method_attr_index;
|
||||
if (!indyInfo.getNameAndTypeInfo().getType().equals(makeIndyType(id))) {
|
||||
throw new
|
||||
AssertionError("type mismatch for CONSTANT_InvokeDynamic_info " + source.source + "\n" + indyInfo.getNameAndTypeInfo().getType() + "\n" + makeIndyType(id));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bsmIdx == -1) {
|
||||
throw new Error("Missing invokedynamic in generated code");
|
||||
}
|
||||
|
||||
BootstrapMethods_attribute bsm_attr =
|
||||
(BootstrapMethods_attribute)cf
|
||||
.getAttribute(Attribute.BootstrapMethods);
|
||||
if (bsm_attr.bootstrap_method_specifiers.length != 1) {
|
||||
throw new Error("Bad number of method specifiers " +
|
||||
"in BootstrapMethods attribute");
|
||||
}
|
||||
BootstrapMethods_attribute.BootstrapMethodSpecifier bsm_spec =
|
||||
bsm_attr.bootstrap_method_specifiers[0];
|
||||
|
||||
if (bsm_spec.bootstrap_arguments.length != MF_ARITY) {
|
||||
throw new Error("Bad number of static invokedynamic args " +
|
||||
"in BootstrapMethod attribute");
|
||||
}
|
||||
|
||||
CONSTANT_MethodHandle_info mh =
|
||||
(CONSTANT_MethodHandle_info)cf.constant_pool.get(bsm_spec.bootstrap_arguments[1]);
|
||||
|
||||
boolean kindOK;
|
||||
switch (mh.reference_kind) {
|
||||
case REF_invokeStatic: kindOK = mk2.isStatic(); break;
|
||||
case REF_invokeSpecial: kindOK = !mk2.isStatic(); break;
|
||||
case REF_invokeInterface: kindOK = mk2.inInterface(); break;
|
||||
default:
|
||||
kindOK = false;
|
||||
}
|
||||
|
||||
if (!kindOK) {
|
||||
throw new Error("Bad invoke kind in implementation method handle");
|
||||
}
|
||||
|
||||
if (!mh.getCPRefInfo().getNameAndTypeInfo().getType().toString().equals(MH_SIG)) {
|
||||
throw new Error("Type mismatch in implementation method handle");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new Error("error reading " + compiledTest +": " + e);
|
||||
}
|
||||
}
|
||||
String makeIndyType(int id) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append("(");
|
||||
if (!mk2.isStatic() || mk1.inInterface()) {
|
||||
buf.append(String.format("LTest%d;", id));
|
||||
}
|
||||
buf.append(")Ljava/lang/Runnable;");
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
static final int MF_ARITY = 3;
|
||||
static final String MH_SIG = "()V";
|
||||
|
||||
class JavaSource extends SimpleJavaFileObject {
|
||||
|
||||
static final String source_template =
|
||||
"#CK Test#ID {\n" +
|
||||
" #MOD1 void test() { #EK }\n" +
|
||||
" #MOD2 void target() { }\n" +
|
||||
"}\n";
|
||||
|
||||
String source;
|
||||
|
||||
JavaSource(int id) {
|
||||
super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
|
||||
source = source_template.replace("#CK", mk1.ck.classStr)
|
||||
.replace("#MOD1", mk1.mods())
|
||||
.replace("#MOD2", mk2.mods())
|
||||
.replace("#EK", ek.exprString)
|
||||
.replace("#ID", String.valueOf(id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getCharContent(boolean ignoreEncodingErrors) {
|
||||
return source;
|
||||
}
|
||||
}
|
||||
|
||||
static class DiagChecker
|
||||
implements javax.tools.DiagnosticListener<JavaFileObject> {
|
||||
|
||||
boolean diagFound;
|
||||
ArrayList<String> diags = new ArrayList<>();
|
||||
|
||||
public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
|
||||
diags.add(diagnostic.getMessage(Locale.getDefault()));
|
||||
diagFound = true;
|
||||
}
|
||||
|
||||
String printDiags() {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (String s : diags) {
|
||||
buf.append(s);
|
||||
buf.append("\n");
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user