クラスTreePathScanner<R,P>
java.lang.Object
com.sun.source.util.TreeScanner<R,P>
com.sun.source.util.TreePathScanner<R,P>
- 型パラメータ:
R- このビジターのメソッドの戻り型。 結果を返すことを必要としないビジターのVoidを使用する。P- このビジターのメソッドに対する追加パラメータのタイプ。 追加のパラメータを必要としないビジターのVoidを使用する。
- すべての実装されたインタフェース:
TreeVisitor<R,P>
public class TreePathScanner<R,P> extends TreeScanner<R,P>
すべての子ツリー・ノードを巡回し、親ノードのパスを維持するためのサポートを提供するTreeVisitorです。 特定の型のノードを巡回するには、対応するvisitorXYZメソッドを単にオーバーライドします。 独自のメソッド内では、super.visitXYZを呼び出して、下位ノードを巡回します。
- APIのノート:
- "電流経路"を初期化するには、
scanメソッドのいずれかをコールしてスキャンを開始する必要があります。 - 導入されたバージョン:
- 1.6
-
コンストラクタのサマリー
コンストラクタ -
メソッドのサマリー
クラスで宣言されたメソッド TreeScanner
reduce, scan, visitAnnotatedType, visitAnnotation, visitAnyPattern, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBindingPattern, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitConstantCaseLabel, visitContinue, visitDeconstructionPattern, visitDefaultCaseLabel, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitModule, visitNewArray, visitNewClass, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPatternCaseLabel, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSwitchExpression, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard, visitYield修飾子と型メソッド説明2つの結果を1つの結合された結果にします。一連のノードをスキャンします。visitAnnotatedType(AnnotatedTypeTree node, P p) AnnotatedTypeTreeノードにビジットします。visitAnnotation(AnnotationTree node, P p) AnnotatedTreeノードにビジットします。visitAnyPattern(AnyPatternTree node, P p) AnyPatternTreeノードにアクセスします。visitArrayAccess(ArrayAccessTree node, P p) ArrayAccessTreeノードにビジットします。visitArrayType(ArrayTypeTree node, P p) ArrayTypeTreeノードにビジットします。visitAssert(AssertTree node, P p) AssertTreeノードにビジットします。visitAssignment(AssignmentTree node, P p) AssignmentTreeノードにビジットします。visitBinary(BinaryTree node, P p) BinaryTreeノードにビジットします。visitBindingPattern(BindingPatternTree node, P p) BindingPatternTreeノードにビジットします。visitBlock(BlockTree node, P p) BlockTreeノードにビジットします。visitBreak(BreakTree node, P p) BreakTreeノードにビジットします。CaseTreeノードにビジットします。visitCatch(CatchTree node, P p) CatchTreeノードにビジットします。visitClass(ClassTree node, P p) ClassTreeノードにビジットします。visitCompilationUnit(CompilationUnitTree node, P p) CompilationUnitTreeノードにビジットします。CompoundAssignmentTreeノードにビジットします。ConditionalExpressionTreeノードにビジットします。visitConstantCaseLabel(ConstantCaseLabelTree node, P p) ConstantCaseLabelTreeノードにアクセスします。visitContinue(ContinueTree node, P p) ContinueTreeノードにビジットします。DeconstructionPatternTreeノードにアクセスします。visitDefaultCaseLabel(DefaultCaseLabelTree node, P p) DefaultCaseLabelTreeノードにビジットします。visitDoWhileLoop(DoWhileLoopTree node, P p) DoWhileTreeノードにビジットします。visitEmptyStatement(EmptyStatementTree node, P p) EmptyStatementTreeノードにビジットします。visitEnhancedForLoop(EnhancedForLoopTree node, P p) EnhancedForLoopTreeノードにビジットします。visitErroneous(ErroneousTree node, P p) ErroneousTreeノードにビジットします。visitExports(ExportsTree node, P p) ExportsTreeノードにビジットします。ExpressionStatementTreeノードにビジットします。visitForLoop(ForLoopTree node, P p) ForLoopTreeノードにビジットします。visitIdentifier(IdentifierTree node, P p) IdentifierTreeノードにビジットします。IfTreeノードにビジットします。visitImport(ImportTree node, P p) ImportTreeノードにビジットします。visitInstanceOf(InstanceOfTree node, P p) InstanceOfTreeノードにビジットします。visitIntersectionType(IntersectionTypeTree node, P p) IntersectionTypeTreeノードにビジットします。visitLabeledStatement(LabeledStatementTree node, P p) LabeledStatementTreeノードにビジットします。visitLambdaExpression(LambdaExpressionTree node, P p) LambdaExpressionTreeノードにビジットします。visitLiteral(LiteralTree node, P p) LiteralTreeノードにビジットします。visitMemberReference(MemberReferenceTree node, P p) MemberReferenceTreeノードにビジットします。visitMemberSelect(MemberSelectTree node, P p) MemberSelectTreeノードにビジットします。visitMethod(MethodTree node, P p) MethodTreeノードにビジットします。visitMethodInvocation(MethodInvocationTree node, P p) MethodInvocationTreeノードにビジットします。visitModifiers(ModifiersTree node, P p) ModifiersTreeノードにビジットします。visitModule(ModuleTree node, P p) ModuleTreeノードにビジットします。visitNewArray(NewArrayTree node, P p) NewArrayTreeノードにビジットします。visitNewClass(NewClassTree node, P p) NewClassTreeノードにビジットします。visitOpens(OpensTree node, P p) OpensTreeノードにビジットします。visitOther(Tree node, P p) 不明なタイプのTreeノードにビジットします。visitPackage(PackageTree node, P p) PackageTreeノードにビジットします。visitParameterizedType(ParameterizedTypeTree node, P p) ParameterizedTypeTreeノードにビジットします。visitParenthesized(ParenthesizedTree node, P p) ParenthesizedTreeノードにビジットします。visitPatternCaseLabel(PatternCaseLabelTree node, P p) PatternCaseLabelTreeノードにアクセスします。visitPrimitiveType(PrimitiveTypeTree node, P p) PrimitiveTypeTreeノードにビジットします。visitProvides(ProvidesTree node, P p) ProvidesTreeノードにビジットします。visitRequires(RequiresTree node, P p) RequiresTreeノードにビジットします。visitReturn(ReturnTree node, P p) ReturnTreeノードにビジットします。visitSwitch(SwitchTree node, P p) SwitchTreeノードにビジットします。visitSwitchExpression(SwitchExpressionTree node, P p) SwitchExpressionTreeノードにビジットします。visitSynchronized(SynchronizedTree node, P p) SynchronizedTreeノードにビジットします。visitThrow(ThrowTree node, P p) ThrowTreeノードにビジットします。TryTreeノードにビジットします。visitTypeCast(TypeCastTree node, P p) TypeCastTreeノードにビジットします。visitTypeParameter(TypeParameterTree node, P p) TypeParameterTreeノードにビジットします。visitUnary(UnaryTree node, P p) UnaryTreeノードにビジットします。visitUnionType(UnionTypeTree node, P p) UnionTypeTreeノードにビジットします。UsesTreeノードにビジットします。visitVariable(VariableTree node, P p) VariableTreeノードにビジットします。visitWhileLoop(WhileLoopTree node, P p) WhileLoopTreeノードにビジットします。visitWildcard(WildcardTree node, P p) WildcardTypeTreeノードにビジットします。visitYield(YieldTree node, P p) YieldTreeノードにビジットします。クラスオブジェクトで宣言されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait修飾子と型メソッド説明protected Objectclone()このオブジェクトのコピーを作成して、返します。booleanこのオブジェクトと他のオブジェクトが等しいかどうかを示します。protected voidfinalize()削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。最終決定は非推奨であり、将来のリリースで削除される可能性があります。final Class<?> getClass()このObjectの実行時クラスを返します。inthashCode()このオブジェクトに対するハッシュ・コード値を返します。final voidnotify()このオブジェクトのモニターで待機中のスレッドを1つ再開します。final voidこのオブジェクトのモニターで待機中のすべてのスレッドを再開します。toString()オブジェクトの文字列表現を返します。final voidwait()現在のスレッドが目覚めるまで待機します。通常、notifiedまたはinterruptedです。final voidwait(long timeoutMillis) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。final voidwait(long timeoutMillis, int nanos) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
-
コンストラクタの詳細
-
TreePathScanner
public TreePathScanner()TreePathScannerを構築します。
-
-
メソッドの詳細
-
scan
-
scan
単一ノードをスキャンします。 現在のパスは、スキャンの期間中に更新されます。- オーバーライド:
- クラス
TreeScanner<R,のP> scan - APIのノート:
- 通常、このメソッドは、
scan(TreePath, P)によって開始される進行中のスキャンの一部として、スキャナのvisitメソッドによってのみコールされます。 1つの例外は、CompilationUnitTreeのフル・スキャンを開始するために呼び出されることもあります。 - パラメータ:
tree- スキャンするノードp- 訪問メソッドに渡されるパラメータ値- 戻り値:
- 訪問メソッドの結果値
-
getCurrentPath
-