This commit is contained in:
Phil Race 2014-07-01 10:21:41 -07:00
commit ccffd661f8
217 changed files with 6103 additions and 1172 deletions

View File

@ -1,5 +1,6 @@
^build/ ^build/
^dist/ ^dist/
^.idea
/nbproject/private/ /nbproject/private/
^.hgtip ^.hgtip
.DS_Store .DS_Store

View File

@ -752,6 +752,17 @@
/> />
</target> </target>
<!--
**** IDE support
-->
<target name="idea">
<mkdir dir=".idea"/>
<copy todir=".idea" >
<fileset dir="make/intellij" includes="**"/>
</copy>
<replace file=".idea/ant.xml" token="@@@" value="${jtreg.home}"/>
</target>
<!-- <!--
**** Check targets. **** Check targets.

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
<properties>
<property name="boot.java.home" value="$JDKPath$" />
<property name="jtreg.tests" value="$FilePath$" />
<property name="target.java.home" value="$JDKPath$" />
<property name="jtreg.home" value="@@@" />
<property name="javac.debuglevel" value="source,lines,vars" />
<property name="jtreg.jpda.jvmargs" value="-agentlib:jdwp=transport=dt_socket,server=n,address=localhost:5900,suspend=y" />
</properties>
<executeOn event="afterCompilation" target="build-all-classes" />
</buildFile>
</component>
</project>

View File

@ -0,0 +1,36 @@
<!-- importing.xml -->
<project name="langtools" basedir="..">
<import file="../make/build.xml"/>
<target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
<exec-target target="jtreg-debug-internal"/>
</target>
<target name="jtreg-debug-internal" depends="build-all-tools,-def-jtreg">
<sequential>
<sleep seconds="2"/>
<jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
</sequential>
</target>
<macrodef name="exec-target">
<attribute name="antfile" default="${ant.file}" />
<attribute name="target" />
<sequential>
<java classname="org.apache.tools.ant.Main" fork="true" spawn="true">
<arg value="-f"/>
<arg value="@{antfile}"/>
<arg value="-Dboot.java.home=${boot.java.home}"/>
<arg value="-Dtarget.java.home=${target.java.home}"/>
<arg value="-Djtreg.home=${jtreg.home}"/>
<arg value="-Djtreg.tests=${jtreg.tests}"/>
<arg value="-Djtreg.jpda.jvmargs=${jtreg.jpda.jvmargs}"/>
<arg value="@{target}"/>
<classpath>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</sequential>
</macrodef>
</project>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="RIGHT_MARGIN" value="80" />
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/test" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="DEBUGGING_INFO" value="false" />
<option name="ADDITIONAL_OPTIONS_STRING" value="-Xlint:all -Werror" />
</component>
</project>

View File

@ -0,0 +1,26 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="langtools" />
<option name="myLocal" value="false" />
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
<inspection_tool class="MismatchedCollectionQueryUpdate" enabled="false" level="WARNING" enabled_by_default="false">
<option name="queryNames">
<value />
</option>
<option name="updateNames">
<value />
</option>
</inspection_tool>
<inspection_tool class="SpellCheckingInspection" enabled="true" level="TYPO" enabled_by_default="true">
<option name="processCode" value="false" />
<option name="processLiterals" value="false" />
<option name="processComments" value="false" />
</inspection_tool>
<inspection_tool class="SuspiciousMethodCalls" enabled="true" level="WARNING" enabled_by_default="true">
<option name="REPORT_CONVERTIBLE_METHOD_CALLS" value="false" />
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="langtools" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/gensrc" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
</component>
</module>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true">
<output url="file://$PROJECT_DIR$/build/intellij" />
</component>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/langtools.iml" filepath="$PROJECT_DIR$/.idea/langtools.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="hg4idea" />
</component>
</project>

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<ignored path=".idea/" />
</component>
<component name="CompilerWorkspaceConfiguration">
<option name="MAKE_PROJECT_ON_SAVE" value="true" />
</component>
<component name="RunManager" selected="Application.javac">
<configuration default="false" name="javac" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
</configuration>
<configuration default="false" name="javadoc" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
</configuration>
<configuration default="false" name="javap" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
</configuration>
<configuration default="false" name="javah" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
</configuration>
<configuration default="false" name="jdeps" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.jdeps.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
</configuration>
<configuration default="false" name="sjavac" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
</configuration>
<configuration default="false" name="jtreg (remote)" type="Remote" factoryName="Remote" singleton="true">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="true" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5900" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="5900" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<ConfigurationWrapper RunnerId="Debug" />
<method>
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="jtreg-debug" />
</method>
<method />
</configuration>
<list size="7">
<item index="0" class="java.lang.String" itemvalue="Application.javac" />
<item index="1" class="java.lang.String" itemvalue="Application.javadoc" />
<item index="2" class="java.lang.String" itemvalue="Application.javap" />
<item index="3" class="java.lang.String" itemvalue="Application.javah" />
<item index="4" class="java.lang.String" itemvalue="Application.jdeps" />
<item index="5" class="java.lang.String" itemvalue="Application.sjavac" />
<item index="6" class="java.lang.String" itemvalue="Remote.jtreg" />
</list>
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" />
<buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
<runInBackground value="false" />
<targetFilters>
<filter targetName="build-all-tools" isVisible="true" />
<filter targetName="build-all-classes" isVisible="true" />
<filter targetName="clean" isVisible="true" />
<filter targetName="jtreg" isVisible="true" />
<filter targetName="jtreg-debug" isVisible="true" />
<filter targetName="checkstyle" isVisible="true" />
</targetFilters>
<viewClosedWhenNoErrors value="false" />
<expanded value="false" />
</buildFile>
</component>
</project>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -39,7 +39,15 @@ package com.sun.javadoc;
*/ */
public interface AnnotatedType extends Type { public interface AnnotatedType extends Type {
/**
* Returns the annotations associated with this type.
* @return the annotations associated with this type
*/
AnnotationDesc[] annotations(); AnnotationDesc[] annotations();
/**
* Returns the underlying type.
* @return the underlying type
*/
Type underlyingType(); Type underlyingType();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,10 +35,36 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface AttributeTree extends DocTree { public interface AttributeTree extends DocTree {
/**
* The kind of an attribute value.
*/
@jdk.Exported @jdk.Exported
enum ValueKind { EMPTY, UNQUOTED, SINGLE, DOUBLE } enum ValueKind {
/** The attribute value is empty. */
EMPTY,
/** The attribute value is not enclosed in quotes. */
UNQUOTED,
/** The attribute value is enclosed in single quotation marks. */
SINGLE,
/** The attribute value is enclosed in double quotation marks. */
DOUBLE
}
/**
* Returns the name of the attribute.
* @return the name of the attribute
*/
Name getName(); Name getName();
/**
* Returns the kind of the attribute.
* @return the kind of the attribute.
*/
ValueKind getValueKind(); ValueKind getValueKind();
/**
* Returns the value of the attribute, or {@code null} if the kind is EMPTY.
* @return the value of the attribute.
*/
List<? extends DocTree> getValue(); List<? extends DocTree> getValue();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface AuthorTree extends BlockTagTree { public interface AuthorTree extends BlockTagTree {
/**
* Returns the name of the author.
* @return the name
*/
List<? extends DocTree> getName(); List<? extends DocTree> getName();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -33,5 +33,9 @@ package com.sun.source.doctree;
*/ */
@jdk.Exported @jdk.Exported
public interface BlockTagTree extends DocTree { public interface BlockTagTree extends DocTree {
/**
* Returns the name of the tag.
* @return the name of the tag
*/
String getTagName(); String getTagName();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,10 @@ package com.sun.source.doctree;
*/ */
@jdk.Exported @jdk.Exported
public interface CommentTree extends DocTree { public interface CommentTree extends DocTree {
/**
* Returns the text of the comment.
* @return the comment text
*/
String getBody(); String getBody();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface DeprecatedTree extends BlockTagTree { public interface DeprecatedTree extends BlockTagTree {
/**
* Returns the description explaining why an item is deprecated.
* @return the description
*/
List<? extends DocTree> getBody(); List<? extends DocTree> getBody();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,7 +37,22 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface DocCommentTree extends DocTree { public interface DocCommentTree extends DocTree {
/**
* Returns the first sentence of a documentation comment.
* @return the first sentence of a documentation comment
*/
List<? extends DocTree> getFirstSentence(); List<? extends DocTree> getFirstSentence();
/**
* Returns the body of a documentation comment,
* appearing after the first sentence, and before any block tags.
* @return the body of a documentation comment
*/
List<? extends DocTree> getBody(); List<? extends DocTree> getBody();
/**
* Returns the block tags for a documentation comment.
* @return the block tags of a documentation comment
*/
List<? extends DocTree> getBlockTags(); List<? extends DocTree> getBlockTags();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,6 +32,9 @@ package com.sun.source.doctree;
*/ */
@jdk.Exported @jdk.Exported
public interface DocTree { public interface DocTree {
/**
* Enumerates all kinds of trees.
*/
@jdk.Exported @jdk.Exported
enum Kind { enum Kind {
/** /**
@ -227,6 +230,9 @@ public interface DocTree {
*/ */
OTHER; OTHER;
/**
* The name of the tag, if any, associated with this kind of node.
*/
public final String tagName; public final String tagName;
Kind() { Kind() {
@ -239,7 +245,7 @@ public interface DocTree {
} }
/** /**
* Gets the kind of this tree. * Returns the kind of this tree.
* *
* @return the kind of this tree. * @return the kind of this tree.
*/ */
@ -251,6 +257,9 @@ public interface DocTree {
* *
* @param <R> result type of this operation. * @param <R> result type of this operation.
* @param <D> type of additional data. * @param <D> type of additional data.
* @param visitor the visitor to be called
* @param data a parameter value to be passed to the visitor method
* @return the value returned from the visitor method
*/ */
<R, D> R accept(DocTreeVisitor<R,D> visitor, D data); <R, D> R accept(DocTreeVisitor<R,D> visitor, D data);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -56,33 +56,238 @@ package com.sun.source.doctree;
*/ */
@jdk.Exported @jdk.Exported
public interface DocTreeVisitor<R,P> { public interface DocTreeVisitor<R,P> {
/**
* Visits an AttributeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitAttribute(AttributeTree node, P p); R visitAttribute(AttributeTree node, P p);
/**
* Visits an AuthorTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitAuthor(AuthorTree node, P p); R visitAuthor(AuthorTree node, P p);
/**
* Visits a CommentTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitComment(CommentTree node, P p); R visitComment(CommentTree node, P p);
/**
* Visits a DeprecatedTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitDeprecated(DeprecatedTree node, P p); R visitDeprecated(DeprecatedTree node, P p);
/**
* Visits a DocCommentTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitDocComment(DocCommentTree node, P p); R visitDocComment(DocCommentTree node, P p);
/**
* Visits a DocRootTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitDocRoot(DocRootTree node, P p); R visitDocRoot(DocRootTree node, P p);
/**
* Visits an EndElementTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitEndElement(EndElementTree node, P p); R visitEndElement(EndElementTree node, P p);
/**
* Visits an EntityTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitEntity(EntityTree node, P p); R visitEntity(EntityTree node, P p);
/**
* Visits an ErroneousTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitErroneous(ErroneousTree node, P p); R visitErroneous(ErroneousTree node, P p);
/**
* Visits an IdentifierTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitIdentifier(IdentifierTree node, P p); R visitIdentifier(IdentifierTree node, P p);
/**
* Visits an InheritDocTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitInheritDoc(InheritDocTree node, P p); R visitInheritDoc(InheritDocTree node, P p);
/**
* Visits a LinkTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitLink(LinkTree node, P p); R visitLink(LinkTree node, P p);
/**
* Visits an LiteralTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitLiteral(LiteralTree node, P p); R visitLiteral(LiteralTree node, P p);
/**
* Visits a ParamTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitParam(ParamTree node, P p); R visitParam(ParamTree node, P p);
/**
* Visits a ReferenceTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitReference(ReferenceTree node, P p); R visitReference(ReferenceTree node, P p);
/**
* Visits a ReturnTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitReturn(ReturnTree node, P p); R visitReturn(ReturnTree node, P p);
/**
* Visits a SeeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitSee(SeeTree node, P p); R visitSee(SeeTree node, P p);
/**
* Visits a SerialTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitSerial(SerialTree node, P p); R visitSerial(SerialTree node, P p);
/**
* Visits a SerialDataTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitSerialData(SerialDataTree node, P p); R visitSerialData(SerialDataTree node, P p);
/**
* Visits a SerialFieldTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitSerialField(SerialFieldTree node, P p); R visitSerialField(SerialFieldTree node, P p);
/**
* Visits a SinceTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitSince(SinceTree node, P p); R visitSince(SinceTree node, P p);
/**
* Visits a StartElementTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitStartElement(StartElementTree node, P p); R visitStartElement(StartElementTree node, P p);
/**
* Visits a TextTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitText(TextTree node, P p); R visitText(TextTree node, P p);
/**
* Visits a ThrowsTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitThrows(ThrowsTree node, P p); R visitThrows(ThrowsTree node, P p);
/**
* Visits an UnknownBlockTagTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitUnknownBlockTag(UnknownBlockTagTree node, P p); R visitUnknownBlockTag(UnknownBlockTagTree node, P p);
/**
* Visits an UnknownInlineTagTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitUnknownInlineTag(UnknownInlineTagTree node, P p); R visitUnknownInlineTag(UnknownInlineTagTree node, P p);
/**
* Visits a ValueTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitValue(ValueTree node, P p); R visitValue(ValueTree node, P p);
/**
* Visits a VersionTreeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitVersion(VersionTree node, P p); R visitVersion(VersionTree node, P p);
/**
* Visits an unknown type of DocTree node.
* This can occur if the set of tags evolves and new kinds
* of nodes are added to the {@code DocTree} hierarchy.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitOther(DocTree node, P p); R visitOther(DocTree node, P p);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface EndElementTree extends DocTree { public interface EndElementTree extends DocTree {
/**
* Returns the name of this element.
* @return the name
*/
Name getName(); Name getName();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,11 +32,17 @@ import javax.lang.model.element.Name;
* A tree node for an HTML entity. * A tree node for an HTML entity.
* *
* <p> * <p>
* &amp; name ; * &amp; name ; <br>
* &amp; # digits ; <br>
* &amp; #X hex-digits ;
* *
* @since 1.8 * @since 1.8
*/ */
@jdk.Exported @jdk.Exported
public interface EntityTree extends DocTree { public interface EntityTree extends DocTree {
/**
* Returns the name or value of the entity.
* @return the name or value of the entity
*/
Name getName(); Name getName();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,7 @@ import javax.tools.JavaFileObject;
@jdk.Exported @jdk.Exported
public interface ErroneousTree extends TextTree { public interface ErroneousTree extends TextTree {
/** /**
* Gets a diagnostic object giving details about * Returns a diagnostic object giving details about
* the reason the body text is in error. * the reason the body text is in error.
* *
* @return a diagnostic * @return a diagnostic

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface IdentifierTree extends DocTree { public interface IdentifierTree extends DocTree {
/**
* Returns the name of the identifier.
* @return the name
*/
Name getName(); Name getName();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -33,5 +33,9 @@ package com.sun.source.doctree;
*/ */
@jdk.Exported @jdk.Exported
public interface InlineTagTree extends DocTree { public interface InlineTagTree extends DocTree {
/**
* Returns the name of the tag.
* @return the name of the tag
*/
String getTagName(); String getTagName();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,15 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface LinkTree extends InlineTagTree { public interface LinkTree extends InlineTagTree {
/**
* Returns the reference of a link.
* @return the reference
*/
ReferenceTree getReference(); ReferenceTree getReference();
/**
* Returns the label, if any, of the link.
* @return the label
*/
List<? extends DocTree> getLabel(); List<? extends DocTree> getLabel();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,5 +36,9 @@ package com.sun.source.doctree;
*/ */
@jdk.Exported @jdk.Exported
public interface LiteralTree extends InlineTagTree { public interface LiteralTree extends InlineTagTree {
/**
* Returns the body of the {@code @code} or {@code @literal} tag.
* @return the body of the tag
*/
TextTree getBody(); TextTree getBody();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,7 +37,21 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface ParamTree extends BlockTagTree { public interface ParamTree extends BlockTagTree {
/**
* Returns true if this is documenting a type parameter.
* @return true if this is documenting a type parameter
*/
boolean isTypeParameter(); boolean isTypeParameter();
/**
* Returns the name of the parameter.
* @return the name of the parameter
*/
IdentifierTree getName(); IdentifierTree getName();
/**
* Returns the description of the parameter.
* @return the description
*/
List<? extends DocTree> getDescription(); List<? extends DocTree> getDescription();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,14 +26,20 @@
package com.sun.source.doctree; package com.sun.source.doctree;
/** /**
* A tree node to a reference to a Java language element. * A tree node for a reference to a Java language element.
* *
* <p> * <p>
* package.class#field * package.class#field
* package.class#method(<i>arg-types</i>)
* *
* @since 1.8 * @since 1.8
*/ */
@jdk.Exported @jdk.Exported
public interface ReferenceTree extends DocTree { public interface ReferenceTree extends DocTree {
/**
* Returns the signature of the Java language element being referenced,
* as found in {@code @see} and similar nodes.
* @return the signature.
*/
String getSignature(); String getSignature();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface ReturnTree extends BlockTagTree { public interface ReturnTree extends BlockTagTree {
/**
* Returns the description of the return value of a method.
* @return the description
*/
List<? extends DocTree> getDescription(); List<? extends DocTree> getDescription();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -40,5 +40,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface SeeTree extends BlockTagTree { public interface SeeTree extends BlockTagTree {
/**
* Returns the reference.
* @return the reference
*/
List<? extends DocTree> getReference(); List<? extends DocTree> getReference();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface SerialDataTree extends BlockTagTree { public interface SerialDataTree extends BlockTagTree {
/**
* Returns the description of the serial data.
* @return the description
*/
List<? extends DocTree> getDescription(); List<? extends DocTree> getDescription();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,7 +37,21 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface SerialFieldTree extends BlockTagTree { public interface SerialFieldTree extends BlockTagTree {
/**
* Returns the name of the serial field.
* @return the name of the serial field
*/
IdentifierTree getName(); IdentifierTree getName();
/**
* Returns the type of the serial field.
* @return the type of the serial field
*/
ReferenceTree getType(); ReferenceTree getType();
/**
* Returns the description of the serial field.
* @return the description of the serial field
*/
List<? extends DocTree> getDescription(); List<? extends DocTree> getDescription();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,10 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface SerialTree extends BlockTagTree { public interface SerialTree extends BlockTagTree {
/**
* Returns the description of the field, or the word
* "include" or "exclude".
* @return the description of the field
*/
List<? extends DocTree> getDescription(); List<? extends DocTree> getDescription();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface SinceTree extends BlockTagTree { public interface SinceTree extends BlockTagTree {
/**
* Returns the text explaining the availability of the item being documented.
* @return the text
*/
List<? extends DocTree> getBody(); List<? extends DocTree> getBody();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,22 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface StartElementTree extends DocTree { public interface StartElementTree extends DocTree {
/**
* Returns the name of the element.
* @return the name
*/
Name getName(); Name getName();
/**
* Returns any attributes defined by this element.
* @return the attributes
*/
List<? extends DocTree> getAttributes(); List<? extends DocTree> getAttributes();
/**
* Returns true if this is a self-closing element,
* as indicated by a "/" before the closing "&gt;".
* @return true if this is a self-closing element
*/
boolean isSelfClosing(); boolean isSelfClosing();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,5 +32,9 @@ package com.sun.source.doctree;
*/ */
@jdk.Exported @jdk.Exported
public interface TextTree extends DocTree { public interface TextTree extends DocTree {
/**
* Returns the text.
* @return the text
*/
String getBody(); String getBody();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -40,6 +40,16 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface ThrowsTree extends BlockTagTree { public interface ThrowsTree extends BlockTagTree {
/**
* Returns a name of the exception being documented.
* @return the name of the exception
*/
ReferenceTree getExceptionName(); ReferenceTree getExceptionName();
/**
* Returns the description of the reasons why the
* exception may be thrown.
* @return the description
*/
List<? extends DocTree> getDescription(); List<? extends DocTree> getDescription();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface UnknownBlockTagTree extends BlockTagTree { public interface UnknownBlockTagTree extends BlockTagTree {
/**
* Returns the content of an unrecognized block tag.
* @return the content
*/
List<? extends DocTree> getContent(); List<? extends DocTree> getContent();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,5 +37,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface UnknownInlineTagTree extends InlineTagTree { public interface UnknownInlineTagTree extends InlineTagTree {
/**
* Returns the content of an unrecognized inline tag.
* @return the content
*/
List<? extends DocTree> getContent(); List<? extends DocTree> getContent();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,5 +35,9 @@ package com.sun.source.doctree;
*/ */
@jdk.Exported @jdk.Exported
public interface ValueTree extends InlineTagTree { public interface ValueTree extends InlineTagTree {
/**
* Returns the reference to the value.
* @return the reference
*/
ReferenceTree getReference(); ReferenceTree getReference();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,5 +38,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface VersionTree extends BlockTagTree { public interface VersionTree extends BlockTagTree {
/**
* Returns the body of the tag.
* @return the body
*/
List<? extends DocTree> getBody(); List<? extends DocTree> getBody();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ package com.sun.source.tree;
import java.util.List; import java.util.List;
/** /**
* A tree node for an annotated type * A tree node for an annotated type.
* *
* For example: * For example:
* <pre> * <pre>
@ -43,6 +43,15 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface AnnotatedTypeTree extends ExpressionTree { public interface AnnotatedTypeTree extends ExpressionTree {
/**
* Returns the annotations associated with this type expression.
* @return the annotations
*/
List<? extends AnnotationTree> getAnnotations(); List<? extends AnnotationTree> getAnnotations();
/**
* Returns the underlying type with which the annotations are associated.
* @return the underlying type
*/
ExpressionTree getUnderlyingType(); ExpressionTree getUnderlyingType();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -44,6 +44,15 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface AnnotationTree extends ExpressionTree { public interface AnnotationTree extends ExpressionTree {
/**
* Returns the annotation type.
* @return the annotation type
*/
Tree getAnnotationType(); Tree getAnnotationType();
/**
* Returns the arguments, if any, for the annotation.
* @return the arguments for the annotation type
*/
List<? extends ExpressionTree> getArguments(); List<? extends ExpressionTree> getArguments();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,6 +41,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface ArrayAccessTree extends ExpressionTree { public interface ArrayAccessTree extends ExpressionTree {
/**
* Returns the expression for the array being accessed.
* @return the array
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
/**
* Returns the expression for the index.
* @return the index
*/
ExpressionTree getIndex(); ExpressionTree getIndex();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,5 +41,9 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface ArrayTypeTree extends Tree { public interface ArrayTypeTree extends Tree {
/**
* Returns the element type of this array type.
* @return the element type
*/
Tree getType(); Tree getType();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for an 'assert' statement. * A tree node for an {@code assert} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -43,6 +43,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface AssertTree extends StatementTree { public interface AssertTree extends StatementTree {
/**
* Returns the condition being asserted.
* @return the condition
*/
ExpressionTree getCondition(); ExpressionTree getCondition();
/**
* Returns the detail expression.
* @return the detail expression
*/
ExpressionTree getDetail(); ExpressionTree getDetail();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,6 +41,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface AssignmentTree extends ExpressionTree { public interface AssignmentTree extends ExpressionTree {
/**
* Returns the variable being assigned to.
* @return the variable
*/
ExpressionTree getVariable(); ExpressionTree getVariable();
/**
* Returns the expression being assigned to the variable.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,6 +42,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface BinaryTree extends ExpressionTree { public interface BinaryTree extends ExpressionTree {
/**
* Returns the left (first) operand of the expression.
* @return the left operand
*/
ExpressionTree getLeftOperand(); ExpressionTree getLeftOperand();
/**
* Returns the right (second) operand of the expression.
* @return the right operand
*/
ExpressionTree getRightOperand(); ExpressionTree getRightOperand();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,6 +47,15 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface BlockTree extends StatementTree { public interface BlockTree extends StatementTree {
/**
* Returns true if and only if this is a static initializer block.
* @return true if this is a static initializer block
*/
boolean isStatic(); boolean isStatic();
/**
* Returns the statements comprising this block.
* @return the statements
*/
List<? extends StatementTree> getStatements(); List<? extends StatementTree> getStatements();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ package com.sun.source.tree;
import javax.lang.model.element.Name; import javax.lang.model.element.Name;
/** /**
* A tree node for a 'break' statement. * A tree node for a {@code break} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -45,5 +45,9 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface BreakTree extends StatementTree { public interface BreakTree extends StatementTree {
/**
* Returns the label for this {@code break} statement.
* @return the label
*/
Name getLabel(); Name getLabel();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ package com.sun.source.tree;
import java.util.List; import java.util.List;
/** /**
* A tree node for a 'case' in a 'switch' statement. * A tree node for a {@code case} in a {@code switch} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -48,8 +48,15 @@ import java.util.List;
@jdk.Exported @jdk.Exported
public interface CaseTree extends Tree { public interface CaseTree extends Tree {
/** /**
* @return null if and only if this Case is {@code default:} * Returns the expression for the case, or
* {@code null} if this is the default case.
* @return the expression for the case, or null
*/ */
ExpressionTree getExpression(); ExpressionTree getExpression();
/**
* Returns the statements labeled by the case.
* @return the statements labeled by the case
*/
List<? extends StatementTree> getStatements(); List<? extends StatementTree> getStatements();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for a 'catch' block in a 'try' statement. * A tree node for a {@code catch} block in a {@code try} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -42,6 +42,18 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface CatchTree extends Tree { public interface CatchTree extends Tree {
/**
* Returns the catch variable.
* A multi-catch variable will have a
* {@link UnionTypeTree UnionTypeTree}
* as the type of the variable.
* @return the catch variable
*/
VariableTree getParameter(); VariableTree getParameter();
/**
* Returns the catch block.
* @return the catch block
*/
BlockTree getBlock(); BlockTree getBlock();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,10 +50,41 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface ClassTree extends StatementTree { public interface ClassTree extends StatementTree {
/**
* Returns the modifiers, including any annotations,
* for this type declaration.
* @return the modifiers
*/
ModifiersTree getModifiers(); ModifiersTree getModifiers();
/**
* Returns the simple name of this type declaration.
* @return the simple name
*/
Name getSimpleName(); Name getSimpleName();
/**
* Returns any type parameters of this type declaration.
* @return the type parameters
*/
List<? extends TypeParameterTree> getTypeParameters(); List<? extends TypeParameterTree> getTypeParameters();
/**
* Returns the supertype of this type declaration,
* or {@code null} if none is provided.
* @return the supertype
*/
Tree getExtendsClause(); Tree getExtendsClause();
/**
* Returns the interfaces implemented by this type declaration.
* @return the interfaces
*/
List<? extends Tree> getImplementsClause(); List<? extends Tree> getImplementsClause();
/**
* Returns the members declared in this type declaration.
* @return the members
*/
List<? extends Tree> getMembers(); List<? extends Tree> getMembers();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -39,21 +39,53 @@ import javax.tools.JavaFileObject;
*/ */
@jdk.Exported @jdk.Exported
public interface CompilationUnitTree extends Tree { public interface CompilationUnitTree extends Tree {
/**
* Returns the annotations listed on any package declaration
* at the head of this compilation unit, or {@code null} if there
* is no package declaration.
* @return the package annotations
*/
List<? extends AnnotationTree> getPackageAnnotations(); List<? extends AnnotationTree> getPackageAnnotations();
/**
* Returns the name contained in any package declaration
* at the head of this compilation unit, or {@code null} if there
* is no package declaration.
* @return the package name
*/
ExpressionTree getPackageName(); ExpressionTree getPackageName();
/** /**
* Return the PackageTree associated with this compilation unit. * Returns the package tree associated with this compilation unit,
* or {@code null} if there is no package declaration.
* @return the package tree
* @since 1.9 * @since 1.9
*/ */
PackageTree getPackage(); PackageTree getPackage();
/**
* Returns the import declarations appearing in this compilation unit.
* @return the import declarations
*/
List<? extends ImportTree> getImports(); List<? extends ImportTree> getImports();
/**
* Returns the type declarations appearing in this compilation unit.
* The list may also include empty statements resulting from
* extraneous semicolons.
* @return the type declarations
*/
List<? extends Tree> getTypeDecls(); List<? extends Tree> getTypeDecls();
/**
* Returns the file object containing the source for this compilation unit.
* @return the file object
*/
JavaFileObject getSourceFile(); JavaFileObject getSourceFile();
/** /**
* Gets the line map for this compilation unit, if available. * Returns the line map for this compilation unit, if available.
* Returns null if the line map is not available. * Returns {@code null} if the line map is not available.
* @return the line map for this compilation unit * @return the line map for this compilation unit
*/ */
LineMap getLineMap(); LineMap getLineMap();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,6 +42,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface CompoundAssignmentTree extends ExpressionTree { public interface CompoundAssignmentTree extends ExpressionTree {
/**
* Returns the variable on the left hand side of the compound assignment.
* @return the variable
*/
ExpressionTree getVariable(); ExpressionTree getVariable();
/**
* Returns the expression on the right hand side of the compound assignment.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,7 +41,21 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface ConditionalExpressionTree extends ExpressionTree { public interface ConditionalExpressionTree extends ExpressionTree {
/**
* Returns the condition.
* @return the condition
*/
ExpressionTree getCondition(); ExpressionTree getCondition();
/**
* Returns the expression to be evaluated if the condition is true.
* @return the expression to be evaluated if the condition is true
*/
ExpressionTree getTrueExpression(); ExpressionTree getTrueExpression();
/**
* Returns the expression to be evaluated if the condition is false.
* @return the expression to be evaluated if the condition is false
*/
ExpressionTree getFalseExpression(); ExpressionTree getFalseExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ package com.sun.source.tree;
import javax.lang.model.element.Name; import javax.lang.model.element.Name;
/** /**
* A tree node for a 'continue' statement. * A tree node for a {@code continue} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -44,5 +44,9 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface ContinueTree extends StatementTree { public interface ContinueTree extends StatementTree {
/**
* Returns the label for this {@code continue} statement.
* @return the label
*/
Name getLabel(); Name getLabel();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for a 'do' statement. * A tree node for a {@code do} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -43,6 +43,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface DoWhileLoopTree extends StatementTree { public interface DoWhileLoopTree extends StatementTree {
/**
* Returns the condition of the loop.
* @return the condition
*/
ExpressionTree getCondition(); ExpressionTree getCondition();
/**
* Returns the body of the loop.
* @return the body of the loop
*/
StatementTree getStatement(); StatementTree getStatement();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for an "enhanced" 'for' loop statement. * A tree node for an "enhanced" {@code for} loop statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -42,7 +42,21 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface EnhancedForLoopTree extends StatementTree { public interface EnhancedForLoopTree extends StatementTree {
/**
* Returns the control variable for the loop.
* @return the control variable
*/
VariableTree getVariable(); VariableTree getVariable();
/**
* Returns the expression yielding the values for the control variable.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
/**
* Returns the body of the loop.
* @return the body of the loop
*/
StatementTree getStatement(); StatementTree getStatement();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,5 +36,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface ErroneousTree extends ExpressionTree { public interface ErroneousTree extends ExpressionTree {
/**
* Returns any trees that were saved in this node.
* @return the trees
*/
List<? extends Tree> getErrorTrees(); List<? extends Tree> getErrorTrees();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,5 +41,9 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface ExpressionStatementTree extends StatementTree { public interface ExpressionStatementTree extends StatementTree {
/**
* Returns the expression constituting this statement.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ package com.sun.source.tree;
import java.util.List; import java.util.List;
/** /**
* A tree node for a basic 'for' loop statement. * A tree node for a basic {@code for} loop statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -44,8 +44,30 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface ForLoopTree extends StatementTree { public interface ForLoopTree extends StatementTree {
/**
* Returns any initializers of the {@code for} statement.
* The result will be an empty list if there are
* no initializers
* @return the initializers
*/
List<? extends StatementTree> getInitializer(); List<? extends StatementTree> getInitializer();
/**
* Returns the condition of the {@code for} statement.
* May be {@code null} if there is no condition.
* @return the condition
*/
ExpressionTree getCondition(); ExpressionTree getCondition();
/**
* Returns any update expressions of the {@code for} statement.
* @return the update expressions
*/
List<? extends ExpressionStatementTree> getUpdate(); List<? extends ExpressionStatementTree> getUpdate();
/**
* Returns the body of the {@code for} statement.
* @return the body
*/
StatementTree getStatement(); StatementTree getStatement();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,5 +43,9 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface IdentifierTree extends ExpressionTree { public interface IdentifierTree extends ExpressionTree {
/**
* Returns the name of the identifier.
* @return the name
*/
Name getName(); Name getName();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for an 'if' statement. * A tree node for an {@code if} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -47,10 +47,22 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface IfTree extends StatementTree { public interface IfTree extends StatementTree {
ExpressionTree getCondition();
StatementTree getThenStatement();
/** /**
* @return null if this if statement has no else branch. * Returns the condition of the if-statement.
* @return the condition
*/
ExpressionTree getCondition();
/**
* Returns the statement to be executed if the condition is true
* @return the statement to be executed if the condition is true
*/
StatementTree getThenStatement();
/**
* Returns the statement to be executed if the condition is false,
* or {@code null} if there is no such statement.
* @return the statement to be executed if the condition is false
*/ */
StatementTree getElseStatement(); StatementTree getElseStatement();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,10 +43,19 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface ImportTree extends Tree { public interface ImportTree extends Tree {
boolean isStatic();
/** /**
* @return a qualified identifier ending in "*" if and only if * Returns true if this is a static import declaration.
* this is an import-on-demand. * @return true if this is a static import
*/
boolean isStatic();
/**
* Returns the qualified identifier for the declaration(s)
* being imported.
* If this is an import-on-demand declaration, the
* qualified identifier will end in "*".
* @return a qualified identifier, ending in "*" if and only if
* this is an import-on-demand
*/ */
Tree getQualifiedIdentifier(); Tree getQualifiedIdentifier();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for an 'instanceof' expression. * A tree node for an {@code instanceof} expression.
* *
* For example: * For example:
* <pre> * <pre>
@ -41,6 +41,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface InstanceOfTree extends ExpressionTree { public interface InstanceOfTree extends ExpressionTree {
/**
* Returns the expression to be tested.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
/**
* Returns the type for which to check.
* @return the type
*/
Tree getType(); Tree getType();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,5 +36,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface IntersectionTypeTree extends Tree { public interface IntersectionTypeTree extends Tree {
/**
* Returns the bounds of the type.
* @return the bounds
*/
List<? extends Tree> getBounds(); List<? extends Tree> getBounds();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,15 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface LabeledStatementTree extends StatementTree { public interface LabeledStatementTree extends StatementTree {
/**
* Returns the label.
* @return the label
*/
Name getLabel(); Name getLabel();
/**
* Returns the statement that is labeled.
* @return the statement
*/
StatementTree getStatement(); StatementTree getStatement();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,8 +41,11 @@ import java.util.List;
public interface LambdaExpressionTree extends ExpressionTree { public interface LambdaExpressionTree extends ExpressionTree {
/** /**
* Lambda expressions come in two forms: (i) expression lambdas, whose body * Lambda expressions come in two forms:
* is an expression, and (ii) statement lambdas, whose body is a block * <ul compact>
* <li> expression lambdas, whose body is an expression, and
* <li> statement lambdas, whose body is a block
* </ul>
*/ */
@jdk.Exported @jdk.Exported
public enum BodyKind { public enum BodyKind {
@ -52,7 +55,21 @@ public interface LambdaExpressionTree extends ExpressionTree {
STATEMENT STATEMENT
} }
/**
* Returns the parameters of this lambda expression.
* @return the parameters
*/
List<? extends VariableTree> getParameters(); List<? extends VariableTree> getParameters();
/**
* Returns the body of the lambda expression.
* @return the body
*/
Tree getBody(); Tree getBody();
/**
* Returns the kind of the body of the lambda expression.
* @return the kind of the body
*/
BodyKind getBodyKind(); BodyKind getBodyKind();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,7 @@ package com.sun.source.tree;
@jdk.Exported @jdk.Exported
public interface LineMap { public interface LineMap {
/** /**
* Find the start position of a line. * Finds the start position of a line.
* *
* @param line line number (beginning at 1) * @param line line number (beginning at 1)
* @return position of first character in line * @return position of first character in line
@ -45,7 +45,7 @@ public interface LineMap {
long getStartPosition(long line); long getStartPosition(long line);
/** /**
* Find the position corresponding to a (line,column). * Finds the position corresponding to a (line,column).
* *
* @param line line number (beginning at 1) * @param line line number (beginning at 1)
* @param column tab-expanded column number (beginning 1) * @param column tab-expanded column number (beginning 1)
@ -58,7 +58,7 @@ public interface LineMap {
long getPosition(long line, long column); long getPosition(long line, long column);
/** /**
* Find the line containing a position; a line termination * Finds the line containing a position; a line termination
* character is on the line it terminates. * character is on the line it terminates.
* *
* @param pos character offset of the position * @param pos character offset of the position
@ -67,7 +67,7 @@ public interface LineMap {
long getLineNumber(long pos); long getLineNumber(long pos);
/** /**
* Find the column for a character position. * Finds the column for a character position.
* Tab characters preceding the position on the same line * Tab characters preceding the position on the same line
* will be expanded when calculating the column number. * will be expanded when calculating the column number.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,5 +42,10 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface LiteralTree extends ExpressionTree { public interface LiteralTree extends ExpressionTree {
/**
* Returns the value of the literal expression.
* The value will be a boxed primitive value, a String, or {@code null}.
* @return the value
*/
Object getValue(); Object getValue();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,13 +48,33 @@ public interface MemberReferenceTree extends ExpressionTree {
*/ */
@jdk.Exported @jdk.Exported
public enum ReferenceMode { public enum ReferenceMode {
/** enum constant for method references */ /** enum constant for method references. */
INVOKE, INVOKE,
/** enum constant for constructor references */ /** enum constant for constructor references. */
NEW NEW
} }
/**
* Returns the mode of the reference.
* @return the mode
*/
ReferenceMode getMode(); ReferenceMode getMode();
/**
* Returns the qualifier expression for the reference.
* @return the qualifier expression
*/
ExpressionTree getQualifierExpression(); ExpressionTree getQualifierExpression();
/**
* Returns the name of the reference.
* @return the name
*/
Name getName(); Name getName();
/**
* Returns the type arguments for the reference.
* @return the type arguments
*/
List<? extends ExpressionTree> getTypeArguments(); List<? extends ExpressionTree> getTypeArguments();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,15 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface MemberSelectTree extends ExpressionTree { public interface MemberSelectTree extends ExpressionTree {
/**
* Returns the expression for which a member is to be selected.
* @return the expression.
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
/**
* Returns the name of the member to be selected.
* @return the member
*/
Name getIdentifier(); Name getIdentifier();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -45,7 +45,21 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface MethodInvocationTree extends ExpressionTree { public interface MethodInvocationTree extends ExpressionTree {
/**
* Returns the type arguments for this method invocation.
* @return the type arguments
*/
List<? extends Tree> getTypeArguments(); List<? extends Tree> getTypeArguments();
/**
* Returns the expression identifying the method to be invoked.
* @return the method selection expression
*/
ExpressionTree getMethodSelect(); ExpressionTree getMethodSelect();
/**
* Returns the arguments for the method invocation.
* @return the arguments
*/
List<? extends ExpressionTree> getArguments(); List<? extends ExpressionTree> getArguments();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,21 +48,63 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface MethodTree extends Tree { public interface MethodTree extends Tree {
/**
* Returns the modifiers, including any annotations for the method being declared.
* @return the modifiers
*/
ModifiersTree getModifiers(); ModifiersTree getModifiers();
/**
* Returns the name of the method being declared.
* @return the name
*/
Name getName(); Name getName();
/**
* Returns the return type of the method being declared.
* Returns {@code null} for a constructor.
* @return the return type
*/
Tree getReturnType(); Tree getReturnType();
/**
* Returns the type parameters of the method being declared.
* @return the type parameters
*/
List<? extends TypeParameterTree> getTypeParameters(); List<? extends TypeParameterTree> getTypeParameters();
/**
* Returns the parameters of the method being declared.
* @return the parameters
*/
List<? extends VariableTree> getParameters(); List<? extends VariableTree> getParameters();
/** /**
* Return an explicit receiver parameter ("this" parameter). * Return an explicit receiver parameter ("this" parameter),
* or {@code null} if none.
* *
* @return an explicit receiver parameter ("this" parameter) * @return an explicit receiver parameter ("this" parameter)
* @since 1.8 * @since 1.8
*/ */
VariableTree getReceiverParameter(); VariableTree getReceiverParameter();
/**
* Returns the exceptions listed as being thrown by this method.
* @return the exceptions
*/
List<? extends ExpressionTree> getThrows(); List<? extends ExpressionTree> getThrows();
/**
* Returns the method body, or {@code null} if this is an abstract or native method.
* @return the method body
*/
BlockTree getBody(); BlockTree getBody();
/**
* Returns the default value, if this is an element within
* an annotation type declaration.
* Returns {@code null} otherwise.
* @return the default value
*/
Tree getDefaultValue(); // for annotation types Tree getDefaultValue(); // for annotation types
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,6 +47,15 @@ import javax.lang.model.element.Modifier;
*/ */
@jdk.Exported @jdk.Exported
public interface ModifiersTree extends Tree { public interface ModifiersTree extends Tree {
/**
* Returns the flags in this modifiers tree.
* @return the flags
*/
Set<Modifier> getFlags(); Set<Modifier> getFlags();
/**
* Returns the annotations in this modifiers tree.
* @return the annotations
*/
List<? extends AnnotationTree> getAnnotations(); List<? extends AnnotationTree> getAnnotations();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -45,9 +45,37 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface NewArrayTree extends ExpressionTree { public interface NewArrayTree extends ExpressionTree {
/**
* Returns the base type of the expression.
* May be {@code null} for an array initializer expression.
* @return the base type
*/
Tree getType(); Tree getType();
/**
* Returns the dimension expressions for the type.
*
* @return the dimension expressions
*/
List<? extends ExpressionTree> getDimensions(); List<? extends ExpressionTree> getDimensions();
/**
* Returns the initializer expressions.
*
* @return the initializer expressions
*/
List<? extends ExpressionTree> getInitializers(); List<? extends ExpressionTree> getInitializers();
/**
* Returns the annotations on the base type.
* @return the annotations
*/
List<? extends AnnotationTree> getAnnotations(); List<? extends AnnotationTree> getAnnotations();
/**
* Returns the annotations on each of the dimension
* expressions.
* @return the annotations on the dimensions expressions
*/
List<? extends List<? extends AnnotationTree>> getDimAnnotations(); List<? extends List<? extends AnnotationTree>> getDimAnnotations();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,9 +50,34 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface NewClassTree extends ExpressionTree { public interface NewClassTree extends ExpressionTree {
/**
* Returns the enclosing expression, or {@code null} if none.
* @return the enclosing expression
*/
ExpressionTree getEnclosingExpression(); ExpressionTree getEnclosingExpression();
/**
* Returns the type arguments for the object being created.
* @return the type arguments
*/
List<? extends Tree> getTypeArguments(); List<? extends Tree> getTypeArguments();
/**
* Returns the name of the class being instantiated.
* @return the name
*/
ExpressionTree getIdentifier(); ExpressionTree getIdentifier();
/**
* Returns the arguments for the constructor to be invoked.
* @return the arguments
*/
List<? extends ExpressionTree> getArguments(); List<? extends ExpressionTree> getArguments();
/**
* Returns the class body if an anonymous class is being
* instantiated, and {@code null} otherwise.
* @return the class body
*/
ClassTree getClassBody(); ClassTree getClassBody();
} }

View File

@ -37,6 +37,15 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface PackageTree extends Tree { public interface PackageTree extends Tree {
/**
* Returns the annotations associated with this package declaration.
* @return the annotations
*/
List<? extends AnnotationTree> getAnnotations(); List<? extends AnnotationTree> getAnnotations();
/**
* Returns the name of the package being declared.
* @return the name
*/
ExpressionTree getPackageName(); ExpressionTree getPackageName();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,15 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface ParameterizedTypeTree extends Tree { public interface ParameterizedTypeTree extends Tree {
/**
* Returns the base type.
* @return the base type
*/
Tree getType(); Tree getType();
/**
* Returns the type arguments.
* @return the type arguments
*/
List<? extends Tree> getTypeArguments(); List<? extends Tree> getTypeArguments();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,5 +42,9 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface ParenthesizedTree extends ExpressionTree { public interface ParenthesizedTree extends ExpressionTree {
/**
* Returns the expression within the parentheses.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,5 +43,9 @@ import javax.lang.model.type.TypeKind;
*/ */
@jdk.Exported @jdk.Exported
public interface PrimitiveTypeTree extends Tree { public interface PrimitiveTypeTree extends Tree {
/**
* Returns the kind of this primitive type.
* @return the kind of the type
*/
TypeKind getPrimitiveTypeKind(); TypeKind getPrimitiveTypeKind();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for a 'return' statement. * A tree node for a {@code return} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -42,5 +42,9 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface ReturnTree extends StatementTree { public interface ReturnTree extends StatementTree {
/**
* Returns the expression to be returned.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -52,21 +52,25 @@ import javax.lang.model.element.TypeElement;
public interface Scope { public interface Scope {
/** /**
* Returns the enclosing scope. * Returns the enclosing scope.
* @return the enclosing scope
*/ */
public Scope getEnclosingScope(); public Scope getEnclosingScope();
/** /**
* Returns the innermost type element containing the position of this scope * Returns the innermost type element containing the position of this scope.
* @return the innermost enclosing type element
*/ */
public TypeElement getEnclosingClass(); public TypeElement getEnclosingClass();
/** /**
* Returns the innermost executable element containing the position of this scope. * Returns the innermost executable element containing the position of this scope.
* @return the innermost enclosing method declaration
*/ */
public ExecutableElement getEnclosingMethod(); public ExecutableElement getEnclosingMethod();
/** /**
* Returns the elements directly contained in this scope. * Returns the elements directly contained in this scope.
* @return the elements contained in this scope
*/ */
public Iterable<? extends Element> getLocalElements(); public Iterable<? extends Element> getLocalElements();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ package com.sun.source.tree;
import java.util.List; import java.util.List;
/** /**
* A tree node for a 'switch' statement. * A tree node for a {@code switch} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -45,6 +45,15 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface SwitchTree extends StatementTree { public interface SwitchTree extends StatementTree {
/**
* Returns the expression for the {@code switch} statement.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
/**
* Returns the cases for the {@code switch} statement.
* @return the cases
*/
List<? extends CaseTree> getCases(); List<? extends CaseTree> getCases();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for a 'synchronized' statement. * A tree node for a {@code synchronized} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -42,6 +42,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface SynchronizedTree extends StatementTree { public interface SynchronizedTree extends StatementTree {
/**
* Returns the expression on which to synchronize.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
/**
* Returns the block of the {@code synchronized} statement.
* @return the block
*/
BlockTree getBlock(); BlockTree getBlock();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for a 'throw' statement. * A tree node for a {@code throw} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -41,5 +41,9 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface ThrowTree extends StatementTree { public interface ThrowTree extends StatementTree {
/**
* Returns the expression to be thrown.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,7 +47,10 @@ public interface Tree {
*/ */
@jdk.Exported @jdk.Exported
public enum Kind { public enum Kind {
/**
* Used for instances of {@link AnnotatedTypeTree}
* representing annotated types.
*/
ANNOTATED_TYPE(AnnotatedTypeTree.class), ANNOTATED_TYPE(AnnotatedTypeTree.class),
/** /**
@ -613,6 +616,10 @@ public interface Tree {
associatedInterface = intf; associatedInterface = intf;
} }
/**
* Returns the associated interface type that uses this kind.
* @return the associated interface
*/
public Class<? extends Tree> asInterface() { public Class<? extends Tree> asInterface() {
return associatedInterface; return associatedInterface;
} }
@ -621,7 +628,7 @@ public interface Tree {
} }
/** /**
* Gets the kind of this tree. * Returns the kind of this tree.
* *
* @return the kind of this tree. * @return the kind of this tree.
*/ */
@ -633,6 +640,9 @@ public interface Tree {
* *
* @param <R> result type of this operation. * @param <R> result type of this operation.
* @param <D> type of additional data. * @param <D> type of additional data.
* @param visitor the visitor to be called
* @param data a value to be passed to the visitor
* @return the result returned from calling the visitor
*/ */
<R,D> R accept(TreeVisitor<R,D> visitor, D data); <R,D> R accept(TreeVisitor<R,D> visitor, D data);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -58,58 +58,437 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface TreeVisitor<R,P> { public interface TreeVisitor<R,P> {
/**
* Visits an AnnotatedTypeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitAnnotatedType(AnnotatedTypeTree node, P p); R visitAnnotatedType(AnnotatedTypeTree node, P p);
/**
* Visits an AnnotatedTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitAnnotation(AnnotationTree node, P p); R visitAnnotation(AnnotationTree node, P p);
/**
* Visits a MethodInvocationTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitMethodInvocation(MethodInvocationTree node, P p); R visitMethodInvocation(MethodInvocationTree node, P p);
/**
* Visits an AssertTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitAssert(AssertTree node, P p); R visitAssert(AssertTree node, P p);
/**
* Visits an AssignmentTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitAssignment(AssignmentTree node, P p); R visitAssignment(AssignmentTree node, P p);
/**
* Visits a CompoundAssignmentTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitCompoundAssignment(CompoundAssignmentTree node, P p); R visitCompoundAssignment(CompoundAssignmentTree node, P p);
/**
* Visits a BinaryTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitBinary(BinaryTree node, P p); R visitBinary(BinaryTree node, P p);
/**
* Visits a BlockTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitBlock(BlockTree node, P p); R visitBlock(BlockTree node, P p);
/**
* Visits a BreakTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitBreak(BreakTree node, P p); R visitBreak(BreakTree node, P p);
/**
* Visits a CaseTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitCase(CaseTree node, P p); R visitCase(CaseTree node, P p);
/**
* Visits a CatchTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitCatch(CatchTree node, P p); R visitCatch(CatchTree node, P p);
/**
* Visits a ClassTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitClass(ClassTree node, P p); R visitClass(ClassTree node, P p);
/**
* Visits a ConditionalExpressionTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitConditionalExpression(ConditionalExpressionTree node, P p); R visitConditionalExpression(ConditionalExpressionTree node, P p);
/**
* Visits a ContinueTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitContinue(ContinueTree node, P p); R visitContinue(ContinueTree node, P p);
/**
* Visits a DoWhileTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitDoWhileLoop(DoWhileLoopTree node, P p); R visitDoWhileLoop(DoWhileLoopTree node, P p);
/**
* Visits an ErroneousTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitErroneous(ErroneousTree node, P p); R visitErroneous(ErroneousTree node, P p);
/**
* Visits an ExpressionStatementTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitExpressionStatement(ExpressionStatementTree node, P p); R visitExpressionStatement(ExpressionStatementTree node, P p);
/**
* Visits an EnhancedForLoopTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitEnhancedForLoop(EnhancedForLoopTree node, P p); R visitEnhancedForLoop(EnhancedForLoopTree node, P p);
/**
* Visits a ForLoopTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitForLoop(ForLoopTree node, P p); R visitForLoop(ForLoopTree node, P p);
/**
* Visits an IdentifierTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitIdentifier(IdentifierTree node, P p); R visitIdentifier(IdentifierTree node, P p);
/**
* Visits an IfTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitIf(IfTree node, P p); R visitIf(IfTree node, P p);
/**
* Visits an ImportTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitImport(ImportTree node, P p); R visitImport(ImportTree node, P p);
/**
* Visits an ArrayAccessTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitArrayAccess(ArrayAccessTree node, P p); R visitArrayAccess(ArrayAccessTree node, P p);
/**
* Visits a LabeledStatementTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitLabeledStatement(LabeledStatementTree node, P p); R visitLabeledStatement(LabeledStatementTree node, P p);
/**
* Visits a LiteralTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitLiteral(LiteralTree node, P p); R visitLiteral(LiteralTree node, P p);
/**
* Visits a MethodTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitMethod(MethodTree node, P p); R visitMethod(MethodTree node, P p);
/**
* Visits a ModifiersTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitModifiers(ModifiersTree node, P p); R visitModifiers(ModifiersTree node, P p);
/**
* Visits a NewArrayTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitNewArray(NewArrayTree node, P p); R visitNewArray(NewArrayTree node, P p);
/**
* Visits a NewClassTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitNewClass(NewClassTree node, P p); R visitNewClass(NewClassTree node, P p);
/**
* Visits a LambdaExpressionTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitLambdaExpression(LambdaExpressionTree node, P p); R visitLambdaExpression(LambdaExpressionTree node, P p);
/**
* Visits a PackageTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitPackage(PackageTree node, P p); R visitPackage(PackageTree node, P p);
/**
* Visits a ParenthesizedTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitParenthesized(ParenthesizedTree node, P p); R visitParenthesized(ParenthesizedTree node, P p);
/**
* Visits a ReturnTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitReturn(ReturnTree node, P p); R visitReturn(ReturnTree node, P p);
/**
* Visits a MemberSelectTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitMemberSelect(MemberSelectTree node, P p); R visitMemberSelect(MemberSelectTree node, P p);
/**
* Visits a MemberReferenceTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitMemberReference(MemberReferenceTree node, P p); R visitMemberReference(MemberReferenceTree node, P p);
/**
* Visits an EmptyStatementTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitEmptyStatement(EmptyStatementTree node, P p); R visitEmptyStatement(EmptyStatementTree node, P p);
/**
* Visits a SwitchTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitSwitch(SwitchTree node, P p); R visitSwitch(SwitchTree node, P p);
/**
* Visits a SynchronizedTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitSynchronized(SynchronizedTree node, P p); R visitSynchronized(SynchronizedTree node, P p);
/**
* Visits a ThrowTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitThrow(ThrowTree node, P p); R visitThrow(ThrowTree node, P p);
/**
* Visits a CompilationUnitTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitCompilationUnit(CompilationUnitTree node, P p); R visitCompilationUnit(CompilationUnitTree node, P p);
/**
* Visits a TryTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitTry(TryTree node, P p); R visitTry(TryTree node, P p);
/**
* Visits a ParameterizedTypeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitParameterizedType(ParameterizedTypeTree node, P p); R visitParameterizedType(ParameterizedTypeTree node, P p);
/**
* Visits a UnionTypeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitUnionType(UnionTypeTree node, P p); R visitUnionType(UnionTypeTree node, P p);
/**
* Visits an IntersectionTypeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitIntersectionType(IntersectionTypeTree node, P p); R visitIntersectionType(IntersectionTypeTree node, P p);
/**
* Visits an ArrayTypeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitArrayType(ArrayTypeTree node, P p); R visitArrayType(ArrayTypeTree node, P p);
/**
* Visits a TypeCastTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitTypeCast(TypeCastTree node, P p); R visitTypeCast(TypeCastTree node, P p);
/**
* Visits a PrimitiveTypeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitPrimitiveType(PrimitiveTypeTree node, P p); R visitPrimitiveType(PrimitiveTypeTree node, P p);
/**
* Visits a TypeParameterTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitTypeParameter(TypeParameterTree node, P p); R visitTypeParameter(TypeParameterTree node, P p);
/**
* Visits an InstanceOfTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitInstanceOf(InstanceOfTree node, P p); R visitInstanceOf(InstanceOfTree node, P p);
/**
* Visits a UnaryTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitUnary(UnaryTree node, P p); R visitUnary(UnaryTree node, P p);
/**
* Visits a VariableTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitVariable(VariableTree node, P p); R visitVariable(VariableTree node, P p);
/**
* Visits a WhileLoopTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitWhileLoop(WhileLoopTree node, P p); R visitWhileLoop(WhileLoopTree node, P p);
/**
* Visits a WildcardTypeTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitWildcard(WildcardTree node, P p); R visitWildcard(WildcardTree node, P p);
/**
* Visits an unknown type of Tree node.
* This can occur if the language evolves and new kinds
* of nodes are added to the {@code Tree} hierarchy.
* @param node the node being visited
* @param p a parameter value
* @return a result value
*/
R visitOther(Tree node, P p); R visitOther(Tree node, P p);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ package com.sun.source.tree;
import java.util.List; import java.util.List;
/** /**
* A tree node for a 'try' statement. * A tree node for a {@code try} statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -47,8 +47,33 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface TryTree extends StatementTree { public interface TryTree extends StatementTree {
/**
* Returns the block of the {@code try} statement.
* @return the block
*/
BlockTree getBlock(); BlockTree getBlock();
/**
* Returns any catch blocks provided in the {@code try} statement.
* The result will be an empty list if there are no
* catch blocks.
* @return the catch blocks
*/
List<? extends CatchTree> getCatches(); List<? extends CatchTree> getCatches();
/**
* Returns the finally block provided in the {@code try} statement,
* or {@code null} if there is none.
* @return the finally block
*/
BlockTree getFinallyBlock(); BlockTree getFinallyBlock();
/**
* Returns any resource declarations provided in the {@code try} statement.
* The result will be an empty list if there are no
* resource declarations.
* @return the resource declarations
*/
List<? extends Tree> getResources(); List<? extends Tree> getResources();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,6 +41,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface TypeCastTree extends ExpressionTree { public interface TypeCastTree extends ExpressionTree {
/**
* Returns the target type of the cast.
* @return the cast
*/
Tree getType(); Tree getType();
/**
* Returns the expression being cast.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,11 +48,20 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface TypeParameterTree extends Tree { public interface TypeParameterTree extends Tree {
/**
* Returns the name of the type parameter.
* @return the name
*/
Name getName(); Name getName();
/**
* Returns the bounds of the type parameter.
* @return the bounds
*/
List<? extends Tree> getBounds(); List<? extends Tree> getBounds();
/** /**
* Return annotations on the type parameter declaration. * Returns annotations on the type parameter declaration.
* *
* Annotations need Target meta-annotations of * Annotations need Target meta-annotations of
* {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or * {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -44,5 +44,9 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface UnaryTree extends ExpressionTree { public interface UnaryTree extends ExpressionTree {
/**
* Returns the expression that is the operand of the unary operator.
* @return the expression
*/
ExpressionTree getExpression(); ExpressionTree getExpression();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,8 @@ package com.sun.source.tree;
import java.util.List; import java.util.List;
/** /**
* A tree node for a union type expression in a multicatch var declaration. * A tree node for a union type expression in a multicatch
* variable declaration.
* *
* @author Maurizio Cimadamore * @author Maurizio Cimadamore
* *
@ -36,5 +37,9 @@ import java.util.List;
*/ */
@jdk.Exported @jdk.Exported
public interface UnionTypeTree extends Tree { public interface UnionTypeTree extends Tree {
/**
* Returns the alternative type expressions.
* @return the alternative type expressions
*/
List<? extends Tree> getTypeAlternatives(); List<? extends Tree> getTypeAlternatives();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -44,9 +44,35 @@ import javax.lang.model.element.Name;
*/ */
@jdk.Exported @jdk.Exported
public interface VariableTree extends StatementTree { public interface VariableTree extends StatementTree {
/**
* Returns the modifiers, including any annotations, on the declaration.
* @return the modifiers
*/
ModifiersTree getModifiers(); ModifiersTree getModifiers();
/**
* Returns the name of the variable being declared.
* @return the name
*/
Name getName(); Name getName();
/**
* Returns the qualified identifier for the name being "declared".
* This is only used in certain cases for the receiver of a
* method declaration. Returns {@code null} in all other cases.
* @return the qualified identifier of a receiver declaration
*/
ExpressionTree getNameExpression(); ExpressionTree getNameExpression();
/**
* Returns the type of the variable being declared.
* @return the type
*/
Tree getType(); Tree getType();
/**
* Returns the initializer for the variable, or {@code null} if none.
* @return the initializer
*/
ExpressionTree getInitializer(); ExpressionTree getInitializer();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.source.tree; package com.sun.source.tree;
/** /**
* A tree node for a 'while' loop statement. * A tree node for a {@code while} loop statement.
* *
* For example: * For example:
* <pre> * <pre>
@ -43,6 +43,15 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface WhileLoopTree extends StatementTree { public interface WhileLoopTree extends StatementTree {
/**
* Returns the condition of the loop.
* @return the condition
*/
ExpressionTree getCondition(); ExpressionTree getCondition();
/**
* Returns the body of the loop.
* @return the body of the loop
*/
StatementTree getStatement(); StatementTree getStatement();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -46,5 +46,9 @@ package com.sun.source.tree;
*/ */
@jdk.Exported @jdk.Exported
public interface WildcardTree extends Tree { public interface WildcardTree extends Tree {
/**
* Returns the bound of the wildcard.
* @return the bound
*/
Tree getBound(); Tree getBound();
} }

Some files were not shown because too many files have changed in this diff Show More