Module jdk.compiler

Interface AnnotationTree

所有超接口:
ExpressionTree, Tree

public interface AnnotationTree extends ExpressionTree
用于注解的树节点。例如:
    @annotationType
    @annotationType ( arguments )
 
参见 Java语言规范:
9.7 注解
自版本:
1.6
  • Nested Class Summary

    Nested classes/interfaces declared in interface com.sun.source.tree.Tree

    Tree.Kind
  • Method Summary

    Modifier and Type
    Method
    Description
    返回注解类型。
    List<? extends ExpressionTree>
    返回注解的参数(如果有)。

    Methods declared in interface com.sun.source.tree.Tree

    accept, getKind
  • Method Details

    • getAnnotationType

      Tree getAnnotationType()
      返回注解类型。
      返回:
      注解类型
    • getArguments

      List<? extends ExpressionTree> getArguments()
      返回注解的参数(如果有)。
      返回:
      注解类型的参数