public abstract class Trees extends Object
コンストラクタと説明 |
---|
Trees() |
修飾子と型 | メソッドと説明 |
---|---|
abstract String |
getDocComment(TreePath path)
指定された TreePath によって識別される Tree ノードのドキュメンテーションコメント (存在する場合) を取得します。
|
abstract Element |
getElement(TreePath path)
指定された TreePath によって識別される Tree ノードの Element を取得します。
|
abstract TypeMirror |
getLub(CatchTree tree)
catch 節で宣言された例外パラメータの lub を取得します。
|
abstract TypeMirror |
getOriginalType(ErrorType errorType)
ErrorType オブジェクトの元の型を取得します。
|
abstract TreePath |
getPath(CompilationUnitTree unit, Tree node)
指定されたコンパイルユニット内のツリーノードへのパスを取得します。
|
abstract TreePath |
getPath(Element e)
指定された Element の TreePath ノードを取得します。
|
abstract TreePath |
getPath(Element e, AnnotationMirror a)
指定された Element 上の AnnotationMirror の TreePath ノードを取得します。
|
abstract TreePath |
getPath(Element e, AnnotationMirror a, AnnotationValue v)
指定された Element 上の AnnotationMirror の AnnotationValue の TreePath ノードを取得します。
|
abstract Scope |
getScope(TreePath path)
指定された TreePath によって識別される Tree ノードの Scope を取得します。
|
abstract SourcePositions |
getSourcePositions()
ソース位置を取得するためのユーティリティーオブジェクトを取得します。
|
abstract Tree |
getTree(Element element)
指定された Element の Tree ノードを取得します。
|
abstract Tree |
getTree(Element e, AnnotationMirror a)
指定された Element 上の AnnotationMirror の Tree ノードを取得します。
|
abstract Tree |
getTree(Element e, AnnotationMirror a, AnnotationValue v)
指定された Element 上の AnnotationMirror の AnnotationValue の Tree ノードを取得します。
|
abstract MethodTree |
getTree(ExecutableElement method)
指定された ExecutableElement の MethodTree ノードを取得します。
|
abstract ClassTree |
getTree(TypeElement element)
指定された TypeElement の ClassTree ノードを取得します。
|
abstract TypeMirror |
getTypeMirror(TreePath path)
指定された TreePath によって識別される Tree ノードの TypeMirror を取得します。
|
static Trees |
instance(JavaCompiler.CompilationTask task)
指定された CompilationTask の Trees オブジェクトを取得します。
|
static Trees |
instance(ProcessingEnvironment env)
指定された ProcessingEnvironment の Trees オブジェクトを取得します。
|
abstract boolean |
isAccessible(Scope scope, Element member, DeclaredType type)
指定されたスコープ内で、指定された要素が、指定された型のメンバーとしてアクセス可能であるかどうかを判定します。
|
abstract boolean |
isAccessible(Scope scope, TypeElement type)
指定されたスコープ内で、指定された型にアクセス可能であるかどうかを判定します。
|
abstract void |
printMessage(Diagnostic.Kind kind, CharSequence msg, Tree t, CompilationUnitTree root)
指定されたコンパイル単位内のツリーの位置に、指定された種類のメッセージを出力します
|
public static Trees instance(JavaCompiler.CompilationTask task)
task
- Trees オブジェクトを取得するコンパイルタスクIllegalArgumentException
- タスクが Trees API をサポートしていない場合。public static Trees instance(ProcessingEnvironment env)
env
- Trees オブジェクトを取得する処理環境IllegalArgumentException
- env が Trees API をサポートしていない場合。public abstract SourcePositions getSourcePositions()
public abstract Tree getTree(Element element)
public abstract ClassTree getTree(TypeElement element)
public abstract MethodTree getTree(ExecutableElement method)
public abstract Tree getTree(Element e, AnnotationMirror a)
public abstract Tree getTree(Element e, AnnotationMirror a, AnnotationValue v)
public abstract TreePath getPath(CompilationUnitTree unit, Tree node)
public abstract TreePath getPath(Element e)
public abstract TreePath getPath(Element e, AnnotationMirror a)
public abstract TreePath getPath(Element e, AnnotationMirror a, AnnotationValue v)
public abstract Element getElement(TreePath path)
IllegalArgumentException
- TreePath が、関連付けられた Element を持つ可能性がある Tree ノードを識別しない場合。public abstract TypeMirror getTypeMirror(TreePath path)
IllegalArgumentException
- TreePath が、関連付けられた TypeMirror を持つ可能性がある Tree ノードを識別しない場合。public abstract Scope getScope(TreePath path)
public abstract String getDocComment(TreePath path)
public abstract boolean isAccessible(Scope scope, TypeElement type)
scope
- チェック対象のスコープtype
- チェック対象の型type
がアクセス可能な場合は truepublic abstract boolean isAccessible(Scope scope, Element member, DeclaredType type)
scope
- チェック対象のスコープmember
- チェック対象のメンバーtype
- メンバーがアクセス可能かどうかを判定する型type
の member
がアクセス可能な場合は truepublic abstract TypeMirror getOriginalType(ErrorType errorType)
errorType
- 元の型を取得する errorType。public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg, Tree t, CompilationUnitTree root)
kind
- メッセージの種類msg
- メッセージ、ない場合は空の文字列t
- 位置のヒントとして使用するツリーroot
- ツリーを格納するコンパイルユニットpublic abstract TypeMirror getLub(CatchTree tree)
tree
- catch 節のツリー
Copyright © 2005, 2013, Oracle and/or its affiliates. All rights reserved.