mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
6843077: JSR 308: Annotations on types
Co-authored-by: Mahmood Ali <mali@csail.mit.edu> Co-authored-by: Matt Papi <mpapi@csail.mit.edu> Reviewed-by: jjg, mcimadamore, darcy
This commit is contained in:
parent
2b12b62ad4
commit
5a1465b9de
45 changed files with 1856 additions and 98 deletions
|
@ -53,6 +53,7 @@ public interface MethodTree extends Tree {
|
|||
Tree getReturnType();
|
||||
List<? extends TypeParameterTree> getTypeParameters();
|
||||
List<? extends VariableTree> getParameters();
|
||||
List<? extends AnnotationTree> getReceiverAnnotations();
|
||||
List<? extends ExpressionTree> getThrows();
|
||||
BlockTree getBody();
|
||||
Tree getDefaultValue(); // for annotation types
|
||||
|
|
|
@ -45,6 +45,9 @@ public interface Tree {
|
|||
* Enumerates all kinds of trees.
|
||||
*/
|
||||
public enum Kind {
|
||||
|
||||
ANNOTATED_TYPE(AnnotatedTypeTree.class),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link AnnotationTree}.
|
||||
*/
|
||||
|
|
|
@ -57,6 +57,7 @@ package com.sun.source.tree;
|
|||
* @since 1.6
|
||||
*/
|
||||
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);
|
||||
|
|
|
@ -47,4 +47,5 @@ import javax.lang.model.element.Name;
|
|||
public interface TypeParameterTree extends Tree {
|
||||
Name getName();
|
||||
List<? extends Tree> getBounds();
|
||||
List<? extends AnnotationTree> getAnnotations();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue