インタフェースcom.sun.source.tree.Tree
の使用

Treeを使用するパッケージ
パッケージ
説明
ソース・コードを抽象構文ツリー(Abstract Syntax Tree、AST)として表すためのインタフェースを提供します。
抽象構文ツリー(Abstract Syntax Tree、AST)の操作のためのユーティリティを提供します。
  • com.sun.source.treeでのTreeの使用

    com.sun.source.treeでのTreeのサブインタフェース
    修飾子と型
    インタフェース
    説明
    interface 
    注釈付き型のツリー・ノード。
    interface 
    注釈のツリー・ノードです。
    interface 
    配列アクセス式のツリー・ノードです。
    interface 
    配列型のツリー・ノードです。
    interface 
    assert文のツリー・ノード。
    interface 
    代入式のツリー・ノードです。
    interface 
    バイナリ式のツリー・ノードです。
    interface 
    バインディング・パターン・ツリー
    interface 
    文ブロックのツリー・ノードです。
    interface 
    break文のツリー・ノード。
    interface 
    Preview.
    CaseTreeラベルとして使用できるTreeのマーカー・インタフェース。
    interface 
    switch文または式のcaseのツリー・ノード。
    interface 
    try文のcatchブロックのツリー・ノード。
    interface 
    クラス、インタフェース、列挙、レコードまたは注釈型の宣言のツリー・ノード。
    interface 
    通常のコンパイル・ユニットおよびモジュラ・コンパイル・ユニットの抽象構文ツリーを表します。
    interface 
    複合代入演算子のツリー・ノードです。
    interface 
    条件演算子? :のツリー・ノード。
    interface 
    continue文のツリー・ノード。
    interface 
    Preview.
    case null, defaultdefaultをマークするケース・ラベル。
    interface 
    ModuleTreeのすべてのディレクティブのスーパー型。
    interface 
    do文のツリー・ノード。
    interface 
    空の文(スキップ文)のツリー・ノードです。
    interface 
    "enhanced" for loop文のツリー・ノード。
    interface 
    不正な式の代用となるツリー・ノードです。
    interface 
    モジュール宣言の'exports'ディレクティブのツリー・ノード。
    interface 
    「expression」文のツリー・ノードです。
    interface 
    異なる型の式の基底クラスとして使用されるツリー・ノードです。
    interface 
    基本的なforループ文のツリー・ノード。
    interface 
    Preview.
    ガード・パターン・ツリー。
    interface 
    識別子の式のツリー・ノードです。
    interface 
    if文のツリー・ノード。
    interface 
    インポート宣言のツリー・ノード。
    interface 
    instanceof式のツリー・ノード。
    interface 
    キャスト式のintersection型のツリー・ノードです。
    interface 
    ラベル付き文のツリー・ノードです。
    interface 
    ラムダ式のツリー・ノードです。
    interface 
    リテラル式のツリー・ノードです。
    interface 
    メンバー参照式のツリー・ノードです。
    interface 
    メンバー・アクセス式のツリー・ノードです。
    interface 
    メソッド呼出し式のツリー・ノードです。
    interface 
    メソッドまたは注釈の型要素宣言のツリー・ノードです。
    interface 
    宣言のための、注釈を含む修飾子のツリー・ノードです。
    interface 
    モジュール宣言のツリー・ノード。
    interface 
    配列の新しいインスタンスを作成する式のツリー・ノードです。
    interface 
    クラスの新しいインスタンスを宣言するためのツリー・ノードです。
    interface 
    モジュール宣言の'opens'ディレクティブのツリー・ノード。
    interface 
    パッケージ宣言を表します。
    interface 
    型パラメータを含む型の式のツリー・ノードです。
    interface 
    Preview.
    カッコ化されたパターンのツリー・ノード。
    interface 
    括弧で囲まれた式のツリー・ノードです。
    interface 
    異なる種類のパターンのベース・クラスとして使用されるツリー・ノード。
    interface 
    プリミティブ型のツリー・ノードです。
    interface 
    モジュール宣言の'provides'ディレクティブのツリー・ノード。
    interface 
    モジュール宣言の'requires'ディレクティブのツリー・ノード。
    interface 
    return文のツリー・ノード。
    interface 
    異なる種類の文の基底クラスとして使用されるツリー・ノードです。
    interface 
    switch式のツリー・ノード。
    interface 
    switch文のツリー・ノード。
    interface 
    synchronized文のツリー・ノード。
    interface 
    throw文のツリー・ノード。
    interface 
    try文のツリー・ノード。
    interface 
    型キャスト式のツリー・ノードです。
    interface 
    型パラメータのツリー・ノードです。
    interface 
    後置式および単項式のツリー・ノードです。
    interface 
    マルチ・パッチ変数宣言のユニオン型式のツリー・ノード。
    interface 
    モジュール宣言の'uses'ディレクティブのツリー・ノード。
    interface 
    変数宣言のツリー・ノードです。
    interface 
    while loop文のツリー・ノード。
    interface 
    ワイルドカード型引数のツリー・ノードです。
    interface 
    yield文のツリー・ノード。
    Treeを返すcom.sun.source.treeのメソッド
    修飾子と型
    メソッド
    説明
    AnnotationTree.getAnnotationType()
    注釈型を返します。
    default Tree
    CaseTree.getBody()
    CaseTree.CaseKind.RULEの種類の場合、矢印のあとに文または式を返します。
    LambdaExpressionTree.getBody()
    ラムダ式の本文を返します。
    WildcardTree.getBound()
    ワイルドカードの境界を返します。
    MethodTree.getDefaultValue()
    これが注釈型宣言内の要素である場合、デフォルト値を返します。
    ClassTree.getExtendsClause()
    この型宣言のスーパー型を返します。指定されていない場合はnullを返します。
    インポートされる宣言の修飾識別子を返します。
    MethodTree.getReturnType()
    宣言されているメソッドの戻り値の型を返します。
    ArrayTypeTree.getType()
    この配列型の要素型を返します。
    InstanceOfTree.getType()
    チェックする型を返します。
    NewArrayTree.getType()
    式の基本型を返します。
    ParameterizedTypeTree.getType()
    基本型を返します。
    TypeCastTree.getType()
    キャストのターゲット型を返します。
    VariableTree.getType()
    宣言されている変数の型を返します。
    Tree型の引数を持つ型を返すcom.sun.source.treeのメソッド
    修飾子と型
    メソッド
    説明
    Class<? extends Tree>
    Tree.Kind.asInterface()
    このタイプを使用する関連するインタフェース型を返します。
    List<? extends Tree>
    IntersectionTypeTree.getBounds()
    型の境界を返します。
    List<? extends Tree>
    TypeParameterTree.getBounds()
    型パラメータの境界を返します。
    List<? extends Tree>
    ErroneousTree.getErrorTrees()
    このノードに保存されたツリーを返します。
    List<? extends Tree>
    この型宣言によって実装されたインタフェースを返します。
    List<? extends Tree>
    ClassTree.getMembers()
    この型宣言で宣言されたメンバーを返します。
    default List<? extends Tree>
    ClassTree.getPermitsClause()
    この型宣言によって許可されるサブクラスを返します。
    List<? extends Tree>
    TryTree.getResources()
    try文で提供されているリソース宣言を返します。
    List<? extends Tree>
    UnionTypeTree.getTypeAlternatives()
    代替型式を返します。
    List<? extends Tree>
    MethodInvocationTree.getTypeArguments()
    このメソッド呼び出しの型引数を返します。
    List<? extends Tree>
    NewClassTree.getTypeArguments()
    作成中のオブジェクトの型引数を返します。
    List<? extends Tree>
    ParameterizedTypeTree.getTypeArguments()
    型引数を返します。
    List<? extends Tree>
    CompilationUnitTree.getTypeDecls()
    このコンパイル・ユニットに表示される型宣言、または型宣言がない場合は空のリストを戻します。
    Tree型のパラメータを持つcom.sun.source.treeのメソッド
    修飾子と型
    メソッド
    説明
    TreeVisitor.visitOther(Tree node, P p)
    未知の型のTreeノードをビジットします。
  • com.sun.source.utilでのTreeの使用

    Treeを返すcom.sun.source.utilのメソッド
    修飾子と型
    メソッド
    説明
    TreePath.getLeaf()
    このパスのリーフ・ノードを返します。
    abstract Tree
    Trees.getTree(Element element)
    指定されたElementのTreeノードを返します。
    abstract Tree
    指定されたElementのAnnotationMirrorのTreeノードを返します。
    abstract Tree
    指定されたElementのAnnotationMirrorのAnnotationValueのTreeノードを返します。
    Tree型の引数を持つ型を返すcom.sun.source.utilのメソッド
    修飾子と型
    メソッド
    説明
    TreePath.iterator()
    リーフからルートまで繰り返します。
    Tree型のパラメータを持つcom.sun.source.utilのメソッド
    修飾子と型
    メソッド
    説明
    protected R
    SimpleTreeVisitor.defaultAction(Tree node, P p)
    オーバーライドされていないすべてのメソッドで使用されるデフォルト・アクション。
    long
    SourcePositions.getEndPosition(CompilationUnitTree file, Tree tree)
    ファイル内のツリーの終了位置を返します。
    static TreePath
    TreePath.getPath(CompilationUnitTree unit, Tree target)
    コンパイル単位内のツリー・ノードのツリー・パスを返します。ノードが見つからない場合はnullを返します。
    static TreePath
    TreePath.getPath(TreePath path, Tree target)
    TreePathオブジェクトによって識別されるサブツリー内のツリー・ノードのツリー・パスを返します。
    abstract TreePath
    Trees.getPath(CompilationUnitTree unit, Tree node)
    指定されたコンパイル単位内のツリー・ノードへのパスを返します。
    long
    SourcePositions.getStartPosition(CompilationUnitTree file, Tree tree)
    ファイル内のツリーの開始位置を返します。
    abstract void
    指定されたコンパイル単位内のツリーの位置に、指定された種類のメッセージを出力します
    TreePathScanner.scan(Tree tree, P p)
    1つのノードをスキャンします。
    TreeScanner.scan(Tree tree, P p)
    1つのノードをスキャンします。
    final R
    SimpleTreeVisitor.visit(Tree node, P p)
    ノードの型に固有の適切なメソッドを呼び出します。
    SimpleTreeVisitor.visitOther(Tree node, P p)
    未知の型のTreeノードをビジットします。
    TreeScanner.visitOther(Tree node, P p)
    未知の型のTreeノードをビジットします。
    Tree型の型引数を持つcom.sun.source.utilのメソッド・パラメータ
    修飾子と型
    メソッド
    説明
    abstract TypeMirror
    JavacTask.getTypeMirror(Iterable<? extends Tree> path)
    指定されたパスによって決定されるツリー・ノードの型ミラーを返します。
    TreeScanner.scan(Iterable<? extends Tree> nodes, P p)
    一連のノードをスキャンします。
    final R
    SimpleTreeVisitor.visit(Iterable<? extends Tree> nodes, P p)
    一連のノードのそれぞれに対して適切なメソッドを呼び出します。
    Tree型のパラメータを持つcom.sun.source.utilのコンストラクタ
    修飾子
    コンストラクタ
    説明
     
    TreePath(TreePath path, Tree tree)
    子ノードのTreePathを作成します。