feat(jdk8): move files to new folder to avoid resources compiled.
This commit is contained in:
44
jdkSrc/jdk8/com/sun/source/doctree/AttributeTree.java
Normal file
44
jdkSrc/jdk8/com/sun/source/doctree/AttributeTree.java
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for an attribute in an HTML element.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface AttributeTree extends DocTree {
|
||||
@jdk.Exported
|
||||
enum ValueKind { EMPTY, UNQUOTED, SINGLE, DOUBLE };
|
||||
|
||||
Name getName();
|
||||
ValueKind getValueKind();
|
||||
List<? extends DocTree> getValue();
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/AuthorTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/AuthorTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @author block tag.
|
||||
*
|
||||
* <p>
|
||||
* @author name-text.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface AuthorTree extends BlockTagTree {
|
||||
List<? extends DocTree> getName();
|
||||
}
|
||||
37
jdkSrc/jdk8/com/sun/source/doctree/BlockTagTree.java
Normal file
37
jdkSrc/jdk8/com/sun/source/doctree/BlockTagTree.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node used as the base class for the different types of
|
||||
* block tags.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface BlockTagTree extends DocTree {
|
||||
String getTagName();
|
||||
}
|
||||
40
jdkSrc/jdk8/com/sun/source/doctree/CommentTree.java
Normal file
40
jdkSrc/jdk8/com/sun/source/doctree/CommentTree.java
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* An embedded HTML comment.
|
||||
*
|
||||
* <p>
|
||||
* {@literal <!-- text --> }
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface CommentTree extends DocTree {
|
||||
String getBody();
|
||||
}
|
||||
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/DeprecatedTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/DeprecatedTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @deprecated block tag.
|
||||
*
|
||||
* <p>
|
||||
* @deprecated deprecated text.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface DeprecatedTree extends BlockTagTree {
|
||||
List<? extends DocTree> getBody();
|
||||
}
|
||||
43
jdkSrc/jdk8/com/sun/source/doctree/DocCommentTree.java
Normal file
43
jdkSrc/jdk8/com/sun/source/doctree/DocCommentTree.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The top level representation of a documentation comment.
|
||||
*
|
||||
* <p>
|
||||
* first-sentence body block-tags
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface DocCommentTree extends DocTree {
|
||||
List<? extends DocTree> getFirstSentence();
|
||||
List<? extends DocTree> getBody();
|
||||
List<? extends DocTree> getBlockTags();
|
||||
}
|
||||
37
jdkSrc/jdk8/com/sun/source/doctree/DocRootTree.java
Normal file
37
jdkSrc/jdk8/com/sun/source/doctree/DocRootTree.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node for an @docroot inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@docroot}
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface DocRootTree extends InlineTagTree { }
|
||||
256
jdkSrc/jdk8/com/sun/source/doctree/DocTree.java
Normal file
256
jdkSrc/jdk8/com/sun/source/doctree/DocTree.java
Normal file
@@ -0,0 +1,256 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* Common interface for all nodes in a documentation syntax tree.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface DocTree {
|
||||
@jdk.Exported
|
||||
enum Kind {
|
||||
/**
|
||||
* Used for instances of {@link AttributeTree}
|
||||
* representing an HTML attribute.
|
||||
*/
|
||||
ATTRIBUTE,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link AuthorTree}
|
||||
* representing an @author tag.
|
||||
*/
|
||||
AUTHOR("author"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree}
|
||||
* representing an @code tag.
|
||||
*/
|
||||
CODE("code"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CommentTree}
|
||||
* representing an HTML comment.
|
||||
*/
|
||||
COMMENT,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link DeprecatedTree}
|
||||
* representing an @deprecated tag.
|
||||
*/
|
||||
DEPRECATED("deprecated"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link DocCommentTree}
|
||||
* representing a complete doc comment.
|
||||
*/
|
||||
DOC_COMMENT,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link DocRootTree}
|
||||
* representing an @docRoot tag.
|
||||
*/
|
||||
DOC_ROOT("docRoot"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link EndElementTree}
|
||||
* representing the end of an HTML element.
|
||||
*/
|
||||
END_ELEMENT,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link EntityTree}
|
||||
* representing an HTML entity.
|
||||
*/
|
||||
ENTITY,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ErroneousTree}
|
||||
* representing some invalid text.
|
||||
*/
|
||||
ERRONEOUS,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ThrowsTree}
|
||||
* representing an @exception tag.
|
||||
*/
|
||||
EXCEPTION("exception"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link IdentifierTree}
|
||||
* representing an identifier.
|
||||
*/
|
||||
IDENTIFIER,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link InheritDocTree}
|
||||
* representing an @inheritDoc tag.
|
||||
*/
|
||||
INHERIT_DOC("inheritDoc"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LinkTree}
|
||||
* representing an @link tag.
|
||||
*/
|
||||
LINK("link"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LinkTree}
|
||||
* representing an @linkplain tag.
|
||||
*/
|
||||
LINK_PLAIN("linkplain"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree}
|
||||
* representing an @literal tag.
|
||||
*/
|
||||
LITERAL("literal"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ParamTree}
|
||||
* representing an @param tag.
|
||||
*/
|
||||
PARAM("param"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ReferenceTree}
|
||||
* representing a reference to a element in the
|
||||
* Java programming language.
|
||||
*/
|
||||
REFERENCE,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ReturnTree}
|
||||
* representing an @return tag.
|
||||
*/
|
||||
RETURN("return"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SeeTree}
|
||||
* representing an @see tag.
|
||||
*/
|
||||
SEE("see"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SerialTree}
|
||||
* representing an @serial tag.
|
||||
*/
|
||||
SERIAL("serial"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SerialDataTree}
|
||||
* representing an @serialData tag.
|
||||
*/
|
||||
SERIAL_DATA("serialData"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SerialFieldTree}
|
||||
* representing an @serialField tag.
|
||||
*/
|
||||
SERIAL_FIELD("serialField"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SinceTree}
|
||||
* representing an @since tag.
|
||||
*/
|
||||
SINCE("since"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link EndElementTree}
|
||||
* representing the start of an HTML element.
|
||||
*/
|
||||
START_ELEMENT,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link TextTree}
|
||||
* representing some documentation text.
|
||||
*/
|
||||
TEXT,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ThrowsTree}
|
||||
* representing an @throws tag.
|
||||
*/
|
||||
THROWS("throws"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnknownBlockTagTree}
|
||||
* representing an unknown block tag.
|
||||
*/
|
||||
UNKNOWN_BLOCK_TAG,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnknownInlineTagTree}
|
||||
* representing an unknown inline tag.
|
||||
*/
|
||||
UNKNOWN_INLINE_TAG,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ValueTree}
|
||||
* representing an @value tag.
|
||||
*/
|
||||
VALUE("value"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link VersionTree}
|
||||
* representing an @version tag.
|
||||
*/
|
||||
VERSION("version"),
|
||||
|
||||
/**
|
||||
* An implementation-reserved node. This is the not the node
|
||||
* you are looking for.
|
||||
*/
|
||||
OTHER;
|
||||
|
||||
public final String tagName;
|
||||
|
||||
Kind() {
|
||||
tagName = null;
|
||||
}
|
||||
|
||||
Kind(String tagName) {
|
||||
this.tagName = tagName;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the kind of this tree.
|
||||
*
|
||||
* @return the kind of this tree.
|
||||
*/
|
||||
Kind getKind();
|
||||
|
||||
/**
|
||||
* Accept method used to implement the visitor pattern. The
|
||||
* visitor pattern is used to implement operations on trees.
|
||||
*
|
||||
* @param <R> result type of this operation.
|
||||
* @param <D> type of additional data.
|
||||
*/
|
||||
<R, D> R accept(DocTreeVisitor<R,D> visitor, D data);
|
||||
}
|
||||
88
jdkSrc/jdk8/com/sun/source/doctree/DocTreeVisitor.java
Normal file
88
jdkSrc/jdk8/com/sun/source/doctree/DocTreeVisitor.java
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
|
||||
/**
|
||||
* A visitor of trees, in the style of the visitor design pattern.
|
||||
* Classes implementing this interface are used to operate
|
||||
* on a tree when the kind of tree is unknown at compile time.
|
||||
* When a visitor is passed to an tree's {@link DocTree#accept
|
||||
* accept} method, the <tt>visit<i>XYZ</i></tt> method most applicable
|
||||
* to that tree is invoked.
|
||||
*
|
||||
* <p> Classes implementing this interface may or may not throw a
|
||||
* {@code NullPointerException} if the additional parameter {@code p}
|
||||
* is {@code null}; see documentation of the implementing class for
|
||||
* details.
|
||||
*
|
||||
* <p> <b>WARNING:</b> It is possible that methods will be added to
|
||||
* this interface to accommodate new, currently unknown, doc comment
|
||||
* structures added to future versions of the Java™ programming
|
||||
* language. Therefore, visitor classes directly implementing this
|
||||
* interface may be source incompatible with future versions of the
|
||||
* platform.
|
||||
*
|
||||
* @param <R> the return type of this visitor's methods. Use {@link
|
||||
* Void} for visitors that do not need to return results.
|
||||
* @param <P> the type of the additional parameter to this visitor's
|
||||
* methods. Use {@code Void} for visitors that do not need an
|
||||
* additional parameter.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface DocTreeVisitor<R,P> {
|
||||
R visitAttribute(AttributeTree node, P p);
|
||||
R visitAuthor(AuthorTree node, P p);
|
||||
R visitComment(CommentTree node, P p);
|
||||
R visitDeprecated(DeprecatedTree node, P p);
|
||||
R visitDocComment(DocCommentTree node, P p);
|
||||
R visitDocRoot(DocRootTree node, P p);
|
||||
R visitEndElement(EndElementTree node, P p);
|
||||
R visitEntity(EntityTree node, P p);
|
||||
R visitErroneous(ErroneousTree node, P p);
|
||||
R visitIdentifier(IdentifierTree node, P p);
|
||||
R visitInheritDoc(InheritDocTree node, P p);
|
||||
R visitLink(LinkTree node, P p);
|
||||
R visitLiteral(LiteralTree node, P p);
|
||||
R visitParam(ParamTree node, P p);
|
||||
R visitReference(ReferenceTree node, P p);
|
||||
R visitReturn(ReturnTree node, P p);
|
||||
R visitSee(SeeTree node, P p);
|
||||
R visitSerial(SerialTree node, P p);
|
||||
R visitSerialData(SerialDataTree node, P p);
|
||||
R visitSerialField(SerialFieldTree node, P p);
|
||||
R visitSince(SinceTree node, P p);
|
||||
R visitStartElement(StartElementTree node, P p);
|
||||
R visitText(TextTree node, P p);
|
||||
R visitThrows(ThrowsTree node, P p);
|
||||
R visitUnknownBlockTag(UnknownBlockTagTree node, P p);
|
||||
R visitUnknownInlineTag(UnknownInlineTagTree node, P p);
|
||||
R visitValue(ValueTree node, P p);
|
||||
R visitVersion(VersionTree node, P p);
|
||||
R visitOther(DocTree node, P p);
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/EndElementTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/EndElementTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for the end of an HTML element.
|
||||
*
|
||||
* <p>
|
||||
* </ name >
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface EndElementTree extends DocTree {
|
||||
Name getName();
|
||||
}
|
||||
42
jdkSrc/jdk8/com/sun/source/doctree/EntityTree.java
Normal file
42
jdkSrc/jdk8/com/sun/source/doctree/EntityTree.java
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
|
||||
/**
|
||||
* A tree node for an HTML entity.
|
||||
*
|
||||
* <p>
|
||||
* & name ;
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface EntityTree extends DocTree {
|
||||
Name getName();
|
||||
}
|
||||
44
jdkSrc/jdk8/com/sun/source/doctree/ErroneousTree.java
Normal file
44
jdkSrc/jdk8/com/sun/source/doctree/ErroneousTree.java
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import javax.tools.Diagnostic;
|
||||
import javax.tools.JavaFileObject;
|
||||
|
||||
/**
|
||||
* A tree node to stand in for a malformed text
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ErroneousTree extends TextTree {
|
||||
/**
|
||||
* Gets a diagnostic object giving details about
|
||||
* the reason the body text is in error.
|
||||
*
|
||||
* @return a diagnostic
|
||||
*/
|
||||
Diagnostic<JavaFileObject> getDiagnostic();
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/IdentifierTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/IdentifierTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* An identifier in a documentation comment.
|
||||
*
|
||||
* <p>
|
||||
* name
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface IdentifierTree extends DocTree {
|
||||
Name getName();
|
||||
}
|
||||
38
jdkSrc/jdk8/com/sun/source/doctree/InheritDocTree.java
Normal file
38
jdkSrc/jdk8/com/sun/source/doctree/InheritDocTree.java
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
*
|
||||
* A tree node for an @inheritDoc inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface InheritDocTree extends InlineTagTree { }
|
||||
37
jdkSrc/jdk8/com/sun/source/doctree/InlineTagTree.java
Normal file
37
jdkSrc/jdk8/com/sun/source/doctree/InlineTagTree.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node used as the base class for the different types of
|
||||
* inline tags.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface InlineTagTree extends DocTree {
|
||||
String getTagName();
|
||||
}
|
||||
43
jdkSrc/jdk8/com/sun/source/doctree/LinkTree.java
Normal file
43
jdkSrc/jdk8/com/sun/source/doctree/LinkTree.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @link or @linkplain inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@link reference label} <br>
|
||||
* {@linkplain reference label }
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface LinkTree extends InlineTagTree {
|
||||
ReferenceTree getReference();
|
||||
List<? extends DocTree> getLabel();
|
||||
}
|
||||
40
jdkSrc/jdk8/com/sun/source/doctree/LiteralTree.java
Normal file
40
jdkSrc/jdk8/com/sun/source/doctree/LiteralTree.java
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
*
|
||||
* A tree node for an @literal or @code inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@literal text}
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface LiteralTree extends InlineTagTree {
|
||||
TextTree getBody();
|
||||
}
|
||||
43
jdkSrc/jdk8/com/sun/source/doctree/ParamTree.java
Normal file
43
jdkSrc/jdk8/com/sun/source/doctree/ParamTree.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @param block tag.
|
||||
*
|
||||
* <p>
|
||||
* @param parameter-name description
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ParamTree extends BlockTagTree {
|
||||
boolean isTypeParameter();
|
||||
IdentifierTree getName();
|
||||
List<? extends DocTree> getDescription();
|
||||
}
|
||||
39
jdkSrc/jdk8/com/sun/source/doctree/ReferenceTree.java
Normal file
39
jdkSrc/jdk8/com/sun/source/doctree/ReferenceTree.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node to a reference to a Java language element.
|
||||
*
|
||||
* <p>
|
||||
* package.class#field
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ReferenceTree extends DocTree {
|
||||
String getSignature();
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/ReturnTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/ReturnTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @return block tag.
|
||||
*
|
||||
* <p>
|
||||
* @return description
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ReturnTree extends BlockTagTree {
|
||||
List<? extends DocTree> getDescription();
|
||||
}
|
||||
44
jdkSrc/jdk8/com/sun/source/doctree/SeeTree.java
Normal file
44
jdkSrc/jdk8/com/sun/source/doctree/SeeTree.java
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* A tree node for an @see block tag.
|
||||
*
|
||||
* <p>
|
||||
* @see "string" <br>
|
||||
* @see <a href="URL#value"> label </a> <br>
|
||||
* @see reference
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface SeeTree extends BlockTagTree {
|
||||
List<? extends DocTree> getReference();
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/SerialDataTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/SerialDataTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @serialData block tag.
|
||||
*
|
||||
* <p>
|
||||
* @serialData data-description
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface SerialDataTree extends BlockTagTree {
|
||||
List<? extends DocTree> getDescription();
|
||||
}
|
||||
43
jdkSrc/jdk8/com/sun/source/doctree/SerialFieldTree.java
Normal file
43
jdkSrc/jdk8/com/sun/source/doctree/SerialFieldTree.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @serialData block tag.
|
||||
*
|
||||
* <p>
|
||||
* @serialField field-name field-type field-description
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface SerialFieldTree extends BlockTagTree {
|
||||
IdentifierTree getName();
|
||||
ReferenceTree getType();
|
||||
List<? extends DocTree> getDescription();
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/SerialTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/SerialTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @serial block tag.
|
||||
*
|
||||
* <p>
|
||||
* @serial field-description | include | exclude
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface SerialTree extends BlockTagTree {
|
||||
List<? extends DocTree> getDescription();
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/SinceTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/SinceTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @since block tag.
|
||||
*
|
||||
* <p>
|
||||
* @since since-text
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface SinceTree extends BlockTagTree {
|
||||
List<? extends DocTree> getBody();
|
||||
}
|
||||
44
jdkSrc/jdk8/com/sun/source/doctree/StartElementTree.java
Normal file
44
jdkSrc/jdk8/com/sun/source/doctree/StartElementTree.java
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for the start of an HTML element.
|
||||
*
|
||||
* <p>
|
||||
* < name [attributes] [/]>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface StartElementTree extends DocTree {
|
||||
Name getName();
|
||||
List<? extends DocTree> getAttributes();
|
||||
boolean isSelfClosing();
|
||||
}
|
||||
36
jdkSrc/jdk8/com/sun/source/doctree/TextTree.java
Normal file
36
jdkSrc/jdk8/com/sun/source/doctree/TextTree.java
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node for plain text.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface TextTree extends DocTree {
|
||||
String getBody();
|
||||
}
|
||||
45
jdkSrc/jdk8/com/sun/source/doctree/ThrowsTree.java
Normal file
45
jdkSrc/jdk8/com/sun/source/doctree/ThrowsTree.java
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* A tree node for an @exception or @throws block tag.
|
||||
* @exception is a synonym for @throws.
|
||||
*
|
||||
* <p>
|
||||
* @exception class-name description <br>
|
||||
* @throws class-name description
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ThrowsTree extends BlockTagTree {
|
||||
ReferenceTree getExceptionName();
|
||||
List<? extends DocTree> getDescription();
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/UnknownBlockTagTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/UnknownBlockTagTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an unrecognized inline tag.
|
||||
*
|
||||
* <p>
|
||||
* @name content
|
||||
*
|
||||
* @since 1.8
|
||||
*
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface UnknownBlockTagTree extends BlockTagTree {
|
||||
List<? extends DocTree> getContent();
|
||||
}
|
||||
41
jdkSrc/jdk8/com/sun/source/doctree/UnknownInlineTagTree.java
Normal file
41
jdkSrc/jdk8/com/sun/source/doctree/UnknownInlineTagTree.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an unrecognized inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@name content}
|
||||
*
|
||||
* @since 1.8
|
||||
*
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface UnknownInlineTagTree extends InlineTagTree {
|
||||
List<? extends DocTree> getContent();
|
||||
}
|
||||
39
jdkSrc/jdk8/com/sun/source/doctree/ValueTree.java
Normal file
39
jdkSrc/jdk8/com/sun/source/doctree/ValueTree.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node for an @value inline tag.
|
||||
*
|
||||
* <p>
|
||||
* { @value reference }
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ValueTree extends InlineTagTree {
|
||||
ReferenceTree getReference();
|
||||
}
|
||||
42
jdkSrc/jdk8/com/sun/source/doctree/VersionTree.java
Normal file
42
jdkSrc/jdk8/com/sun/source/doctree/VersionTree.java
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* A tree node for an @version block tag.
|
||||
*
|
||||
* <p>
|
||||
* @version version-text
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface VersionTree extends BlockTagTree {
|
||||
List<? extends DocTree> getBody();
|
||||
}
|
||||
35
jdkSrc/jdk8/com/sun/source/doctree/package-info.java
Normal file
35
jdkSrc/jdk8/com/sun/source/doctree/package-info.java
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Provides interfaces to represent documentation comments as abstract syntax
|
||||
* trees (AST).
|
||||
*
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.8
|
||||
* @see <a href="https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#javadoctags">https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#javadoctags</a>
|
||||
*/
|
||||
@jdk.Exported
|
||||
package com.sun.source.doctree;
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/AnnotatedTypeTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/AnnotatedTypeTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an annotated type
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* {@code @}<em>annotationType String</em>
|
||||
* {@code @}<em>annotationType</em> ( <em>arguments</em> ) <em>Date</em>
|
||||
* </pre>
|
||||
*
|
||||
* @see "JSR 308: Annotations on Java Types"
|
||||
*
|
||||
* @author Mahmood Ali
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface AnnotatedTypeTree extends ExpressionTree {
|
||||
List<? extends AnnotationTree> getAnnotations();
|
||||
ExpressionTree getUnderlyingType();
|
||||
}
|
||||
49
jdkSrc/jdk8/com/sun/source/tree/AnnotationTree.java
Normal file
49
jdkSrc/jdk8/com/sun/source/tree/AnnotationTree.java
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an annotation.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* {@code @}<em>annotationType</em>
|
||||
* {@code @}<em>annotationType</em> ( <em>arguments</em> )
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 9.7
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface AnnotationTree extends ExpressionTree {
|
||||
Tree getAnnotationType();
|
||||
List<? extends ExpressionTree> getArguments();
|
||||
}
|
||||
46
jdkSrc/jdk8/com/sun/source/tree/ArrayAccessTree.java
Normal file
46
jdkSrc/jdk8/com/sun/source/tree/ArrayAccessTree.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an array access expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>expression</em> [ <em>index</em> ]
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.13
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ArrayAccessTree extends ExpressionTree {
|
||||
ExpressionTree getExpression();
|
||||
ExpressionTree getIndex();
|
||||
}
|
||||
45
jdkSrc/jdk8/com/sun/source/tree/ArrayTypeTree.java
Normal file
45
jdkSrc/jdk8/com/sun/source/tree/ArrayTypeTree.java
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an array type.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>type</em> []
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 10.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ArrayTypeTree extends Tree {
|
||||
Tree getType();
|
||||
}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/AssertTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/AssertTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an 'assert' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* assert <em>condition</em> ;
|
||||
*
|
||||
* assert <em>condition</em> : <em>detail</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.10
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface AssertTree extends StatementTree {
|
||||
ExpressionTree getCondition();
|
||||
ExpressionTree getDetail();
|
||||
}
|
||||
46
jdkSrc/jdk8/com/sun/source/tree/AssignmentTree.java
Normal file
46
jdkSrc/jdk8/com/sun/source/tree/AssignmentTree.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an assignment expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>variable</em> = <em>expression</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.26.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface AssignmentTree extends ExpressionTree {
|
||||
ExpressionTree getVariable();
|
||||
ExpressionTree getExpression();
|
||||
}
|
||||
47
jdkSrc/jdk8/com/sun/source/tree/BinaryTree.java
Normal file
47
jdkSrc/jdk8/com/sun/source/tree/BinaryTree.java
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a binary expression.
|
||||
* Use {@link #getKind getKind} to determine the kind of operator.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>leftOperand</em> <em>operator</em> <em>rightOperand</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls sections 15.17 to 15.24
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface BinaryTree extends ExpressionTree {
|
||||
ExpressionTree getLeftOperand();
|
||||
ExpressionTree getRightOperand();
|
||||
}
|
||||
52
jdkSrc/jdk8/com/sun/source/tree/BlockTree.java
Normal file
52
jdkSrc/jdk8/com/sun/source/tree/BlockTree.java
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a statement block.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* { }
|
||||
*
|
||||
* { <em>statements</em> }
|
||||
*
|
||||
* static { <em>statements</em> }
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface BlockTree extends StatementTree {
|
||||
boolean isStatic();
|
||||
List<? extends StatementTree> getStatements();
|
||||
}
|
||||
49
jdkSrc/jdk8/com/sun/source/tree/BreakTree.java
Normal file
49
jdkSrc/jdk8/com/sun/source/tree/BreakTree.java
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a 'break' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* break;
|
||||
*
|
||||
* break <em>label</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.15
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface BreakTree extends StatementTree {
|
||||
Name getLabel();
|
||||
}
|
||||
55
jdkSrc/jdk8/com/sun/source/tree/CaseTree.java
Normal file
55
jdkSrc/jdk8/com/sun/source/tree/CaseTree.java
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a 'case' in a 'switch' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* case <em>expression</em> :
|
||||
* <em>statements</em>
|
||||
*
|
||||
* default :
|
||||
* <em>statements</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.11
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface CaseTree extends Tree {
|
||||
/**
|
||||
* @return null if and only if this Case is {@code default:}
|
||||
*/
|
||||
ExpressionTree getExpression();
|
||||
List<? extends StatementTree> getStatements();
|
||||
}
|
||||
47
jdkSrc/jdk8/com/sun/source/tree/CatchTree.java
Normal file
47
jdkSrc/jdk8/com/sun/source/tree/CatchTree.java
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a 'catch' block in a 'try' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* catch ( <em>parameter</em> )
|
||||
* <em>block</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.20
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface CatchTree extends Tree {
|
||||
VariableTree getParameter();
|
||||
BlockTree getBlock();
|
||||
}
|
||||
59
jdkSrc/jdk8/com/sun/source/tree/ClassTree.java
Normal file
59
jdkSrc/jdk8/com/sun/source/tree/ClassTree.java
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a class, interface, enum, or annotation
|
||||
* type declaration.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>modifiers</em> class <em>simpleName</em> <em>typeParameters</em>
|
||||
* extends <em>extendsClause</em>
|
||||
* implements <em>implementsClause</em>
|
||||
* {
|
||||
* <em>members</em>
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @jls sections 8.1, 8.9, 9.1, and 9.6
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ClassTree extends StatementTree {
|
||||
ModifiersTree getModifiers();
|
||||
Name getSimpleName();
|
||||
List<? extends TypeParameterTree> getTypeParameters();
|
||||
Tree getExtendsClause();
|
||||
List<? extends Tree> getImplementsClause();
|
||||
List<? extends Tree> getMembers();
|
||||
}
|
||||
54
jdkSrc/jdk8/com/sun/source/tree/CompilationUnitTree.java
Normal file
54
jdkSrc/jdk8/com/sun/source/tree/CompilationUnitTree.java
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
import javax.tools.JavaFileObject;
|
||||
|
||||
/**
|
||||
* Represents the abstract syntax tree for compilation units (source
|
||||
* files) and package declarations (package-info.java).
|
||||
*
|
||||
* @jls sections 7.3, and 7.4
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface CompilationUnitTree extends Tree {
|
||||
List<? extends AnnotationTree> getPackageAnnotations();
|
||||
ExpressionTree getPackageName();
|
||||
List<? extends ImportTree> getImports();
|
||||
List<? extends Tree> getTypeDecls();
|
||||
JavaFileObject getSourceFile();
|
||||
|
||||
/**
|
||||
* Gets the line map for this compilation unit, if available.
|
||||
* Returns null if the line map is not available.
|
||||
* @return the line map for this compilation unit
|
||||
*/
|
||||
LineMap getLineMap();
|
||||
}
|
||||
47
jdkSrc/jdk8/com/sun/source/tree/CompoundAssignmentTree.java
Normal file
47
jdkSrc/jdk8/com/sun/source/tree/CompoundAssignmentTree.java
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for compound assignment operator.
|
||||
* Use {@link #getKind getKind} to determine the kind of operator.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>variable</em> <em>operator</em> <em>expression</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.26.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface CompoundAssignmentTree extends ExpressionTree {
|
||||
ExpressionTree getVariable();
|
||||
ExpressionTree getExpression();
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for the conditional operator ? :.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>condition</em> ? <em>trueExpression</em> : <em>falseExpression</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.25
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ConditionalExpressionTree extends ExpressionTree {
|
||||
ExpressionTree getCondition();
|
||||
ExpressionTree getTrueExpression();
|
||||
ExpressionTree getFalseExpression();
|
||||
}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/ContinueTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/ContinueTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a 'continue' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* continue;
|
||||
* continue <em>label</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.16
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ContinueTree extends StatementTree {
|
||||
Name getLabel();
|
||||
}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/DoWhileLoopTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/DoWhileLoopTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a 'do' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* do
|
||||
* <em>statement</em>
|
||||
* while ( <em>expression</em> );
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.13
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface DoWhileLoopTree extends StatementTree {
|
||||
ExpressionTree getCondition();
|
||||
StatementTree getStatement();
|
||||
}
|
||||
43
jdkSrc/jdk8/com/sun/source/tree/EmptyStatementTree.java
Normal file
43
jdkSrc/jdk8/com/sun/source/tree/EmptyStatementTree.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an empty (skip) statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* ;
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.6
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface EmptyStatementTree extends StatementTree {}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/EnhancedForLoopTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/EnhancedForLoopTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an "enhanced" 'for' loop statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* for ( <em>variable</em> : <em>expression</em> )
|
||||
* <em>statement</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.14.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface EnhancedForLoopTree extends StatementTree {
|
||||
VariableTree getVariable();
|
||||
ExpressionTree getExpression();
|
||||
StatementTree getStatement();
|
||||
}
|
||||
40
jdkSrc/jdk8/com/sun/source/tree/ErroneousTree.java
Normal file
40
jdkSrc/jdk8/com/sun/source/tree/ErroneousTree.java
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node to stand in for a malformed expression.
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ErroneousTree extends ExpressionTree {
|
||||
List<? extends Tree> getErrorTrees();
|
||||
}
|
||||
45
jdkSrc/jdk8/com/sun/source/tree/ExpressionStatementTree.java
Normal file
45
jdkSrc/jdk8/com/sun/source/tree/ExpressionStatementTree.java
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an expression statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>expression</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.8
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ExpressionStatementTree extends StatementTree {
|
||||
ExpressionTree getExpression();
|
||||
}
|
||||
39
jdkSrc/jdk8/com/sun/source/tree/ExpressionTree.java
Normal file
39
jdkSrc/jdk8/com/sun/source/tree/ExpressionTree.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node used as the base class for the different types of
|
||||
* expressions.
|
||||
*
|
||||
* @jls chapter 15
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ExpressionTree extends Tree {}
|
||||
51
jdkSrc/jdk8/com/sun/source/tree/ForLoopTree.java
Normal file
51
jdkSrc/jdk8/com/sun/source/tree/ForLoopTree.java
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a basic 'for' loop statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* for ( <em>initializer</em> ; <em>condition</em> ; <em>update</em> )
|
||||
* <em>statement</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.14.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ForLoopTree extends StatementTree {
|
||||
List<? extends StatementTree> getInitializer();
|
||||
ExpressionTree getCondition();
|
||||
List<? extends ExpressionStatementTree> getUpdate();
|
||||
StatementTree getStatement();
|
||||
}
|
||||
47
jdkSrc/jdk8/com/sun/source/tree/IdentifierTree.java
Normal file
47
jdkSrc/jdk8/com/sun/source/tree/IdentifierTree.java
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for an identifier expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>name</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 6.5.6.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface IdentifierTree extends ExpressionTree {
|
||||
Name getName();
|
||||
}
|
||||
56
jdkSrc/jdk8/com/sun/source/tree/IfTree.java
Normal file
56
jdkSrc/jdk8/com/sun/source/tree/IfTree.java
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an 'if' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* if ( <em>condition</em> )
|
||||
* <em>thenStatement</em>
|
||||
*
|
||||
* if ( <em>condition</em> )
|
||||
* <em>thenStatement</em>
|
||||
* else
|
||||
* <em>elseStatement</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.9
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface IfTree extends StatementTree {
|
||||
ExpressionTree getCondition();
|
||||
StatementTree getThenStatement();
|
||||
/**
|
||||
* @return null if this if statement has no else branch.
|
||||
*/
|
||||
StatementTree getElseStatement();
|
||||
}
|
||||
52
jdkSrc/jdk8/com/sun/source/tree/ImportTree.java
Normal file
52
jdkSrc/jdk8/com/sun/source/tree/ImportTree.java
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an import statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* import <em>qualifiedIdentifier</em> ;
|
||||
*
|
||||
* static import <em>qualifiedIdentifier</em> ;
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 7.5
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ImportTree extends Tree {
|
||||
boolean isStatic();
|
||||
/**
|
||||
* @return a qualified identifier ending in "*" if and only if
|
||||
* this is an import-on-demand.
|
||||
*/
|
||||
Tree getQualifiedIdentifier();
|
||||
}
|
||||
46
jdkSrc/jdk8/com/sun/source/tree/InstanceOfTree.java
Normal file
46
jdkSrc/jdk8/com/sun/source/tree/InstanceOfTree.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for an 'instanceof' expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>expression</em> instanceof <em>type</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.20.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface InstanceOfTree extends ExpressionTree {
|
||||
ExpressionTree getExpression();
|
||||
Tree getType();
|
||||
}
|
||||
40
jdkSrc/jdk8/com/sun/source/tree/IntersectionTypeTree.java
Normal file
40
jdkSrc/jdk8/com/sun/source/tree/IntersectionTypeTree.java
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an intersection type in a cast expression.
|
||||
*
|
||||
* @author Maurizio Cimadamore
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface IntersectionTypeTree extends Tree {
|
||||
List<? extends Tree> getBounds();
|
||||
}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/LabeledStatementTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/LabeledStatementTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a labeled statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>label</em> : <em>statement</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.7
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface LabeledStatementTree extends StatementTree {
|
||||
Name getLabel();
|
||||
StatementTree getStatement();
|
||||
}
|
||||
58
jdkSrc/jdk8/com/sun/source/tree/LambdaExpressionTree.java
Normal file
58
jdkSrc/jdk8/com/sun/source/tree/LambdaExpressionTree.java
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a lambda expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>{@code
|
||||
* ()->{}
|
||||
* (List<String> ls)->ls.size()
|
||||
* (x,y)-> { return x + y; }
|
||||
* }</pre>
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface LambdaExpressionTree extends ExpressionTree {
|
||||
|
||||
/**
|
||||
* Lambda expressions come in two forms: (i) expression lambdas, whose body
|
||||
* is an expression, and (ii) statement lambdas, whose body is a block
|
||||
*/
|
||||
@jdk.Exported
|
||||
public enum BodyKind {
|
||||
/** enum constant for expression lambdas */
|
||||
EXPRESSION,
|
||||
/** enum constant for statement lambdas */
|
||||
STATEMENT;
|
||||
}
|
||||
|
||||
List<? extends VariableTree> getParameters();
|
||||
Tree getBody();
|
||||
BodyKind getBodyKind();
|
||||
}
|
||||
79
jdkSrc/jdk8/com/sun/source/tree/LineMap.java
Normal file
79
jdkSrc/jdk8/com/sun/source/tree/LineMap.java
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* Provides methods to convert between character positions and line numbers
|
||||
* for a compilation unit.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface LineMap {
|
||||
/**
|
||||
* Find the start position of a line.
|
||||
*
|
||||
* @param line line number (beginning at 1)
|
||||
* @return position of first character in line
|
||||
* @throws IndexOutOfBoundsException
|
||||
* if {@code lineNumber < 1}
|
||||
* if {@code lineNumber > no. of lines}
|
||||
*/
|
||||
long getStartPosition(long line);
|
||||
|
||||
/**
|
||||
* Find the position corresponding to a (line,column).
|
||||
*
|
||||
* @param line line number (beginning at 1)
|
||||
* @param column tab-expanded column number (beginning 1)
|
||||
*
|
||||
* @return position of character
|
||||
* @throws IndexOutOfBoundsException
|
||||
* if {@code line < 1}
|
||||
* if {@code line > no. of lines}
|
||||
*/
|
||||
long getPosition(long line, long column);
|
||||
|
||||
/**
|
||||
* Find the line containing a position; a line termination
|
||||
* character is on the line it terminates.
|
||||
*
|
||||
* @param pos character offset of the position
|
||||
* @return the line number of pos (first line is 1)
|
||||
*/
|
||||
long getLineNumber(long pos);
|
||||
|
||||
/**
|
||||
* Find the column for a character position.
|
||||
* Tab characters preceding the position on the same line
|
||||
* will be expanded when calculating the column number.
|
||||
*
|
||||
* @param pos character offset of the position
|
||||
* @return the tab-expanded column number of pos (first column is 1)
|
||||
*/
|
||||
long getColumnNumber(long pos);
|
||||
|
||||
}
|
||||
46
jdkSrc/jdk8/com/sun/source/tree/LiteralTree.java
Normal file
46
jdkSrc/jdk8/com/sun/source/tree/LiteralTree.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a literal expression.
|
||||
* Use {@link #getKind getKind} to determine the kind of literal.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>value</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.28
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface LiteralTree extends ExpressionTree {
|
||||
Object getValue();
|
||||
}
|
||||
60
jdkSrc/jdk8/com/sun/source/tree/MemberReferenceTree.java
Normal file
60
jdkSrc/jdk8/com/sun/source/tree/MemberReferenceTree.java
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a member reference expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>expression</em> # <em>[ identifier | new ]</em>
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface MemberReferenceTree extends ExpressionTree {
|
||||
|
||||
/**
|
||||
* There are two kinds of member references: (i) method references and
|
||||
* (ii) constructor references
|
||||
*/
|
||||
@jdk.Exported
|
||||
public enum ReferenceMode {
|
||||
/** enum constant for method references */
|
||||
INVOKE,
|
||||
/** enum constant for constructor references */
|
||||
NEW
|
||||
}
|
||||
ReferenceMode getMode();
|
||||
ExpressionTree getQualifierExpression();
|
||||
Name getName();
|
||||
List<? extends ExpressionTree> getTypeArguments();
|
||||
}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/MemberSelectTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/MemberSelectTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a member access expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>expression</em> . <em>identifier</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls sections 6.5, 15.11,and 15.12
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface MemberSelectTree extends ExpressionTree {
|
||||
ExpressionTree getExpression();
|
||||
Name getIdentifier();
|
||||
}
|
||||
51
jdkSrc/jdk8/com/sun/source/tree/MethodInvocationTree.java
Normal file
51
jdkSrc/jdk8/com/sun/source/tree/MethodInvocationTree.java
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a method invocation expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>identifier</em> ( <em>arguments</em> )
|
||||
*
|
||||
* this . <em>typeArguments</em> <em>identifier</em> ( <em>arguments</em> )
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.12
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface MethodInvocationTree extends ExpressionTree {
|
||||
List<? extends Tree> getTypeArguments();
|
||||
ExpressionTree getMethodSelect();
|
||||
List<? extends ExpressionTree> getArguments();
|
||||
}
|
||||
68
jdkSrc/jdk8/com/sun/source/tree/MethodTree.java
Normal file
68
jdkSrc/jdk8/com/sun/source/tree/MethodTree.java
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a method or annotation type element declaration.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>modifiers</em> <em>typeParameters</em> <em>type</em> <em>name</em>
|
||||
* ( <em>parameters</em> )
|
||||
* <em>body</em>
|
||||
*
|
||||
* <em>modifiers</em> <em>type</em> <em>name</em> () default <em>defaultValue</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls sections 8.4, 8.6, 8.7, 9.4, and 9.6
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface MethodTree extends Tree {
|
||||
ModifiersTree getModifiers();
|
||||
Name getName();
|
||||
Tree getReturnType();
|
||||
List<? extends TypeParameterTree> getTypeParameters();
|
||||
List<? extends VariableTree> getParameters();
|
||||
|
||||
/**
|
||||
* Return an explicit receiver parameter ("this" parameter).
|
||||
*
|
||||
* @return an explicit receiver parameter ("this" parameter)
|
||||
* @since 1.8
|
||||
*/
|
||||
VariableTree getReceiverParameter();
|
||||
|
||||
List<? extends ExpressionTree> getThrows();
|
||||
BlockTree getBody();
|
||||
Tree getDefaultValue(); // for annotation types
|
||||
}
|
||||
52
jdkSrc/jdk8/com/sun/source/tree/ModifiersTree.java
Normal file
52
jdkSrc/jdk8/com/sun/source/tree/ModifiersTree.java
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import javax.lang.model.element.Modifier;
|
||||
|
||||
/**
|
||||
* A tree node for the modifiers, including annotations, for a declaration.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>flags</em>
|
||||
*
|
||||
* <em>flags</em> <em>annotations</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls sections 8.1.1, 8.3.1, 8.4.3, 8.5.1, 8.8.3, 9.1.1, and 9.7
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ModifiersTree extends Tree {
|
||||
Set<Modifier> getFlags();
|
||||
List<? extends AnnotationTree> getAnnotations();
|
||||
}
|
||||
53
jdkSrc/jdk8/com/sun/source/tree/NewArrayTree.java
Normal file
53
jdkSrc/jdk8/com/sun/source/tree/NewArrayTree.java
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an expression to create a new instance of an array.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* new <em>type</em> <em>dimensions</em> <em>initializers</em>
|
||||
*
|
||||
* new <em>type</em> <em>dimensions</em> [ ] <em>initializers</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.10
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface NewArrayTree extends ExpressionTree {
|
||||
Tree getType();
|
||||
List<? extends ExpressionTree> getDimensions();
|
||||
List<? extends ExpressionTree> getInitializers();
|
||||
List<? extends AnnotationTree> getAnnotations();
|
||||
List<? extends List<? extends AnnotationTree>> getDimAnnotations();
|
||||
}
|
||||
58
jdkSrc/jdk8/com/sun/source/tree/NewClassTree.java
Normal file
58
jdkSrc/jdk8/com/sun/source/tree/NewClassTree.java
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node to declare a new instance of a class.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* new <em>identifier</em> ( )
|
||||
*
|
||||
* new <em>identifier</em> ( <em>arguments</em> )
|
||||
*
|
||||
* new <em>typeArguments</em> <em>identifier</em> ( <em>arguments</em> )
|
||||
* <em>classBody</em>
|
||||
*
|
||||
* <em>enclosingExpression</em>.new <em>identifier</em> ( <em>arguments</em> )
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.9
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface NewClassTree extends ExpressionTree {
|
||||
ExpressionTree getEnclosingExpression();
|
||||
List<? extends Tree> getTypeArguments();
|
||||
ExpressionTree getIdentifier();
|
||||
List<? extends ExpressionTree> getArguments();
|
||||
ClassTree getClassBody();
|
||||
}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/ParameterizedTypeTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/ParameterizedTypeTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a type expression involving type parameters.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>type</em> < <em>typeArguments</em> >
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 4.5.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ParameterizedTypeTree extends Tree {
|
||||
Tree getType();
|
||||
List<? extends Tree> getTypeArguments();
|
||||
}
|
||||
46
jdkSrc/jdk8/com/sun/source/tree/ParenthesizedTree.java
Normal file
46
jdkSrc/jdk8/com/sun/source/tree/ParenthesizedTree.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a parenthesized expression. Note: parentheses
|
||||
* not be preserved by the parser.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* ( <em>expression</em> )
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.8.5
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ParenthesizedTree extends ExpressionTree {
|
||||
ExpressionTree getExpression();
|
||||
}
|
||||
47
jdkSrc/jdk8/com/sun/source/tree/PrimitiveTypeTree.java
Normal file
47
jdkSrc/jdk8/com/sun/source/tree/PrimitiveTypeTree.java
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import javax.lang.model.type.TypeKind;
|
||||
|
||||
/**
|
||||
* A tree node for a primitive type.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>primitiveTypeKind</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 4.2
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface PrimitiveTypeTree extends Tree {
|
||||
TypeKind getPrimitiveTypeKind();
|
||||
}
|
||||
46
jdkSrc/jdk8/com/sun/source/tree/ReturnTree.java
Normal file
46
jdkSrc/jdk8/com/sun/source/tree/ReturnTree.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a 'return' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* return;
|
||||
* return <em>expression</em>;
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.17
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ReturnTree extends StatementTree {
|
||||
ExpressionTree getExpression();
|
||||
}
|
||||
72
jdkSrc/jdk8/com/sun/source/tree/Scope.java
Normal file
72
jdkSrc/jdk8/com/sun/source/tree/Scope.java
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.element.ExecutableElement;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
|
||||
/**
|
||||
* Interface for determining locally available program elements, such as
|
||||
* local variables and imports.
|
||||
* Upon creation, a Scope is associated with a given program position;
|
||||
* for example, a {@linkplain Tree tree node}. This position may be used to
|
||||
* infer an enclosing method and/or class.
|
||||
*
|
||||
* <p>A Scope does not itself contain the details of the elements corresponding
|
||||
* to the parameters, methods and fields of the methods and classes containing
|
||||
* its position. However, these elements can be determined from the enclosing
|
||||
* elements.
|
||||
*
|
||||
* <p>Scopes may be contained in an enclosing scope. The outermost scope contains
|
||||
* those elements available via "star import" declarations; the scope within that
|
||||
* contains the top level elements of the compilation unit, including any named
|
||||
* imports.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface Scope {
|
||||
/**
|
||||
* Returns the enclosing scope.
|
||||
*/
|
||||
public Scope getEnclosingScope();
|
||||
|
||||
/**
|
||||
* Returns the innermost type element containing the position of this scope
|
||||
*/
|
||||
public TypeElement getEnclosingClass();
|
||||
|
||||
/**
|
||||
* Returns the innermost executable element containing the position of this scope.
|
||||
*/
|
||||
public ExecutableElement getEnclosingMethod();
|
||||
|
||||
/**
|
||||
* Returns the elements directly contained in this scope.
|
||||
*/
|
||||
public Iterable<? extends Element> getLocalElements();
|
||||
}
|
||||
39
jdkSrc/jdk8/com/sun/source/tree/StatementTree.java
Normal file
39
jdkSrc/jdk8/com/sun/source/tree/StatementTree.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node used as the base class for the different kinds of
|
||||
* statements.
|
||||
*
|
||||
* @jls chapter 14
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface StatementTree extends Tree {}
|
||||
50
jdkSrc/jdk8/com/sun/source/tree/SwitchTree.java
Normal file
50
jdkSrc/jdk8/com/sun/source/tree/SwitchTree.java
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a 'switch' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* switch ( <em>expression</em> ) {
|
||||
* <em>cases</em>
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.11
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface SwitchTree extends StatementTree {
|
||||
ExpressionTree getExpression();
|
||||
List<? extends CaseTree> getCases();
|
||||
}
|
||||
47
jdkSrc/jdk8/com/sun/source/tree/SynchronizedTree.java
Normal file
47
jdkSrc/jdk8/com/sun/source/tree/SynchronizedTree.java
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a 'synchronized' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* synchronized ( <em>expression</em> )
|
||||
* <em>block</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.19
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface SynchronizedTree extends StatementTree {
|
||||
ExpressionTree getExpression();
|
||||
BlockTree getBlock();
|
||||
}
|
||||
45
jdkSrc/jdk8/com/sun/source/tree/ThrowTree.java
Normal file
45
jdkSrc/jdk8/com/sun/source/tree/ThrowTree.java
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a 'throw' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* throw <em>expression</em>;
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.18
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface ThrowTree extends StatementTree {
|
||||
ExpressionTree getExpression();
|
||||
}
|
||||
632
jdkSrc/jdk8/com/sun/source/tree/Tree.java
Normal file
632
jdkSrc/jdk8/com/sun/source/tree/Tree.java
Normal file
@@ -0,0 +1,632 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* Common interface for all nodes in an abstract syntax tree.
|
||||
*
|
||||
* <p><b>WARNING:</b> This interface and its sub-interfaces are
|
||||
* subject to change as the Java™ programming language evolves.
|
||||
* These interfaces are implemented by the JDK Java compiler (javac)
|
||||
* and should not be implemented either directly or indirectly by
|
||||
* other applications.
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface Tree {
|
||||
|
||||
/**
|
||||
* Enumerates all kinds of trees.
|
||||
*/
|
||||
@jdk.Exported
|
||||
public enum Kind {
|
||||
|
||||
ANNOTATED_TYPE(AnnotatedTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link AnnotationTree}
|
||||
* representing declaration annotations.
|
||||
*/
|
||||
ANNOTATION(AnnotationTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link AnnotationTree}
|
||||
* representing type annotations.
|
||||
*/
|
||||
TYPE_ANNOTATION(AnnotationTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ArrayAccessTree}.
|
||||
*/
|
||||
ARRAY_ACCESS(ArrayAccessTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ArrayTypeTree}.
|
||||
*/
|
||||
ARRAY_TYPE(ArrayTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link AssertTree}.
|
||||
*/
|
||||
ASSERT(AssertTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link AssignmentTree}.
|
||||
*/
|
||||
ASSIGNMENT(AssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BlockTree}.
|
||||
*/
|
||||
BLOCK(BlockTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BreakTree}.
|
||||
*/
|
||||
BREAK(BreakTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CaseTree}.
|
||||
*/
|
||||
CASE(CaseTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CatchTree}.
|
||||
*/
|
||||
CATCH(CatchTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ClassTree} representing classes.
|
||||
*/
|
||||
CLASS(ClassTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompilationUnitTree}.
|
||||
*/
|
||||
COMPILATION_UNIT(CompilationUnitTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ConditionalExpressionTree}.
|
||||
*/
|
||||
CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ContinueTree}.
|
||||
*/
|
||||
CONTINUE(ContinueTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link DoWhileLoopTree}.
|
||||
*/
|
||||
DO_WHILE_LOOP(DoWhileLoopTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link EnhancedForLoopTree}.
|
||||
*/
|
||||
ENHANCED_FOR_LOOP(EnhancedForLoopTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ExpressionStatementTree}.
|
||||
*/
|
||||
EXPRESSION_STATEMENT(ExpressionStatementTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link MemberSelectTree}.
|
||||
*/
|
||||
MEMBER_SELECT(MemberSelectTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link MemberReferenceTree}.
|
||||
*/
|
||||
MEMBER_REFERENCE(MemberReferenceTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ForLoopTree}.
|
||||
*/
|
||||
FOR_LOOP(ForLoopTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link IdentifierTree}.
|
||||
*/
|
||||
IDENTIFIER(IdentifierTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link IfTree}.
|
||||
*/
|
||||
IF(IfTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ImportTree}.
|
||||
*/
|
||||
IMPORT(ImportTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link InstanceOfTree}.
|
||||
*/
|
||||
INSTANCE_OF(InstanceOfTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LabeledStatementTree}.
|
||||
*/
|
||||
LABELED_STATEMENT(LabeledStatementTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link MethodTree}.
|
||||
*/
|
||||
METHOD(MethodTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link MethodInvocationTree}.
|
||||
*/
|
||||
METHOD_INVOCATION(MethodInvocationTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ModifiersTree}.
|
||||
*/
|
||||
MODIFIERS(ModifiersTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link NewArrayTree}.
|
||||
*/
|
||||
NEW_ARRAY(NewArrayTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link NewClassTree}.
|
||||
*/
|
||||
NEW_CLASS(NewClassTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LambdaExpressionTree}.
|
||||
*/
|
||||
LAMBDA_EXPRESSION(LambdaExpressionTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ParenthesizedTree}.
|
||||
*/
|
||||
PARENTHESIZED(ParenthesizedTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link PrimitiveTypeTree}.
|
||||
*/
|
||||
PRIMITIVE_TYPE(PrimitiveTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ReturnTree}.
|
||||
*/
|
||||
RETURN(ReturnTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link EmptyStatementTree}.
|
||||
*/
|
||||
EMPTY_STATEMENT(EmptyStatementTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SwitchTree}.
|
||||
*/
|
||||
SWITCH(SwitchTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SynchronizedTree}.
|
||||
*/
|
||||
SYNCHRONIZED(SynchronizedTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ThrowTree}.
|
||||
*/
|
||||
THROW(ThrowTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link TryTree}.
|
||||
*/
|
||||
TRY(TryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ParameterizedTypeTree}.
|
||||
*/
|
||||
PARAMETERIZED_TYPE(ParameterizedTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnionTypeTree}.
|
||||
*/
|
||||
UNION_TYPE(UnionTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link IntersectionTypeTree}.
|
||||
*/
|
||||
INTERSECTION_TYPE(IntersectionTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link TypeCastTree}.
|
||||
*/
|
||||
TYPE_CAST(TypeCastTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link TypeParameterTree}.
|
||||
*/
|
||||
TYPE_PARAMETER(TypeParameterTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link VariableTree}.
|
||||
*/
|
||||
VARIABLE(VariableTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link WhileLoopTree}.
|
||||
*/
|
||||
WHILE_LOOP(WhileLoopTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnaryTree} representing postfix
|
||||
* increment operator {@code ++}.
|
||||
*/
|
||||
POSTFIX_INCREMENT(UnaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnaryTree} representing postfix
|
||||
* decrement operator {@code --}.
|
||||
*/
|
||||
POSTFIX_DECREMENT(UnaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnaryTree} representing prefix
|
||||
* increment operator {@code ++}.
|
||||
*/
|
||||
PREFIX_INCREMENT(UnaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnaryTree} representing prefix
|
||||
* decrement operator {@code --}.
|
||||
*/
|
||||
PREFIX_DECREMENT(UnaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnaryTree} representing unary plus
|
||||
* operator {@code +}.
|
||||
*/
|
||||
UNARY_PLUS(UnaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnaryTree} representing unary minus
|
||||
* operator {@code -}.
|
||||
*/
|
||||
UNARY_MINUS(UnaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnaryTree} representing bitwise
|
||||
* complement operator {@code ~}.
|
||||
*/
|
||||
BITWISE_COMPLEMENT(UnaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UnaryTree} representing logical
|
||||
* complement operator {@code !}.
|
||||
*/
|
||||
LOGICAL_COMPLEMENT(UnaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* multiplication {@code *}.
|
||||
*/
|
||||
MULTIPLY(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* division {@code /}.
|
||||
*/
|
||||
DIVIDE(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* remainder {@code %}.
|
||||
*/
|
||||
REMAINDER(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* addition or string concatenation {@code +}.
|
||||
*/
|
||||
PLUS(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* subtraction {@code -}.
|
||||
*/
|
||||
MINUS(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* left shift {@code <<}.
|
||||
*/
|
||||
LEFT_SHIFT(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* right shift {@code >>}.
|
||||
*/
|
||||
RIGHT_SHIFT(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* unsigned right shift {@code >>>}.
|
||||
*/
|
||||
UNSIGNED_RIGHT_SHIFT(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* less-than {@code <}.
|
||||
*/
|
||||
LESS_THAN(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* greater-than {@code >}.
|
||||
*/
|
||||
GREATER_THAN(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* less-than-equal {@code <=}.
|
||||
*/
|
||||
LESS_THAN_EQUAL(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* greater-than-equal {@code >=}.
|
||||
*/
|
||||
GREATER_THAN_EQUAL(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* equal-to {@code ==}.
|
||||
*/
|
||||
EQUAL_TO(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* not-equal-to {@code !=}.
|
||||
*/
|
||||
NOT_EQUAL_TO(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* bitwise and logical "and" {@code &}.
|
||||
*/
|
||||
AND(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* bitwise and logical "xor" {@code ^}.
|
||||
*/
|
||||
XOR(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* bitwise and logical "or" {@code |}.
|
||||
*/
|
||||
OR(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* conditional-and {@code &&}.
|
||||
*/
|
||||
CONDITIONAL_AND(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link BinaryTree} representing
|
||||
* conditional-or {@code ||}.
|
||||
*/
|
||||
CONDITIONAL_OR(BinaryTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* multiplication assignment {@code *=}.
|
||||
*/
|
||||
MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* division assignment {@code /=}.
|
||||
*/
|
||||
DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* remainder assignment {@code %=}.
|
||||
*/
|
||||
REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* addition or string concatenation assignment {@code +=}.
|
||||
*/
|
||||
PLUS_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* subtraction assignment {@code -=}.
|
||||
*/
|
||||
MINUS_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* left shift assignment {@code <<=}.
|
||||
*/
|
||||
LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* right shift assignment {@code >>=}.
|
||||
*/
|
||||
RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* unsigned right shift assignment {@code >>>=}.
|
||||
*/
|
||||
UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* bitwise and logical "and" assignment {@code &=}.
|
||||
*/
|
||||
AND_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* bitwise and logical "xor" assignment {@code ^=}.
|
||||
*/
|
||||
XOR_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link CompoundAssignmentTree} representing
|
||||
* bitwise and logical "or" assignment {@code |=}.
|
||||
*/
|
||||
OR_ASSIGNMENT(CompoundAssignmentTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree} representing
|
||||
* an integral literal expression of type {@code int}.
|
||||
*/
|
||||
INT_LITERAL(LiteralTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree} representing
|
||||
* an integral literal expression of type {@code long}.
|
||||
*/
|
||||
LONG_LITERAL(LiteralTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree} representing
|
||||
* a floating-point literal expression of type {@code float}.
|
||||
*/
|
||||
FLOAT_LITERAL(LiteralTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree} representing
|
||||
* a floating-point literal expression of type {@code double}.
|
||||
*/
|
||||
DOUBLE_LITERAL(LiteralTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree} representing
|
||||
* a boolean literal expression of type {@code boolean}.
|
||||
*/
|
||||
BOOLEAN_LITERAL(LiteralTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree} representing
|
||||
* a character literal expression of type {@code char}.
|
||||
*/
|
||||
CHAR_LITERAL(LiteralTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree} representing
|
||||
* a string literal expression of type {@link String}.
|
||||
*/
|
||||
STRING_LITERAL(LiteralTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree} representing
|
||||
* the use of {@code null}.
|
||||
*/
|
||||
NULL_LITERAL(LiteralTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link WildcardTree} representing
|
||||
* an unbounded wildcard type argument.
|
||||
*/
|
||||
UNBOUNDED_WILDCARD(WildcardTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link WildcardTree} representing
|
||||
* an extends bounded wildcard type argument.
|
||||
*/
|
||||
EXTENDS_WILDCARD(WildcardTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link WildcardTree} representing
|
||||
* a super bounded wildcard type argument.
|
||||
*/
|
||||
SUPER_WILDCARD(WildcardTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ErroneousTree}.
|
||||
*/
|
||||
ERRONEOUS(ErroneousTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ClassTree} representing interfaces.
|
||||
*/
|
||||
INTERFACE(ClassTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ClassTree} representing enums.
|
||||
*/
|
||||
ENUM(ClassTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ClassTree} representing annotation types.
|
||||
*/
|
||||
ANNOTATION_TYPE(ClassTree.class),
|
||||
|
||||
/**
|
||||
* An implementation-reserved node. This is the not the node
|
||||
* you are looking for.
|
||||
*/
|
||||
OTHER(null);
|
||||
|
||||
|
||||
Kind(Class<? extends Tree> intf) {
|
||||
associatedInterface = intf;
|
||||
}
|
||||
|
||||
public Class<? extends Tree> asInterface() {
|
||||
return associatedInterface;
|
||||
}
|
||||
|
||||
private final Class<? extends Tree> associatedInterface;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the kind of this tree.
|
||||
*
|
||||
* @return the kind of this tree.
|
||||
*/
|
||||
Kind getKind();
|
||||
|
||||
/**
|
||||
* Accept method used to implement the visitor pattern. The
|
||||
* visitor pattern is used to implement operations on trees.
|
||||
*
|
||||
* @param <R> result type of this operation.
|
||||
* @param <D> type of additional data.
|
||||
*/
|
||||
<R,D> R accept(TreeVisitor<R,D> visitor, D data);
|
||||
}
|
||||
114
jdkSrc/jdk8/com/sun/source/tree/TreeVisitor.java
Normal file
114
jdkSrc/jdk8/com/sun/source/tree/TreeVisitor.java
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A visitor of trees, in the style of the visitor design pattern.
|
||||
* Classes implementing this interface are used to operate
|
||||
* on a tree when the kind of tree is unknown at compile time.
|
||||
* When a visitor is passed to an tree's {@link Tree#accept
|
||||
* accept} method, the <tt>visit<i>XYZ</i></tt> method most applicable
|
||||
* to that tree is invoked.
|
||||
*
|
||||
* <p> Classes implementing this interface may or may not throw a
|
||||
* {@code NullPointerException} if the additional parameter {@code p}
|
||||
* is {@code null}; see documentation of the implementing class for
|
||||
* details.
|
||||
*
|
||||
* <p> <b>WARNING:</b> It is possible that methods will be added to
|
||||
* this interface to accommodate new, currently unknown, language
|
||||
* structures added to future versions of the Java™ programming
|
||||
* language. Therefore, visitor classes directly implementing this
|
||||
* interface may be source incompatible with future versions of the
|
||||
* platform.
|
||||
*
|
||||
* @param <R> the return type of this visitor's methods. Use {@link
|
||||
* Void} for visitors that do not need to return results.
|
||||
* @param <P> the type of the additional parameter to this visitor's
|
||||
* methods. Use {@code Void} for visitors that do not need an
|
||||
* additional parameter.
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface TreeVisitor<R,P> {
|
||||
R visitAnnotatedType(AnnotatedTypeTree node, P p);
|
||||
R visitAnnotation(AnnotationTree node, P p);
|
||||
R visitMethodInvocation(MethodInvocationTree node, P p);
|
||||
R visitAssert(AssertTree node, P p);
|
||||
R visitAssignment(AssignmentTree node, P p);
|
||||
R visitCompoundAssignment(CompoundAssignmentTree node, P p);
|
||||
R visitBinary(BinaryTree node, P p);
|
||||
R visitBlock(BlockTree node, P p);
|
||||
R visitBreak(BreakTree node, P p);
|
||||
R visitCase(CaseTree node, P p);
|
||||
R visitCatch(CatchTree node, P p);
|
||||
R visitClass(ClassTree node, P p);
|
||||
R visitConditionalExpression(ConditionalExpressionTree node, P p);
|
||||
R visitContinue(ContinueTree node, P p);
|
||||
R visitDoWhileLoop(DoWhileLoopTree node, P p);
|
||||
R visitErroneous(ErroneousTree node, P p);
|
||||
R visitExpressionStatement(ExpressionStatementTree node, P p);
|
||||
R visitEnhancedForLoop(EnhancedForLoopTree node, P p);
|
||||
R visitForLoop(ForLoopTree node, P p);
|
||||
R visitIdentifier(IdentifierTree node, P p);
|
||||
R visitIf(IfTree node, P p);
|
||||
R visitImport(ImportTree node, P p);
|
||||
R visitArrayAccess(ArrayAccessTree node, P p);
|
||||
R visitLabeledStatement(LabeledStatementTree node, P p);
|
||||
R visitLiteral(LiteralTree node, P p);
|
||||
R visitMethod(MethodTree node, P p);
|
||||
R visitModifiers(ModifiersTree node, P p);
|
||||
R visitNewArray(NewArrayTree node, P p);
|
||||
R visitNewClass(NewClassTree node, P p);
|
||||
R visitLambdaExpression(LambdaExpressionTree node, P p);
|
||||
R visitParenthesized(ParenthesizedTree node, P p);
|
||||
R visitReturn(ReturnTree node, P p);
|
||||
R visitMemberSelect(MemberSelectTree node, P p);
|
||||
R visitMemberReference(MemberReferenceTree node, P p);
|
||||
R visitEmptyStatement(EmptyStatementTree node, P p);
|
||||
R visitSwitch(SwitchTree node, P p);
|
||||
R visitSynchronized(SynchronizedTree node, P p);
|
||||
R visitThrow(ThrowTree node, P p);
|
||||
R visitCompilationUnit(CompilationUnitTree node, P p);
|
||||
R visitTry(TryTree node, P p);
|
||||
R visitParameterizedType(ParameterizedTypeTree node, P p);
|
||||
R visitUnionType(UnionTypeTree node, P p);
|
||||
R visitIntersectionType(IntersectionTypeTree node, P p);
|
||||
R visitArrayType(ArrayTypeTree node, P p);
|
||||
R visitTypeCast(TypeCastTree node, P p);
|
||||
R visitPrimitiveType(PrimitiveTypeTree node, P p);
|
||||
R visitTypeParameter(TypeParameterTree node, P p);
|
||||
R visitInstanceOf(InstanceOfTree node, P p);
|
||||
R visitUnary(UnaryTree node, P p);
|
||||
R visitVariable(VariableTree node, P p);
|
||||
R visitWhileLoop(WhileLoopTree node, P p);
|
||||
R visitWildcard(WildcardTree node, P p);
|
||||
R visitOther(Tree node, P p);
|
||||
}
|
||||
54
jdkSrc/jdk8/com/sun/source/tree/TryTree.java
Normal file
54
jdkSrc/jdk8/com/sun/source/tree/TryTree.java
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a 'try' statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* try
|
||||
* <em>block</em>
|
||||
* <em>catches</em>
|
||||
* finally
|
||||
* <em>finallyBlock</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 14.20
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface TryTree extends StatementTree {
|
||||
BlockTree getBlock();
|
||||
List<? extends CatchTree> getCatches();
|
||||
BlockTree getFinallyBlock();
|
||||
List<? extends Tree> getResources();
|
||||
}
|
||||
46
jdkSrc/jdk8/com/sun/source/tree/TypeCastTree.java
Normal file
46
jdkSrc/jdk8/com/sun/source/tree/TypeCastTree.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a type cast expression.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* ( <em>type</em> ) <em>expression</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 15.16
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface TypeCastTree extends ExpressionTree {
|
||||
Tree getType();
|
||||
ExpressionTree getExpression();
|
||||
}
|
||||
66
jdkSrc/jdk8/com/sun/source/tree/TypeParameterTree.java
Normal file
66
jdkSrc/jdk8/com/sun/source/tree/TypeParameterTree.java
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a type parameter.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>name</em>
|
||||
*
|
||||
* <em>name</em> extends <em>bounds</em>
|
||||
*
|
||||
* <em>annotations</em> <em>name</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 4.4
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface TypeParameterTree extends Tree {
|
||||
Name getName();
|
||||
List<? extends Tree> getBounds();
|
||||
|
||||
/**
|
||||
* Return annotations on the type parameter declaration.
|
||||
*
|
||||
* Annotations need Target meta-annotations of
|
||||
* {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or
|
||||
* {@link java.lang.annotation.ElementType#TYPE_USE}
|
||||
* to appear in this position.
|
||||
*
|
||||
* @return annotations on the type parameter declaration
|
||||
* @since 1.8
|
||||
*/
|
||||
List<? extends AnnotationTree> getAnnotations();
|
||||
}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/UnaryTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/UnaryTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for postfix and unary expressions.
|
||||
* Use {@link #getKind getKind} to determine the kind of operator.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>operator</em> <em>expression</em>
|
||||
*
|
||||
* <em>expression</em> <em>operator</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls sections 15.14 and 15.15
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface UnaryTree extends ExpressionTree {
|
||||
ExpressionTree getExpression();
|
||||
}
|
||||
40
jdkSrc/jdk8/com/sun/source/tree/UnionTypeTree.java
Normal file
40
jdkSrc/jdk8/com/sun/source/tree/UnionTypeTree.java
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a union type expression in a multicatch var declaration.
|
||||
*
|
||||
* @author Maurizio Cimadamore
|
||||
*
|
||||
* @since 1.7
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface UnionTypeTree extends Tree {
|
||||
List<? extends Tree> getTypeAlternatives();
|
||||
}
|
||||
52
jdkSrc/jdk8/com/sun/source/tree/VariableTree.java
Normal file
52
jdkSrc/jdk8/com/sun/source/tree/VariableTree.java
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for a variable declaration.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* <em>modifiers</em> <em>type</em> <em>name</em> <em>initializer</em> ;
|
||||
* <em>modifiers</em> <em>type</em> <em>qualified-name</em>.this
|
||||
* </pre>
|
||||
*
|
||||
* @jls sections 8.3 and 14.4
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface VariableTree extends StatementTree {
|
||||
ModifiersTree getModifiers();
|
||||
Name getName();
|
||||
ExpressionTree getNameExpression();
|
||||
Tree getType();
|
||||
ExpressionTree getInitializer();
|
||||
}
|
||||
48
jdkSrc/jdk8/com/sun/source/tree/WhileLoopTree.java
Normal file
48
jdkSrc/jdk8/com/sun/source/tree/WhileLoopTree.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a 'while' loop statement.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* while ( <em>condition</em> )
|
||||
* <em>statement</em>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @jls section 14.12
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface WhileLoopTree extends StatementTree {
|
||||
ExpressionTree getCondition();
|
||||
StatementTree getStatement();
|
||||
}
|
||||
50
jdkSrc/jdk8/com/sun/source/tree/WildcardTree.java
Normal file
50
jdkSrc/jdk8/com/sun/source/tree/WildcardTree.java
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for a wildcard type argument.
|
||||
* Use {@link #getKind getKind} to determine the kind of bound.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
* ?
|
||||
*
|
||||
* ? extends <em>bound</em>
|
||||
*
|
||||
* ? super <em>bound</em>
|
||||
* </pre>
|
||||
*
|
||||
* @jls section 4.5.1
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface WildcardTree extends Tree {
|
||||
Tree getBound();
|
||||
}
|
||||
35
jdkSrc/jdk8/com/sun/source/tree/package-info.java
Normal file
35
jdkSrc/jdk8/com/sun/source/tree/package-info.java
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Provides interfaces to represent source code as abstract syntax
|
||||
* trees (AST).
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
package com.sun.source.tree;
|
||||
98
jdkSrc/jdk8/com/sun/source/util/DocSourcePositions.java
Normal file
98
jdkSrc/jdk8/com/sun/source/util/DocSourcePositions.java
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.util;
|
||||
|
||||
import com.sun.source.doctree.DocCommentTree;
|
||||
import com.sun.source.doctree.DocTree;
|
||||
import com.sun.source.tree.CompilationUnitTree;
|
||||
|
||||
/**
|
||||
* Provides methods to obtain the position of a DocTree within a javadoc comment.
|
||||
* A position is defined as a simple character offset from the start of a
|
||||
* CompilationUnit where the first character is at offset 0.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface DocSourcePositions extends SourcePositions {
|
||||
|
||||
/**
|
||||
* Gets the starting position of the tree within the comment within the file. If tree is not found within
|
||||
* file, or if the starting position is not available,
|
||||
* return {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* The given tree should be under the given comment tree, and the given documentation
|
||||
* comment tree should be returned from a {@link DocTrees#getDocCommentTree(com.sun.source.util.TreePath) }
|
||||
* for a tree under the given file.
|
||||
* The returned position must be at the start of the yield of this tree, that
|
||||
* is for any sub-tree of this tree, the following must hold:
|
||||
*
|
||||
* <p>
|
||||
* {@code tree.getStartPosition() <= subtree.getStartPosition()} or <br>
|
||||
* {@code tree.getStartPosition() == NOPOS} or <br>
|
||||
* {@code subtree.getStartPosition() == NOPOS}
|
||||
* </p>
|
||||
*
|
||||
* @param file CompilationUnit in which to find tree.
|
||||
* @param comment the comment tree that encloses the tree for which the
|
||||
* position is being sought
|
||||
* @param tree tree for which a position is sought.
|
||||
* @return the start position of tree.
|
||||
*/
|
||||
long getStartPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree);
|
||||
|
||||
/**
|
||||
* Gets the ending position of the tree within the comment within the file. If tree is not found within
|
||||
* file, or if the ending position is not available,
|
||||
* return {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* The given tree should be under the given comment tree, and the given documentation
|
||||
* comment tree should be returned from a {@link DocTrees#getDocCommentTree(com.sun.source.util.TreePath) }
|
||||
* for a tree under the given file.
|
||||
* The returned position must be at the end of the yield of this tree,
|
||||
* that is for any sub-tree of this tree, the following must hold:
|
||||
*
|
||||
* <p>
|
||||
* {@code tree.getEndPosition() >= subtree.getEndPosition()} or <br>
|
||||
* {@code tree.getEndPosition() == NOPOS} or <br>
|
||||
* {@code subtree.getEndPosition() == NOPOS}
|
||||
* </p>
|
||||
*
|
||||
* In addition, the following must hold:
|
||||
*
|
||||
* <p>
|
||||
* {@code tree.getStartPosition() <= tree.getEndPosition()} or <br>
|
||||
* {@code tree.getStartPosition() == NOPOS} or <br>
|
||||
* {@code tree.getEndPosition() == NOPOS}
|
||||
* </p>
|
||||
*
|
||||
* @param file CompilationUnit in which to find tree.
|
||||
* @param comment the comment tree that encloses the tree for which the
|
||||
* position is being sought
|
||||
* @param tree tree for which a position is sought.
|
||||
* @return the start position of tree.
|
||||
*/
|
||||
long getEndPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree);
|
||||
|
||||
}
|
||||
171
jdkSrc/jdk8/com/sun/source/util/DocTreePath.java
Normal file
171
jdkSrc/jdk8/com/sun/source/util/DocTreePath.java
Normal file
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.util;
|
||||
|
||||
import com.sun.source.doctree.DocCommentTree;
|
||||
import com.sun.source.doctree.DocTree;
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* A path of tree nodes, typically used to represent the sequence of ancestor
|
||||
* nodes of a tree node up to the top level DocCommentTree node.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public class DocTreePath implements Iterable<DocTree> {
|
||||
/**
|
||||
* Gets a documentation tree path for a tree node within a compilation unit.
|
||||
* @return null if the node is not found
|
||||
*/
|
||||
public static DocTreePath getPath(TreePath treePath, DocCommentTree doc, DocTree target) {
|
||||
return getPath(new DocTreePath(treePath, doc), target);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a documentation tree path for a tree node within a subtree identified by a DocTreePath object.
|
||||
* @return null if the node is not found
|
||||
*/
|
||||
public static DocTreePath getPath(DocTreePath path, DocTree target) {
|
||||
path.getClass();
|
||||
target.getClass();
|
||||
|
||||
class Result extends Error {
|
||||
static final long serialVersionUID = -5942088234594905625L;
|
||||
DocTreePath path;
|
||||
Result(DocTreePath path) {
|
||||
this.path = path;
|
||||
}
|
||||
}
|
||||
|
||||
class PathFinder extends DocTreePathScanner<DocTreePath,DocTree> {
|
||||
public DocTreePath scan(DocTree tree, DocTree target) {
|
||||
if (tree == target) {
|
||||
throw new Result(new DocTreePath(getCurrentPath(), target));
|
||||
}
|
||||
return super.scan(tree, target);
|
||||
}
|
||||
}
|
||||
|
||||
if (path.getLeaf() == target) {
|
||||
return path;
|
||||
}
|
||||
|
||||
try {
|
||||
new PathFinder().scan(path, target);
|
||||
} catch (Result result) {
|
||||
return result.path;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a DocTreePath for a root node.
|
||||
*
|
||||
* @param treePath the TreePath from which the root node was created.
|
||||
* @param t the DocCommentTree to create the path for.
|
||||
*/
|
||||
public DocTreePath(TreePath treePath, DocCommentTree t) {
|
||||
treePath.getClass();
|
||||
t.getClass();
|
||||
|
||||
this.treePath = treePath;
|
||||
this.docComment = t;
|
||||
this.parent = null;
|
||||
this.leaf = t;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a DocTreePath for a child node.
|
||||
*/
|
||||
public DocTreePath(DocTreePath p, DocTree t) {
|
||||
if (t.getKind() == DocTree.Kind.DOC_COMMENT) {
|
||||
throw new IllegalArgumentException("Use DocTreePath(TreePath, DocCommentTree) to construct DocTreePath for a DocCommentTree.");
|
||||
} else {
|
||||
treePath = p.treePath;
|
||||
docComment = p.docComment;
|
||||
parent = p;
|
||||
}
|
||||
leaf = t;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the TreePath associated with this path.
|
||||
* @return TreePath for this DocTreePath
|
||||
*/
|
||||
public TreePath getTreePath() {
|
||||
return treePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DocCommentTree associated with this path.
|
||||
* @return DocCommentTree for this DocTreePath
|
||||
*/
|
||||
public DocCommentTree getDocComment() {
|
||||
return docComment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the leaf node for this path.
|
||||
* @return DocTree for this DocTreePath
|
||||
*/
|
||||
public DocTree getLeaf() {
|
||||
return leaf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path for the enclosing node, or null if there is no enclosing node.
|
||||
* @return DocTreePath of parent
|
||||
*/
|
||||
public DocTreePath getParentPath() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public Iterator<DocTree> iterator() {
|
||||
return new Iterator<DocTree>() {
|
||||
public boolean hasNext() {
|
||||
return next != null;
|
||||
}
|
||||
|
||||
public DocTree next() {
|
||||
DocTree t = next.leaf;
|
||||
next = next.parent;
|
||||
return t;
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private DocTreePath next = DocTreePath.this;
|
||||
};
|
||||
}
|
||||
|
||||
private final TreePath treePath;
|
||||
private final DocCommentTree docComment;
|
||||
private final DocTree leaf;
|
||||
private final DocTreePath parent;
|
||||
}
|
||||
80
jdkSrc/jdk8/com/sun/source/util/DocTreePathScanner.java
Normal file
80
jdkSrc/jdk8/com/sun/source/util/DocTreePathScanner.java
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package com.sun.source.util;
|
||||
|
||||
import com.sun.source.doctree.DocTree;
|
||||
|
||||
/**
|
||||
* A DocTreeVisitor that visits all the child tree nodes, and provides
|
||||
* support for maintaining a path for the parent nodes.
|
||||
* To visit nodes of a particular type, just override the
|
||||
* corresponding visitorXYZ method.
|
||||
* Inside your method, call super.visitXYZ to visit descendant
|
||||
* nodes.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public class DocTreePathScanner<R, P> extends DocTreeScanner<R, P> {
|
||||
/**
|
||||
* Scan a tree from a position identified by a TreePath.
|
||||
*/
|
||||
public R scan(DocTreePath path, P p) {
|
||||
this.path = path;
|
||||
try {
|
||||
return path.getLeaf().accept(this, p);
|
||||
} finally {
|
||||
this.path = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan a single node.
|
||||
* The current path is updated for the duration of the scan.
|
||||
*/
|
||||
@Override
|
||||
public R scan(DocTree tree, P p) {
|
||||
if (tree == null)
|
||||
return null;
|
||||
|
||||
DocTreePath prev = path;
|
||||
path = new DocTreePath(path, tree);
|
||||
try {
|
||||
return tree.accept(this, p);
|
||||
} finally {
|
||||
path = prev;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current path for the node, as built up by the currently
|
||||
* active set of scan calls.
|
||||
*/
|
||||
public DocTreePath getCurrentPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
private DocTreePath path;
|
||||
}
|
||||
274
jdkSrc/jdk8/com/sun/source/util/DocTreeScanner.java
Normal file
274
jdkSrc/jdk8/com/sun/source/util/DocTreeScanner.java
Normal file
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.util;
|
||||
|
||||
import com.sun.source.doctree.*;
|
||||
|
||||
|
||||
/**
|
||||
* A TreeVisitor that visits all the child tree nodes.
|
||||
* To visit nodes of a particular type, just override the
|
||||
* corresponding visitXYZ method.
|
||||
* Inside your method, call super.visitXYZ to visit descendant
|
||||
* nodes.
|
||||
*
|
||||
* <p>The default implementation of the visitXYZ methods will determine
|
||||
* a result as follows:
|
||||
* <ul>
|
||||
* <li>If the node being visited has no children, the result will be null.
|
||||
* <li>If the node being visited has one child, the result will be the
|
||||
* result of calling {@code scan} on that child. The child may be a simple node
|
||||
* or itself a list of nodes.
|
||||
* <li> If the node being visited has more than one child, the result will
|
||||
* be determined by calling {@code scan} each child in turn, and then combining the
|
||||
* result of each scan after the first with the cumulative result
|
||||
* so far, as determined by the {@link #reduce} method. Each child may be either
|
||||
* a simple node of a list of nodes. The default behavior of the {@code reduce}
|
||||
* method is such that the result of the visitXYZ method will be the result of
|
||||
* the last child scanned.
|
||||
* </ul>
|
||||
*
|
||||
* <p>Here is an example to count the number of erroneous nodes in a tree:
|
||||
* <pre>
|
||||
* class CountErrors extends DocTreeScanner<Integer,Void> {
|
||||
* {@literal @}Override
|
||||
* public Integer visitErroneous(ErroneousTree node, Void p) {
|
||||
* return 1;
|
||||
* }
|
||||
* {@literal @}Override
|
||||
* public Integer reduce(Integer r1, Integer r2) {
|
||||
* return (r1 == null ? 0 : r1) + (r2 == null ? 0 : r2);
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public class DocTreeScanner<R,P> implements DocTreeVisitor<R,P> {
|
||||
|
||||
/**
|
||||
* Scan a single node.
|
||||
*/
|
||||
public R scan(DocTree node, P p) {
|
||||
return (node == null) ? null : node.accept(this, p);
|
||||
}
|
||||
|
||||
private R scanAndReduce(DocTree node, P p, R r) {
|
||||
return reduce(scan(node, p), r);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan a list of nodes.
|
||||
*/
|
||||
public R scan(Iterable<? extends DocTree> nodes, P p) {
|
||||
R r = null;
|
||||
if (nodes != null) {
|
||||
boolean first = true;
|
||||
for (DocTree node : nodes) {
|
||||
r = (first ? scan(node, p) : scanAndReduce(node, p, r));
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
private R scanAndReduce(Iterable<? extends DocTree> nodes, P p, R r) {
|
||||
return reduce(scan(nodes, p), r);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduces two results into a combined result.
|
||||
* The default implementation is to return the first parameter.
|
||||
* The general contract of the method is that it may take any action whatsoever.
|
||||
*/
|
||||
public R reduce(R r1, R r2) {
|
||||
return r1;
|
||||
}
|
||||
|
||||
|
||||
/* ***************************************************************************
|
||||
* Visitor methods
|
||||
****************************************************************************/
|
||||
|
||||
@Override
|
||||
public R visitAttribute(AttributeTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitAuthor(AuthorTree node, P p) {
|
||||
return scan(node.getName(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitComment(CommentTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitDeprecated(DeprecatedTree node, P p) {
|
||||
return scan(node.getBody(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitDocComment(DocCommentTree node, P p) {
|
||||
R r = scan(node.getFirstSentence(), p);
|
||||
r = scanAndReduce(node.getBody(), p, r);
|
||||
r = scanAndReduce(node.getBlockTags(), p, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitDocRoot(DocRootTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitEndElement(EndElementTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitEntity(EntityTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitErroneous(ErroneousTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitIdentifier(IdentifierTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitInheritDoc(InheritDocTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitLink(LinkTree node, P p) {
|
||||
R r = scan(node.getReference(), p);
|
||||
r = scanAndReduce(node.getLabel(), p, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitLiteral(LiteralTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitParam(ParamTree node, P p) {
|
||||
R r = scan(node.getName(), p);
|
||||
r = scanAndReduce(node.getDescription(), p, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitReference(ReferenceTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitReturn(ReturnTree node, P p) {
|
||||
return scan(node.getDescription(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitSee(SeeTree node, P p) {
|
||||
return scan(node.getReference(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitSerial(SerialTree node, P p) {
|
||||
return scan(node.getDescription(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitSerialData(SerialDataTree node, P p) {
|
||||
return scan(node.getDescription(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitSerialField(SerialFieldTree node, P p) {
|
||||
R r = scan(node.getName(), p);
|
||||
r = scanAndReduce(node.getType(), p, r);
|
||||
r = scanAndReduce(node.getDescription(), p, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitSince(SinceTree node, P p) {
|
||||
return scan(node.getBody(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitStartElement(StartElementTree node, P p) {
|
||||
return scan(node.getAttributes(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitText(TextTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitThrows(ThrowsTree node, P p) {
|
||||
R r = scan(node.getExceptionName(), p);
|
||||
r = scanAndReduce(node.getDescription(), p, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitUnknownBlockTag(UnknownBlockTagTree node, P p) {
|
||||
return scan(node.getContent(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitUnknownInlineTag(UnknownInlineTagTree node, P p) {
|
||||
return scan(node.getContent(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitValue(ValueTree node, P p) {
|
||||
return scan(node.getReference(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitVersion(VersionTree node, P p) {
|
||||
return scan(node.getBody(), p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R visitOther(DocTree node, P p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
89
jdkSrc/jdk8/com/sun/source/util/DocTrees.java
Normal file
89
jdkSrc/jdk8/com/sun/source/util/DocTrees.java
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.util;
|
||||
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.tools.JavaCompiler.CompilationTask;
|
||||
|
||||
import com.sun.source.doctree.DocCommentTree;
|
||||
import javax.tools.Diagnostic;
|
||||
|
||||
/**
|
||||
* Provides access to syntax trees for doc comments.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public abstract class DocTrees extends Trees {
|
||||
/**
|
||||
* Gets a DocTrees object for a given CompilationTask.
|
||||
* @param task the compilation task for which to get the Trees object
|
||||
* @throws IllegalArgumentException if the task does not support the Trees API.
|
||||
*/
|
||||
public static DocTrees instance(CompilationTask task) {
|
||||
return (DocTrees) Trees.instance(task);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a DocTrees object for a given ProcessingEnvironment.
|
||||
* @param env the processing environment for which to get the Trees object
|
||||
* @throws IllegalArgumentException if the env does not support the Trees API.
|
||||
*/
|
||||
public static DocTrees instance(ProcessingEnvironment env) {
|
||||
if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment"))
|
||||
throw new IllegalArgumentException();
|
||||
return (DocTrees) getJavacTrees(ProcessingEnvironment.class, env);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the doc comment tree, if any, for the Tree node identified by a given TreePath.
|
||||
* Returns null if no doc comment was found.
|
||||
*/
|
||||
public abstract DocCommentTree getDocCommentTree(TreePath path);
|
||||
|
||||
/**
|
||||
* Gets the language model element referred to by the leaf node of the given
|
||||
* {@link DocTreePath}, or null if unknown.
|
||||
*/
|
||||
public abstract Element getElement(DocTreePath path);
|
||||
|
||||
public abstract DocSourcePositions getSourcePositions();
|
||||
|
||||
/**
|
||||
* Prints a message of the specified kind at the location of the
|
||||
* tree within the provided compilation unit
|
||||
*
|
||||
* @param kind the kind of message
|
||||
* @param msg the message, or an empty string if none
|
||||
* @param t the tree to use as a position hint
|
||||
* @param root the compilation unit that contains tree
|
||||
*/
|
||||
public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg,
|
||||
com.sun.source.doctree.DocTree t,
|
||||
com.sun.source.doctree.DocCommentTree c,
|
||||
com.sun.source.tree.CompilationUnitTree root);
|
||||
}
|
||||
153
jdkSrc/jdk8/com/sun/source/util/JavacTask.java
Normal file
153
jdkSrc/jdk8/com/sun/source/util/JavacTask.java
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.util;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
import javax.lang.model.util.Elements;
|
||||
import javax.lang.model.util.Types;
|
||||
import javax.tools.JavaCompiler.CompilationTask;
|
||||
import javax.tools.JavaFileObject;
|
||||
|
||||
import com.sun.source.tree.CompilationUnitTree;
|
||||
import com.sun.source.tree.Tree;
|
||||
import com.sun.tools.javac.api.BasicJavacTask;
|
||||
import com.sun.tools.javac.processing.JavacProcessingEnvironment;
|
||||
import com.sun.tools.javac.util.Context;
|
||||
|
||||
/**
|
||||
* Provides access to functionality specific to the JDK Java Compiler, javac.
|
||||
*
|
||||
* @author Peter von der Ahé
|
||||
* @author Jonathan Gibbons
|
||||
* @since 1.6
|
||||
*/
|
||||
@jdk.Exported
|
||||
public abstract class JavacTask implements CompilationTask {
|
||||
|
||||
/**
|
||||
* Get the {@code JavacTask} for a {@code ProcessingEnvironment}.
|
||||
* If the compiler is being invoked using a
|
||||
* {@link javax.tools.JavaCompiler.CompilationTask CompilationTask},
|
||||
* then that task will be returned.
|
||||
* @param processingEnvironment the processing environment
|
||||
* @return the {@code JavacTask} for a {@code ProcessingEnvironment}
|
||||
* @since 1.8
|
||||
*/
|
||||
public static JavacTask instance(ProcessingEnvironment processingEnvironment) {
|
||||
if (!processingEnvironment.getClass().getName().equals(
|
||||
"com.sun.tools.javac.processing.JavacProcessingEnvironment"))
|
||||
throw new IllegalArgumentException();
|
||||
Context c = ((JavacProcessingEnvironment) processingEnvironment).getContext();
|
||||
JavacTask t = c.get(JavacTask.class);
|
||||
return (t != null) ? t : new BasicJavacTask(c, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the specified files returning a list of abstract syntax trees.
|
||||
*
|
||||
* @return a list of abstract syntax trees
|
||||
* @throws IOException if an unhandled I/O error occurred in the compiler.
|
||||
* @throws IllegalStateException if the operation cannot be performed at this time.
|
||||
*/
|
||||
public abstract Iterable<? extends CompilationUnitTree> parse()
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Complete all analysis.
|
||||
*
|
||||
* @return a list of elements that were analyzed
|
||||
* @throws IOException if an unhandled I/O error occurred in the compiler.
|
||||
* @throws IllegalStateException if the operation cannot be performed at this time.
|
||||
*/
|
||||
public abstract Iterable<? extends Element> analyze() throws IOException;
|
||||
|
||||
/**
|
||||
* Generate code.
|
||||
*
|
||||
* @return a list of files that were generated
|
||||
* @throws IOException if an unhandled I/O error occurred in the compiler.
|
||||
* @throws IllegalStateException if the operation cannot be performed at this time.
|
||||
*/
|
||||
public abstract Iterable<? extends JavaFileObject> generate() throws IOException;
|
||||
|
||||
/**
|
||||
* The specified listener will receive notification of events
|
||||
* describing the progress of this compilation task.
|
||||
*
|
||||
* If another listener is receiving notifications as a result of a prior
|
||||
* call of this method, then that listener will no longer receive notifications.
|
||||
*
|
||||
* Informally, this method is equivalent to calling {@code removeTaskListener} for
|
||||
* any listener that has been previously set, followed by {@code addTaskListener}
|
||||
* for the new listener.
|
||||
*
|
||||
* @throws IllegalStateException if the specified listener has already been added.
|
||||
*/
|
||||
public abstract void setTaskListener(TaskListener taskListener);
|
||||
|
||||
/**
|
||||
* The specified listener will receive notification of events
|
||||
* describing the progress of this compilation task.
|
||||
*
|
||||
* This method may be called at any time before or during the compilation.
|
||||
*
|
||||
* @throws IllegalStateException if the specified listener has already been added.
|
||||
* @since 1.8
|
||||
*/
|
||||
public abstract void addTaskListener(TaskListener taskListener);
|
||||
|
||||
/**
|
||||
* The specified listener will no longer receive notification of events
|
||||
* describing the progress of this compilation task.
|
||||
*
|
||||
* This method may be called at any time before or during the compilation.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
public abstract void removeTaskListener(TaskListener taskListener);
|
||||
|
||||
/**
|
||||
* Get a type mirror of the tree node determined by the specified path.
|
||||
* This method has been superceded by methods on
|
||||
* {@link com.sun.source.util.Trees Trees}.
|
||||
* @see com.sun.source.util.Trees#getTypeMirror
|
||||
*/
|
||||
public abstract TypeMirror getTypeMirror(Iterable<? extends Tree> path);
|
||||
|
||||
/**
|
||||
* Get a utility object for dealing with program elements.
|
||||
*/
|
||||
public abstract Elements getElements();
|
||||
|
||||
/**
|
||||
* Get a utility object for dealing with type mirrors.
|
||||
*/
|
||||
public abstract Types getTypes();
|
||||
}
|
||||
65
jdkSrc/jdk8/com/sun/source/util/Plugin.java
Normal file
65
jdkSrc/jdk8/com/sun/source/util/Plugin.java
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package com.sun.source.util;
|
||||
|
||||
import java.util.ServiceLoader;
|
||||
import javax.tools.StandardLocation;
|
||||
|
||||
/**
|
||||
* The interface for a javac plug-in.
|
||||
*
|
||||
* <p>The javac plug-in mechanism allows a user to specify one or more plug-ins
|
||||
* on the javac command line, to be started soon after the compilation
|
||||
* has begun. Plug-ins are identified by a user-friendly name. Each plug-in that
|
||||
* is started will be passed an array of strings, which may be used to
|
||||
* provide the plug-in with values for any desired options or other arguments.
|
||||
*
|
||||
* <p>Plug-ins are located via a {@link ServiceLoader},
|
||||
* using the same class path as annotation processors (i.e.
|
||||
* {@link StandardLocation#ANNOTATION_PROCESSOR_PATH ANNOTATION_PROCESSOR_PATH} or
|
||||
* {@code -processorpath}).
|
||||
*
|
||||
* <p>It is expected that a typical plug-in will simply register a
|
||||
* {@link TaskListener} to be informed of events during the execution
|
||||
* of the compilation, and that the rest of the work will be done
|
||||
* by the task listener.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public interface Plugin {
|
||||
/**
|
||||
* Get the user-friendly name of this plug-in.
|
||||
* @return the user-friendly name of the plug-in
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Initialize the plug-in for a given compilation task.
|
||||
* @param task The compilation task that has just been started
|
||||
* @param args Arguments, if any, for the plug-in
|
||||
*/
|
||||
void init(JavacTask task, String... args);
|
||||
}
|
||||
180
jdkSrc/jdk8/com/sun/source/util/SimpleDocTreeVisitor.java
Normal file
180
jdkSrc/jdk8/com/sun/source/util/SimpleDocTreeVisitor.java
Normal file
@@ -0,0 +1,180 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.source.util;
|
||||
|
||||
import com.sun.source.doctree.*;
|
||||
|
||||
/**
|
||||
* A simple visitor for tree nodes.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@jdk.Exported
|
||||
public class SimpleDocTreeVisitor<R,P> implements DocTreeVisitor<R, P> {
|
||||
protected final R DEFAULT_VALUE;
|
||||
|
||||
protected SimpleDocTreeVisitor() {
|
||||
DEFAULT_VALUE = null;
|
||||
}
|
||||
|
||||
protected SimpleDocTreeVisitor(R defaultValue) {
|
||||
DEFAULT_VALUE = defaultValue;
|
||||
}
|
||||
|
||||
protected R defaultAction(DocTree node, P p) {
|
||||
return DEFAULT_VALUE;
|
||||
}
|
||||
|
||||
public final R visit(DocTree node, P p) {
|
||||
return (node == null) ? null : node.accept(this, p);
|
||||
}
|
||||
|
||||
public final R visit(Iterable<? extends DocTree> nodes, P p) {
|
||||
R r = null;
|
||||
if (nodes != null) {
|
||||
for (DocTree node : nodes)
|
||||
r = visit(node, p);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
public R visitAttribute(AttributeTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitAuthor(AuthorTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitComment(CommentTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitDeprecated(DeprecatedTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitDocComment(DocCommentTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitDocRoot(DocRootTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitEndElement(EndElementTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitEntity(EntityTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitErroneous(ErroneousTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitIdentifier(IdentifierTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitInheritDoc(InheritDocTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitLink(LinkTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitLiteral(LiteralTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitParam(ParamTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitReference(ReferenceTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitReturn(ReturnTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitSee(SeeTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitSerial(SerialTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitSerialData(SerialDataTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitSerialField(SerialFieldTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitSince(SinceTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitStartElement(StartElementTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitText(TextTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitThrows(ThrowsTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitUnknownBlockTag(UnknownBlockTagTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitUnknownInlineTag(UnknownInlineTagTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitValue(ValueTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitVersion(VersionTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
public R visitOther(DocTree node, P p) {
|
||||
return defaultAction(node, p);
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user