mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
Merge
This commit is contained in:
commit
b7e7d71822
138 changed files with 427 additions and 235 deletions
|
@ -71,9 +71,18 @@ javac.version.opt =
|
|||
javac.lint.opts = -Xlint:all,-deprecation -Werror
|
||||
|
||||
# options for the <javadoc> task for javac
|
||||
javadoc.jls3.url=http://java.sun.com/docs/books/jls/
|
||||
javadoc.jls3.cite=<a href="${javadoc.jls3.url}">The Java Language Specification, Third Edition</a>
|
||||
javadoc.jls3.option=-tag "jls3:a:See <cite>${javadoc.jls3.cite}</cite>:"
|
||||
#javadoc.jls3.url=http://java.sun.com/docs/books/jls/
|
||||
#javadoc.jls3.cite=<a href="${javadoc.jls3.url}">The Java Language Specification, Third Edition</a>
|
||||
#javadoc.jls3.option=-tag "jls3:a:See <cite>${javadoc.jls3.cite}</cite>:"
|
||||
|
||||
|
||||
javadoc.jls.cite=The Java™ Language Specification
|
||||
|
||||
javadoc.jls.option=-tag "jls:a:See <cite>${javadoc.jls.cite}</cite>:"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# jtreg, used to run the JDK regression tests
|
||||
# See http://openjdk.java.net/jtreg/
|
||||
|
|
|
@ -464,7 +464,7 @@
|
|||
</target>
|
||||
|
||||
<target name="javadoc-javac" depends="build-javac,-def-javadoc-tool">
|
||||
<javadoc-tool name="javac" includes="${javac.includes}" options="${javadoc.jls3.option}"/>
|
||||
<javadoc-tool name="javac" includes="${javac.includes}" options="${javadoc.jls.option}"/>
|
||||
</target>
|
||||
|
||||
<target name="jtreg-javac" depends="build-javac,build-javap,-def-jtreg">
|
||||
|
|
|
@ -311,8 +311,8 @@ public interface ClassDoc extends ProgramElementDoc, Type {
|
|||
|
||||
/**
|
||||
* Get the list of classes and interfaces declared as imported.
|
||||
* These are called "single-type-import declarations" in the
|
||||
* Java Language Specification.
|
||||
* These are called "single-type-import declarations" in
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
* @return an array of ClassDoc representing the imported classes.
|
||||
*
|
||||
|
@ -325,8 +325,8 @@ public interface ClassDoc extends ProgramElementDoc, Type {
|
|||
|
||||
/**
|
||||
* Get the list of packages declared as imported.
|
||||
* These are called "type-import-on-demand declarations" in the
|
||||
* Java Language Specification.
|
||||
* These are called "type-import-on-demand declarations" in
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
* @return an array of PackageDoc representing the imported packages.
|
||||
*
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
* {@code @}<em>annotationType</em> ( <em>arguments</em> )
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 9.7"
|
||||
* @jls section 9.7
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* <em>expression</em> [ <em>index</em> ]
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.13"
|
||||
* @jls section 15.13
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* <em>type</em> []
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 10.1"
|
||||
* @jls section 10.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,7 +35,7 @@ package com.sun.source.tree;
|
|||
* assert <em>condition</em> : <em>detail</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.10"
|
||||
* @jls section 14.10
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* <em>variable</em> = <em>expression</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.26.1"
|
||||
* @jls section 15.26.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -34,7 +34,7 @@ package com.sun.source.tree;
|
|||
* <em>leftOperand</em> <em>operator</em> <em>rightOperand</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, sections 15.17 to 15.24"
|
||||
* @jls sections 15.17 to 15.24
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.util.List;
|
|||
* static { <em>statements</em> }
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.2"
|
||||
* @jls section 14.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -37,7 +37,7 @@ import javax.lang.model.element.Name;
|
|||
* break <em>label</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.15"
|
||||
* @jls section 14.15
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.util.List;
|
|||
* <em>statements</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.11"
|
||||
* @jls section 14.11
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -34,7 +34,7 @@ package com.sun.source.tree;
|
|||
* <em>block</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.20"
|
||||
* @jls section 14.20
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -42,8 +42,7 @@ import javax.lang.model.element.Name;
|
|||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed,
|
||||
* sections 8.1, 8.9, 9.1, and 9.6"
|
||||
* @jls sections 8.1, 8.9, 9.1, and 9.6
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ import com.sun.source.tree.LineMap;
|
|||
* Represents the abstract syntax tree for compilation units (source
|
||||
* files) and package declarations (package-info.java).
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, sections 7.3, and 7.4"
|
||||
* @jls sections 7.3, and 7.4
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @since 1.6
|
||||
|
|
|
@ -34,7 +34,7 @@ package com.sun.source.tree;
|
|||
* <em>variable</em> <em>operator</em> <em>expression</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.26.2"
|
||||
* @jls section 15.26.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* <em>condition</em> ? <em>trueExpression</em> : <em>falseExpression</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.25"
|
||||
* @jls section 15.25
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -36,7 +36,7 @@ import javax.lang.model.element.Name;
|
|||
* continue <em>label</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.16"
|
||||
* @jls section 14.16
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,7 +35,7 @@ package com.sun.source.tree;
|
|||
* while ( <em>expression</em> );
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.13"
|
||||
* @jls section 14.13
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* ;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.6"
|
||||
* @jls section 14.6
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -34,7 +34,7 @@ package com.sun.source.tree;
|
|||
* <em>statement</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.14.2"
|
||||
* @jls section 14.14.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* <em>expression</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.8"
|
||||
* @jls section 14.8
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -29,7 +29,7 @@ package com.sun.source.tree;
|
|||
* A tree node used as the base class for the different types of
|
||||
* expressions.
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, chapter 15"
|
||||
* @jls chapter 15
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
* <em>statement</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.14.1"
|
||||
* @jls section 14.14.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,7 +35,7 @@ import javax.lang.model.element.Name;
|
|||
* <em>name</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 6.5.6.1"
|
||||
* @jls section 6.5.6.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -39,7 +39,7 @@ package com.sun.source.tree;
|
|||
* <em>elseStatement</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.9"
|
||||
* @jls section 14.9
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,7 +35,7 @@ package com.sun.source.tree;
|
|||
* static import <em>qualifiedIdentifier</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 7.5"
|
||||
* @jls section 7.5
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* <em>expression</em> instanceof <em>type</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.20.2"
|
||||
* @jls section 15.20.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,7 +35,7 @@ import javax.lang.model.element.Name;
|
|||
* <em>label</em> : <em>statement</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.7"
|
||||
* @jls section 14.7
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -34,7 +34,7 @@ package com.sun.source.tree;
|
|||
* <em>value</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.28"
|
||||
* @jls section 15.28
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,8 +35,7 @@ import javax.lang.model.element.Name;
|
|||
* <em>expression</em> . <em>identifier</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, sections 6.5,
|
||||
* 15.11, and 15.12"
|
||||
* @jls sections 6.5, 15.11,and 15.12
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.List;
|
|||
* this . <em>typeArguments</em> <em>identifier</em> ( <em>arguments</em> )
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.12"
|
||||
* @jls section 15.12
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -40,8 +40,7 @@ import javax.lang.model.element.Name;
|
|||
* <em>modifiers</em> <em>type</em> <em>name</em> () default <em>defaultValue</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, sections 8.4, 8.6, 8.7,
|
||||
* 9.4, and 9.6"
|
||||
* @jls sections 8.4, 8.6, 8.7, 9.4, and 9.6
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -39,8 +39,7 @@ import javax.lang.model.element.Modifier;
|
|||
* <em>flags</em> <em>annotations</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, sections
|
||||
* 8.1.1, 8.3.1, 8.4.3, 8.5.1, 8.8.3, 9.1.1, and 9.7"
|
||||
* @jls sections 8.1.1, 8.3.1, 8.4.3, 8.5.1, 8.8.3, 9.1.1, and 9.7
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.List;
|
|||
* new <em>type</em> <em>dimensions</em> [ ] <em>initializers</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.10"
|
||||
* @jls section 15.10
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -42,7 +42,7 @@ import java.util.List;
|
|||
* <em>enclosingExpression</em>.new <em>identifier</em> ( <em>arguments</em> )
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.9"
|
||||
* @jls section 15.9
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.List;
|
|||
* <em>type</em> < <em>typeArguments</em> >
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 4.5.1"
|
||||
* @jls section 4.5.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -34,7 +34,7 @@ package com.sun.source.tree;
|
|||
* ( <em>expression</em> )
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.8.5"
|
||||
* @jls section 15.8.5
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,7 +35,7 @@ import javax.lang.model.type.TypeKind;
|
|||
* <em>primitiveTypeKind</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 4.2"
|
||||
* @jls section 4.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -34,7 +34,7 @@ package com.sun.source.tree;
|
|||
* return <em>expression</em>;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.17"
|
||||
* @jls section 14.17
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -29,7 +29,7 @@ package com.sun.source.tree;
|
|||
* A tree node used as the base class for the different kinds of
|
||||
* statements.
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, chapter 14"
|
||||
* @jls chapter 14
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.List;
|
|||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.11"
|
||||
* @jls section 14.11
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -34,7 +34,7 @@ package com.sun.source.tree;
|
|||
* </em>block</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.19"
|
||||
* @jls section 14.19
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* throw <em>expression</em>;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.18"
|
||||
* @jls section 14.18
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -232,9 +232,9 @@ public interface Tree {
|
|||
PARAMETERIZED_TYPE(ParameterizedTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link DisjunctiveTypeTree}.
|
||||
* Used for instances of {@link UnionTypeTree}.
|
||||
*/
|
||||
DISJUNCTIVE_TYPE(DisjunctiveTypeTree.class),
|
||||
UNION_TYPE(UnionTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link TypeCastTree}.
|
||||
|
|
|
@ -95,7 +95,7 @@ public interface TreeVisitor<R,P> {
|
|||
R visitCompilationUnit(CompilationUnitTree node, P p);
|
||||
R visitTry(TryTree node, P p);
|
||||
R visitParameterizedType(ParameterizedTypeTree node, P p);
|
||||
R visitDisjunctiveType(DisjunctiveTypeTree node, P p);
|
||||
R visitUnionType(UnionTypeTree node, P p);
|
||||
R visitArrayType(ArrayTypeTree node, P p);
|
||||
R visitTypeCast(TypeCastTree node, P p);
|
||||
R visitPrimitiveType(PrimitiveTypeTree node, P p);
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.util.List;
|
|||
* <em>finallyBlock</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.20"
|
||||
* @jls section 14.20
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -33,7 +33,7 @@ package com.sun.source.tree;
|
|||
* ( <em>type</em> ) <em>expression</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 15.16"
|
||||
* @jls section 15.16
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -38,7 +38,7 @@ import javax.lang.model.element.Name;
|
|||
* <em>name</em> extends <em>bounds</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 4.4"
|
||||
* @jls section 4.4
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -36,7 +36,7 @@ package com.sun.source.tree;
|
|||
* <em>expression</em> <em>operator</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, sections 15.14 and 15.15"
|
||||
* @jls sections 15.14 and 15.15
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 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
|
||||
|
@ -28,13 +28,12 @@ package com.sun.source.tree;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a disjunctive type expression in a multicatch var declaration.
|
||||
*
|
||||
* A tree node for a union type expression in a multicatch var declaration.
|
||||
*
|
||||
* @author Maurizio Cimadamore
|
||||
*
|
||||
* @since 1.7
|
||||
*/
|
||||
public interface DisjunctiveTypeTree extends Tree {
|
||||
public interface UnionTypeTree extends Tree {
|
||||
List<? extends Tree> getTypeAlternatives();
|
||||
}
|
|
@ -35,7 +35,7 @@ import javax.lang.model.element.Name;
|
|||
* <em>modifiers</em> <em>type</em> <em>name</em> <em>initializer</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, sections 8.3 and 14.4"
|
||||
* @jls sections 8.3 and 14.4
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -35,7 +35,7 @@ package com.sun.source.tree;
|
|||
* </pre>
|
||||
*
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 14.12"
|
||||
* @jls section 14.12
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -38,7 +38,7 @@ package com.sun.source.tree;
|
|||
* ? super <em>bound</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "The Java Language Specification, 3rd ed, section 4.5.1"
|
||||
* @jls section 4.5.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
|
|
|
@ -228,7 +228,7 @@ public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> {
|
|||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitDisjunctiveType(DisjunctiveTypeTree node, P p) {
|
||||
public R visitUnionType(UnionTypeTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
|
|
|
@ -355,7 +355,7 @@ public class TreeScanner<R,P> implements TreeVisitor<R,P> {
|
|||
return r;
|
||||
}
|
||||
|
||||
public R visitDisjunctiveType(DisjunctiveTypeTree node, P p) {
|
||||
public R visitUnionType(UnionTypeTree node, P p) {
|
||||
return scan(node.getTypeAlternatives(), p);
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,8 @@ public class DeclarationsImpl implements Declarations {
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* See JLS 2 sections 8.3 and 8.4.6.
|
||||
* See sections 8.3 and 8.4.6 of
|
||||
* <cite>The Java™ Language Specification</cite>
|
||||
*/
|
||||
public boolean hides(MemberDeclaration sub, MemberDeclaration sup) {
|
||||
Symbol hider = ((DeclarationImpl) sub).sym;
|
||||
|
@ -107,7 +108,8 @@ public class DeclarationsImpl implements Declarations {
|
|||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* See JLS 2 section 8.4.6.1.
|
||||
* See section 8.4.6.1 of
|
||||
* <cite>The Java™ Language Specification</cite>
|
||||
*/
|
||||
public boolean overrides(MethodDeclaration sub, MethodDeclaration sup) {
|
||||
MethodSymbol overrider = ((MethodDeclarationImpl) sub).sym;
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.LinkedHashSet;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* See JVMS3, sections 4.2, 4.6, 4.7.
|
||||
* See JVMS, sections 4.2, 4.6, 4.7.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.16.
|
||||
* See JVMS, section 4.8.16.
|
||||
*
|
||||
* <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.
|
||||
|
@ -71,7 +71,7 @@ public class Annotation {
|
|||
public final element_value_pair element_value_pairs[];
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.16.1.
|
||||
* See JVMS, section 4.8.16.1.
|
||||
*/
|
||||
public static abstract class element_value {
|
||||
public static element_value read(ClassReader cr)
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.15.
|
||||
* See JVMS, section 4.8.15.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3 <TBD>
|
||||
* See JVMS <TBD>
|
||||
* http://cr.openjdk.java.net/~jrose/pres/indy-javadoc-mlvm/
|
||||
*
|
||||
* <p><b>This is NOT part of any supported API.
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.io.InputStream;
|
|||
import static com.sun.tools.classfile.AccessFlags.*;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.2.
|
||||
* See JVMS, section 4.2.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.Iterator;
|
|||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.3.
|
||||
* See JVMS, section 4.8.3.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.io.OutputStream;
|
|||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.5.
|
||||
* See JVMS, section 4.5.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.2.
|
||||
* See JVMS, section 4.8.2.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.15.
|
||||
* See JVMS, section 4.8.15.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -29,7 +29,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.4.
|
||||
* See JVMS, section 4.4.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -29,7 +29,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.7.
|
||||
* See JVMS, section 4.8.7.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.5.
|
||||
* See JVMS, section 4.8.5.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.io.IOException;
|
|||
import com.sun.tools.classfile.ConstantPool.*;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.6.
|
||||
* See JVMS, section 4.8.6.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
package com.sun.tools.classfile;
|
||||
|
||||
/**
|
||||
* See JVMS3, chapter 6.
|
||||
* See JVMS, chapter 6.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.12.
|
||||
* See JVMS, section 4.8.12.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.13.
|
||||
* See JVMS, section 4.8.13.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.14.
|
||||
* See JVMS, section 4.8.14.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -29,7 +29,7 @@ import static com.sun.tools.classfile.Instruction.Kind.*;
|
|||
import static com.sun.tools.classfile.Opcode.Set.*;
|
||||
|
||||
/**
|
||||
* See JVMS3, chapter 6.
|
||||
* See JVMS, chapter 6.
|
||||
*
|
||||
* <p>In addition to providing all the standard opcodes defined in JVMS,
|
||||
* this class also provides legacy support for the PicoJava extensions.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.16 and 4.8.17.
|
||||
* See JVMS, section 4.8.16 and 4.8.17.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.17.
|
||||
* See JVMS, section 4.8.17.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.18.
|
||||
* See JVMS, section 4.8.18.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.18 and 4.8.19.
|
||||
* See JVMS, section 4.8.18 and 4.8.19.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.16.
|
||||
* See JVMS, section 4.8.16.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.18.
|
||||
* See JVMS, section 4.8.18.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.List;
|
|||
import com.sun.tools.classfile.Type.*;
|
||||
|
||||
/**
|
||||
* See JVMS3 4.4.4.
|
||||
* See JVMS 4.4.4.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.9.
|
||||
* See JVMS, section 4.8.9.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.io.DataInputStream;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.15.
|
||||
* See JVMS, section 4.8.15.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.10.
|
||||
* See JVMS, section 4.8.10.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.4.
|
||||
* See JVMS, section 4.8.4.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -28,7 +28,7 @@ package com.sun.tools.classfile;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* See JVMS3, section 4.8.8.
|
||||
* See JVMS, section 4.8.8.
|
||||
*
|
||||
* <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.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</head>
|
||||
<body>
|
||||
A minimalist library to read and write class files into objects closely
|
||||
based on the corresponding definitions in the Java Virtual Machine
|
||||
Specification (JVMS).
|
||||
based on the corresponding definitions in
|
||||
<cite>The Java™ Virtual Machine Specification</cite> (JVMS).
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2523,8 +2523,9 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
|||
}
|
||||
|
||||
/**
|
||||
* According to the Java Language Specifications, all the outer classes
|
||||
* and static nested classes are core classes.
|
||||
* According to
|
||||
* <cite>The Java™ Language Specification</cite>,
|
||||
* all the outer classes and static nested classes are core classes.
|
||||
*/
|
||||
public boolean isCoreClass(ClassDoc cd) {
|
||||
return cd.containingClass() == null || cd.isStatic();
|
||||
|
|
|
@ -175,8 +175,9 @@ public class Util {
|
|||
}
|
||||
|
||||
/**
|
||||
* According to the Java Language Specifications, all the outer classes
|
||||
* and static inner classes are core classes.
|
||||
* According to
|
||||
* <cite>The Java™ Language Specification</cite>,
|
||||
* all the outer classes and static inner classes are core classes.
|
||||
*/
|
||||
public static boolean isCoreClass(ClassDoc cd) {
|
||||
return cd.containingClass() == null || cd.isStatic();
|
||||
|
|
|
@ -231,9 +231,9 @@ public class Flags {
|
|||
public static final long PROPRIETARY = 1L<<38;
|
||||
|
||||
/**
|
||||
* Flag that marks a disjunction var in a multi-catch clause
|
||||
* Flag that marks a a multi-catch parameter
|
||||
*/
|
||||
public static final long DISJUNCTION = 1L<<39;
|
||||
public static final long UNION = 1L<<39;
|
||||
|
||||
/**
|
||||
* Flag that marks a signature-polymorphic invoke method.
|
||||
|
|
|
@ -1193,7 +1193,7 @@ public abstract class Symbol implements Element {
|
|||
}
|
||||
|
||||
private boolean isOverridableIn(TypeSymbol origin) {
|
||||
// JLS3 8.4.6.1
|
||||
// JLS 8.4.6.1
|
||||
switch ((int)(flags_field & Flags.AccessFlags)) {
|
||||
case Flags.PRIVATE:
|
||||
return false;
|
||||
|
|
|
@ -1985,7 +1985,7 @@ public class Types {
|
|||
* signature</em> of the other. This is <b>not</b> an equivalence
|
||||
* relation.
|
||||
*
|
||||
* @see "The Java Language Specification, Third Ed. (8.4.2)."
|
||||
* @jls section 8.4.2.
|
||||
* @see #overrideEquivalent(Type t, Type s)
|
||||
* @param t first signature (possibly raw).
|
||||
* @param s second signature (could be subjected to erasure).
|
||||
|
@ -2004,7 +2004,7 @@ public class Types {
|
|||
* equivalence</em>. This is the natural extension of
|
||||
* isSubSignature to an equivalence relation.
|
||||
*
|
||||
* @see "The Java Language Specification, Third Ed. (8.4.2)."
|
||||
* @jls section 8.4.2.
|
||||
* @see #isSubSignature(Type t, Type s)
|
||||
* @param t a signature (possible raw, could be subjected to
|
||||
* erasure).
|
||||
|
@ -2309,7 +2309,7 @@ public class Types {
|
|||
if (elemtype == t.elemtype)
|
||||
return t;
|
||||
else
|
||||
return new ArrayType(upperBound(elemtype), t.tsym);
|
||||
return new ArrayType(elemtype, t.tsym);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3049,8 +3049,7 @@ public class Types {
|
|||
|
||||
/**
|
||||
* Return-Type-Substitutable.
|
||||
* @see <a href="http://java.sun.com/docs/books/jls/">The Java
|
||||
* Language Specification, Third Ed. (8.4.5)</a>
|
||||
* @jls section 8.4.5
|
||||
*/
|
||||
public boolean returnTypeSubstitutable(Type r1, Type r2) {
|
||||
if (hasSameArgs(r1, r2))
|
||||
|
@ -3130,7 +3129,7 @@ public class Types {
|
|||
|
||||
// <editor-fold defaultstate="collapsed" desc="Capture conversion">
|
||||
/*
|
||||
* JLS 3rd Ed. 5.1.10 Capture Conversion:
|
||||
* JLS 5.1.10 Capture Conversion:
|
||||
*
|
||||
* Let G name a generic type declaration with n formal type
|
||||
* parameters A1 ... An with corresponding bounds U1 ... Un. There
|
||||
|
@ -3163,7 +3162,7 @@ public class Types {
|
|||
* Capture conversion is not applied recursively.
|
||||
*/
|
||||
/**
|
||||
* Capture conversion as specified by JLS 3rd Ed.
|
||||
* Capture conversion as specified by the JLS.
|
||||
*/
|
||||
|
||||
public List<Type> capture(List<Type> ts) {
|
||||
|
|
|
@ -1112,7 +1112,7 @@ public class Attr extends JCTree.Visitor {
|
|||
Type ctype = attribStat(c.param, catchEnv);
|
||||
if (TreeInfo.isMultiCatch(c)) {
|
||||
//multi-catch parameter is implicitly marked as final
|
||||
c.param.sym.flags_field |= FINAL | DISJUNCTION;
|
||||
c.param.sym.flags_field |= FINAL | UNION;
|
||||
}
|
||||
if (c.param.sym.kind == Kinds.VAR) {
|
||||
c.param.sym.setData(ElementKind.EXCEPTION_PARAMETER);
|
||||
|
@ -2632,10 +2632,10 @@ public class Attr extends JCTree.Visitor {
|
|||
* @param tree The tree making up the variable reference.
|
||||
* @param env The current environment.
|
||||
* @param v The variable's symbol.
|
||||
* @see JLS 3rd Ed. (8.9 Enums)
|
||||
* @jls section 8.9 Enums
|
||||
*/
|
||||
private void checkEnumInitializer(JCTree tree, Env<AttrContext> env, VarSymbol v) {
|
||||
// JLS 3rd Ed.:
|
||||
// JLS:
|
||||
//
|
||||
// "It is a compile-time error to reference a static field
|
||||
// of an enum type that is not a compile-time constant
|
||||
|
@ -2908,7 +2908,7 @@ public class Attr extends JCTree.Visitor {
|
|||
result = check(tree, owntype, TYP, pkind, pt);
|
||||
}
|
||||
|
||||
public void visitTypeDisjunction(JCTypeDisjunction tree) {
|
||||
public void visitTypeUnion(JCTypeUnion tree) {
|
||||
ListBuffer<Type> multicatchTypes = ListBuffer.lb();
|
||||
for (JCExpression typeTree : tree.alternatives) {
|
||||
Type ctype = attribType(typeTree, env);
|
||||
|
@ -2916,7 +2916,7 @@ public class Attr extends JCTree.Visitor {
|
|||
chk.checkClassType(typeTree.pos(), ctype),
|
||||
syms.throwableType);
|
||||
if (!ctype.isErroneous()) {
|
||||
//check that alternatives of a disjunctive type are pairwise
|
||||
//check that alternatives of a union type are pairwise
|
||||
//unrelated w.r.t. subtyping
|
||||
if (chk.intersects(ctype, multicatchTypes.toList())) {
|
||||
for (Type t : multicatchTypes) {
|
||||
|
|
|
@ -2271,7 +2271,7 @@ public class Check {
|
|||
* that of any public or protected method declared in class Object
|
||||
* or in the interface annotation.Annotation."
|
||||
*
|
||||
* @jls3 9.6 Annotation Types
|
||||
* @jls 9.6 Annotation Types
|
||||
*/
|
||||
void validateAnnotationMethod(DiagnosticPosition pos, MethodSymbol m) {
|
||||
for (Type sup = syms.annotationType; sup.tag == CLASS; sup = types.supertype(sup)) {
|
||||
|
|
|
@ -51,7 +51,7 @@ import static com.sun.tools.javac.code.TypeTags.*;
|
|||
* unassignment analysis ensures that no final variable is assigned
|
||||
* more than once.
|
||||
*
|
||||
* <p>The second edition of the JLS has a number of problems in the
|
||||
* <p>The JLS has a number of problems in the
|
||||
* specification of these flow analysis problems. This implementation
|
||||
* attempts to address those issues.
|
||||
*
|
||||
|
@ -126,7 +126,7 @@ import static com.sun.tools.javac.code.TypeTags.*;
|
|||
* don't have to worry about the return expression because this
|
||||
* concept is only used for construcrors.
|
||||
*
|
||||
* <p>There is no spec in JLS2 for when a variable is definitely
|
||||
* <p>There is no spec in the JLS for when a variable is definitely
|
||||
* assigned at the end of a constructor, which is needed for final
|
||||
* fields (8.3.1.2). We implement the rule that V is DA at the end
|
||||
* of the constructor iff it is DA and the end of the body of the
|
||||
|
@ -381,7 +381,7 @@ public class Flow extends TreeScanner {
|
|||
if (sym.adr >= firstadr && trackable(sym)) {
|
||||
if ((sym.flags() & FINAL) != 0) {
|
||||
if ((sym.flags() & PARAMETER) != 0) {
|
||||
if ((sym.flags() & DISJUNCTION) != 0) { //multi-catch parameter
|
||||
if ((sym.flags() & UNION) != 0) { //multi-catch parameter
|
||||
log.error(pos, "multicatch.parameter.may.not.be.assigned",
|
||||
sym);
|
||||
}
|
||||
|
@ -1003,7 +1003,7 @@ public class Flow extends TreeScanner {
|
|||
thrown = List.nil();
|
||||
for (List<JCCatch> l = tree.catchers; l.nonEmpty(); l = l.tail) {
|
||||
List<JCExpression> subClauses = TreeInfo.isMultiCatch(l.head) ?
|
||||
((JCTypeDisjunction)l.head.param.vartype).alternatives :
|
||||
((JCTypeUnion)l.head.param.vartype).alternatives :
|
||||
List.of(l.head.param.vartype);
|
||||
for (JCExpression ct : subClauses) {
|
||||
caught = chk.incl(ct.type, caught);
|
||||
|
@ -1075,7 +1075,7 @@ public class Flow extends TreeScanner {
|
|||
alive = true;
|
||||
JCVariableDecl param = l.head.param;
|
||||
List<JCExpression> subClauses = TreeInfo.isMultiCatch(l.head) ?
|
||||
((JCTypeDisjunction)l.head.param.vartype).alternatives :
|
||||
((JCTypeUnion)l.head.param.vartype).alternatives :
|
||||
List.of(l.head.param.vartype);
|
||||
List<Type> ctypes = List.nil();
|
||||
List<Type> rethrownTypes = chk.diff(thrownInTry, caughtInTry);
|
||||
|
|
|
@ -346,7 +346,7 @@ public class Resolve {
|
|||
if (typeargtypes == null) typeargtypes = List.nil();
|
||||
if (mt.tag != FORALL && typeargtypes.nonEmpty()) {
|
||||
// This is not a polymorphic method, but typeargs are supplied
|
||||
// which is fine, see JLS3 15.12.2.1
|
||||
// which is fine, see JLS 15.12.2.1
|
||||
} else if (mt.tag == FORALL && typeargtypes.nonEmpty()) {
|
||||
ForAll pmt = (ForAll) mt;
|
||||
if (typeargtypes.length() != pmt.tvars.length())
|
||||
|
@ -770,12 +770,9 @@ public class Resolve {
|
|||
return ambiguityError(m1, m2);
|
||||
// both abstract, neither overridden; merge throws clause and result type
|
||||
Symbol mostSpecific;
|
||||
Type result2 = mt2.getReturnType();
|
||||
if (mt2.tag == FORALL)
|
||||
result2 = types.subst(result2, ((ForAll)mt2).tvars, ((ForAll)mt1).tvars);
|
||||
if (types.isSubtype(mt1.getReturnType(), result2))
|
||||
if (types.returnTypeSubstitutable(mt1, mt2))
|
||||
mostSpecific = m1;
|
||||
else if (types.isSubtype(result2, mt1.getReturnType()))
|
||||
else if (types.returnTypeSubstitutable(mt2, mt1))
|
||||
mostSpecific = m2;
|
||||
else {
|
||||
// Theoretically, this can't happen, but it is possible
|
||||
|
@ -1772,7 +1769,7 @@ public class Resolve {
|
|||
|
||||
/**
|
||||
* Resolve an appropriate implicit this instance for t's container.
|
||||
* JLS2 8.8.5.1 and 15.9.2
|
||||
* JLS 8.8.5.1 and 15.9.2
|
||||
*/
|
||||
Type resolveImplicitThis(DiagnosticPosition pos, Env<AttrContext> env, Type t) {
|
||||
return resolveImplicitThis(pos, env, t, false);
|
||||
|
|
|
@ -283,7 +283,7 @@ public class Gen extends JCTree.Visitor {
|
|||
}
|
||||
|
||||
// leave alone methods inherited from Object
|
||||
// JLS2 13.1.
|
||||
// JLS 13.1.
|
||||
if (sym.owner == syms.objectType.tsym)
|
||||
return sym;
|
||||
|
||||
|
@ -1456,7 +1456,7 @@ public class Gen extends JCTree.Visitor {
|
|||
List<Integer> gaps) {
|
||||
if (startpc != endpc) {
|
||||
List<JCExpression> subClauses = TreeInfo.isMultiCatch(tree) ?
|
||||
((JCTypeDisjunction)tree.param.vartype).alternatives :
|
||||
((JCTypeUnion)tree.param.vartype).alternatives :
|
||||
List.of(tree.param.vartype);
|
||||
while (gaps.nonEmpty()) {
|
||||
for (JCExpression subCatch : subClauses) {
|
||||
|
|
|
@ -1837,7 +1837,7 @@ public class JavacParser implements Parser {
|
|||
JCModifiers mods = optFinal(Flags.PARAMETER);
|
||||
List<JCExpression> catchTypes = catchTypes();
|
||||
JCExpression paramType = catchTypes.size() > 1 ?
|
||||
toP(F.at(catchTypes.head.getStartPosition()).TypeDisjunction(catchTypes)) :
|
||||
toP(F.at(catchTypes.head.getStartPosition()).TypeUnion(catchTypes)) :
|
||||
catchTypes.head;
|
||||
JCVariableDecl formal = variableDeclaratorId(mods, paramType);
|
||||
accept(RPAREN);
|
||||
|
|
|
@ -236,13 +236,13 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
|||
*/
|
||||
public static final int TYPEAPPLY = TYPEARRAY + 1;
|
||||
|
||||
/** Disjunction types, of type TypeDisjunction
|
||||
/** Union types, of type TypeUnion
|
||||
*/
|
||||
public static final int TYPEDISJUNCTION = TYPEAPPLY + 1;
|
||||
public static final int TYPEUNION = TYPEAPPLY + 1;
|
||||
|
||||
/** Formal type parameters, of type TypeParameter.
|
||||
*/
|
||||
public static final int TYPEPARAMETER = TYPEDISJUNCTION + 1;
|
||||
public static final int TYPEPARAMETER = TYPEUNION + 1;
|
||||
|
||||
/** Type argument.
|
||||
*/
|
||||
|
@ -1881,30 +1881,30 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
|||
}
|
||||
|
||||
/**
|
||||
* A disjunction type, T1 | T2 | ... Tn (used in multicatch statements)
|
||||
* A union type, T1 | T2 | ... Tn (used in multicatch statements)
|
||||
*/
|
||||
public static class JCTypeDisjunction extends JCExpression implements DisjunctiveTypeTree {
|
||||
public static class JCTypeUnion extends JCExpression implements UnionTypeTree {
|
||||
|
||||
public List<JCExpression> alternatives;
|
||||
|
||||
protected JCTypeDisjunction(List<JCExpression> components) {
|
||||
protected JCTypeUnion(List<JCExpression> components) {
|
||||
this.alternatives = components;
|
||||
}
|
||||
@Override
|
||||
public void accept(Visitor v) { v.visitTypeDisjunction(this); }
|
||||
public void accept(Visitor v) { v.visitTypeUnion(this); }
|
||||
|
||||
public Kind getKind() { return Kind.DISJUNCTIVE_TYPE; }
|
||||
public Kind getKind() { return Kind.UNION_TYPE; }
|
||||
|
||||
public List<JCExpression> getTypeAlternatives() {
|
||||
return alternatives;
|
||||
}
|
||||
@Override
|
||||
public <R,D> R accept(TreeVisitor<R,D> v, D d) {
|
||||
return v.visitDisjunctiveType(this, d);
|
||||
return v.visitUnionType(this, d);
|
||||
}
|
||||
@Override
|
||||
public int getTag() {
|
||||
return TYPEDISJUNCTION;
|
||||
return TYPEUNION;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2227,7 +2227,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
|||
public void visitTypeIdent(JCPrimitiveTypeTree that) { visitTree(that); }
|
||||
public void visitTypeArray(JCArrayTypeTree that) { visitTree(that); }
|
||||
public void visitTypeApply(JCTypeApply that) { visitTree(that); }
|
||||
public void visitTypeDisjunction(JCTypeDisjunction that) { visitTree(that); }
|
||||
public void visitTypeUnion(JCTypeUnion that) { visitTree(that); }
|
||||
public void visitTypeParameter(JCTypeParameter that) { visitTree(that); }
|
||||
public void visitWildcard(JCWildcard that) { visitTree(that); }
|
||||
public void visitTypeBoundKind(TypeBoundKind that) { visitTree(that); }
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue