org.codehaus.janino.util
Class Traverser
org.codehaus.janino.util.Traverser
- Direct Known Subclasses:
- DeclarationCounter
public class Traverser
- extends
This class traverses the subnodes of an AST. Derived classes may override
individual methods to process specific nodes, e.g.:
LocalClassDeclaration lcd = ...;
lcd.accept(new Traverser() {
int n = 0;
public void traverseMethodDeclarator(Java.MethodDeclarator md) {
++this.n;
super.traverseMethodDeclarator(md);
}
}.comprehensiveVisitor());
Methods inherited from class java.lang. |
, , , , , , , , , , |
Traverser
public Traverser()
comprehensiveVisitor
public Visitor.ComprehensiveVisitor comprehensiveVisitor()
- See Also:
Traverser
traverseCompilationUnit
public void traverseCompilationUnit(Java.CompilationUnit cu)
- See Also:
Traverser
traverseSingleTypeImportDeclaration
public void traverseSingleTypeImportDeclaration(Java.CompilationUnit.SingleTypeImportDeclaration stid)
- See Also:
Traverser
traverseTypeImportOnDemandDeclaration
public void traverseTypeImportOnDemandDeclaration(Java.CompilationUnit.TypeImportOnDemandDeclaration tiodd)
- See Also:
Traverser
traverseSingleStaticImportDeclaration
public void traverseSingleStaticImportDeclaration(Java.CompilationUnit.SingleStaticImportDeclaration stid)
- See Also:
Traverser
traverseStaticImportOnDemandDeclaration
public void traverseStaticImportOnDemandDeclaration(Java.CompilationUnit.StaticImportOnDemandDeclaration siodd)
- See Also:
Traverser
traverseImportDeclaration
public void traverseImportDeclaration(Java.CompilationUnit.ImportDeclaration id)
- See Also:
Traverser
traverseAnonymousClassDeclaration
public void traverseAnonymousClassDeclaration(Java.AnonymousClassDeclaration acd)
- See Also:
Traverser
traverseLocalClassDeclaration
public void traverseLocalClassDeclaration(Java.LocalClassDeclaration lcd)
- See Also:
Traverser
traversePackageMemberClassDeclaration
public void traversePackageMemberClassDeclaration(Java.PackageMemberClassDeclaration pmcd)
- See Also:
Traverser
traverseMemberInterfaceDeclaration
public void traverseMemberInterfaceDeclaration(Java.MemberInterfaceDeclaration mid)
- See Also:
Traverser
traversePackageMemberInterfaceDeclaration
public void traversePackageMemberInterfaceDeclaration(Java.PackageMemberInterfaceDeclaration pmid)
- See Also:
Traverser
traverseMemberClassDeclaration
public void traverseMemberClassDeclaration(Java.MemberClassDeclaration mcd)
- See Also:
Traverser
traverseConstructorDeclarator
public void traverseConstructorDeclarator(Java.ConstructorDeclarator cd)
- See Also:
Traverser
traverseInitializer
public void traverseInitializer(Java.Initializer i)
- See Also:
Traverser
traverseMethodDeclarator
public void traverseMethodDeclarator(Java.MethodDeclarator md)
- See Also:
Traverser
traverseFieldDeclaration
public void traverseFieldDeclaration(Java.FieldDeclaration fd)
- See Also:
Traverser
traverseLabeledStatement
public void traverseLabeledStatement(Java.LabeledStatement ls)
- See Also:
Traverser
traverseBlock
public void traverseBlock(Java.Block b)
- See Also:
Traverser
traverseExpressionStatement
public void traverseExpressionStatement(Java.ExpressionStatement es)
- See Also:
Traverser
traverseIfStatement
public void traverseIfStatement(Java.IfStatement is)
- See Also:
Traverser
traverseForStatement
public void traverseForStatement(Java.ForStatement fs)
- See Also:
Traverser
traverseForEachStatement
public void traverseForEachStatement(Java.ForEachStatement fes)
- See Also:
Traverser
traverseWhileStatement
public void traverseWhileStatement(Java.WhileStatement ws)
- See Also:
Traverser
traverseTryStatement
public void traverseTryStatement(Java.TryStatement ts)
- See Also:
Traverser
traverseSwitchStatement
public void traverseSwitchStatement(Java.SwitchStatement ss)
- See Also:
Traverser
traverseSynchronizedStatement
public void traverseSynchronizedStatement(Java.SynchronizedStatement ss)
- See Also:
Traverser
traverseDoStatement
public void traverseDoStatement(Java.DoStatement ds)
- See Also:
Traverser
traverseLocalVariableDeclarationStatement
public void traverseLocalVariableDeclarationStatement(Java.LocalVariableDeclarationStatement lvds)
- See Also:
Traverser
traverseReturnStatement
public void traverseReturnStatement(Java.ReturnStatement rs)
- See Also:
Traverser
traverseThrowStatement
public void traverseThrowStatement(Java.ThrowStatement ts)
- See Also:
Traverser
traverseBreakStatement
public void traverseBreakStatement(Java.BreakStatement bs)
- See Also:
Traverser
traverseContinueStatement
public void traverseContinueStatement(Java.ContinueStatement cs)
- See Also:
Traverser
traverseAssertStatement
public void traverseAssertStatement(Java.AssertStatement as)
- See Also:
Traverser
traverseEmptyStatement
public void traverseEmptyStatement(Java.EmptyStatement es)
- See Also:
Traverser
traverseLocalClassDeclarationStatement
public void traverseLocalClassDeclarationStatement(Java.LocalClassDeclarationStatement lcds)
- See Also:
Traverser
traversePackage
public void traversePackage(Java.Package p)
- See Also:
Traverser
traverseArrayLength
public void traverseArrayLength(Java.ArrayLength al)
- See Also:
Traverser
traverseAssignment
public void traverseAssignment(Java.Assignment a)
- See Also:
Traverser
traverseUnaryOperation
public void traverseUnaryOperation(Java.UnaryOperation uo)
- See Also:
Traverser
traverseBinaryOperation
public void traverseBinaryOperation(Java.BinaryOperation bo)
- See Also:
Traverser
traverseCast
public void traverseCast(Java.Cast c)
- See Also:
Traverser
traverseClassLiteral
public void traverseClassLiteral(Java.ClassLiteral cl)
- See Also:
Traverser
traverseConditionalExpression
public void traverseConditionalExpression(Java.ConditionalExpression ce)
- See Also:
Traverser
traverseCrement
public void traverseCrement(Java.Crement c)
- See Also:
Traverser
traverseInstanceof
public void traverseInstanceof(Java.Instanceof io)
- See Also:
Traverser
traverseMethodInvocation
public void traverseMethodInvocation(Java.MethodInvocation mi)
- See Also:
Traverser
traverseSuperclassMethodInvocation
public void traverseSuperclassMethodInvocation(Java.SuperclassMethodInvocation smi)
- See Also:
Traverser
traverseLiteral
public void traverseLiteral(Java.Literal l)
- See Also:
Traverser
traverseIntegerLiteral
public void traverseIntegerLiteral(Java.IntegerLiteral il)
- See Also:
Traverser
traverseFloatingPointLiteral
public void traverseFloatingPointLiteral(Java.FloatingPointLiteral fpl)
- See Also:
Traverser
traverseBooleanLiteral
public void traverseBooleanLiteral(Java.BooleanLiteral bl)
- See Also:
Traverser
traverseCharacterLiteral
public void traverseCharacterLiteral(Java.CharacterLiteral cl)
- See Also:
Traverser
traverseStringLiteral
public void traverseStringLiteral(Java.StringLiteral sl)
- See Also:
Traverser
traverseNullLiteral
public void traverseNullLiteral(Java.NullLiteral nl)
- See Also:
Traverser
traverseSimpleLiteral
public void traverseSimpleLiteral(Java.SimpleConstant sl)
- See Also:
Traverser
traverseNewAnonymousClassInstance
public void traverseNewAnonymousClassInstance(Java.NewAnonymousClassInstance naci)
- See Also:
Traverser
traverseNewArray
public void traverseNewArray(Java.NewArray na)
- See Also:
Traverser
traverseNewInitializedArray
public void traverseNewInitializedArray(Java.NewInitializedArray nia)
- See Also:
Traverser
traverseArrayInitializerOrRvalue
public void traverseArrayInitializerOrRvalue(Java.ArrayInitializerOrRvalue aiorv)
- See Also:
Traverser
traverseNewClassInstance
public void traverseNewClassInstance(Java.NewClassInstance nci)
- See Also:
Traverser
traverseParameterAccess
public void traverseParameterAccess(Java.ParameterAccess pa)
- See Also:
Traverser
traverseQualifiedThisReference
public void traverseQualifiedThisReference(Java.QualifiedThisReference qtr)
- See Also:
Traverser
traverseThisReference
public void traverseThisReference(Java.ThisReference tr)
- See Also:
Traverser
traverseArrayType
public void traverseArrayType(Java.ArrayType at)
- See Also:
Traverser
traverseBasicType
public void traverseBasicType(Java.BasicType bt)
- See Also:
Traverser
traverseReferenceType
public void traverseReferenceType(Java.ReferenceType rt)
- See Also:
Traverser
traverseRvalueMemberType
public void traverseRvalueMemberType(Java.RvalueMemberType rmt)
- See Also:
Traverser
traverseSimpleType
public void traverseSimpleType(Java.SimpleType st)
- See Also:
Traverser
traverseAlternateConstructorInvocation
public void traverseAlternateConstructorInvocation(Java.AlternateConstructorInvocation aci)
- See Also:
Traverser
traverseSuperConstructorInvocation
public void traverseSuperConstructorInvocation(Java.SuperConstructorInvocation sci)
- See Also:
Traverser
traverseAmbiguousName
public void traverseAmbiguousName(Java.AmbiguousName an)
- See Also:
Traverser
traverseArrayAccessExpression
public void traverseArrayAccessExpression(Java.ArrayAccessExpression aae)
- See Also:
Traverser
traverseFieldAccess
public void traverseFieldAccess(Java.FieldAccess fa)
- See Also:
Traverser
traverseFieldAccessExpression
public void traverseFieldAccessExpression(Java.FieldAccessExpression fae)
- See Also:
Traverser
traverseSuperclassFieldAccessExpression
public void traverseSuperclassFieldAccessExpression(Java.SuperclassFieldAccessExpression scfae)
- See Also:
Traverser
traverseLocalVariableAccess
public void traverseLocalVariableAccess(Java.LocalVariableAccess lva)
- See Also:
Traverser
traverseParenthesizedExpression
public void traverseParenthesizedExpression(Java.ParenthesizedExpression pe)
- See Also:
Traverser
traverseElementValueArrayInitializer
public void traverseElementValueArrayInitializer(Java.ElementValueArrayInitializer evai)
- See Also:
Traverser
traverseElementValue
public void traverseElementValue(Java.ElementValue ev)
- See Also:
Traverser
traverseSingleElementAnnotation
public void traverseSingleElementAnnotation(Java.SingleElementAnnotation sea)
- See Also:
Traverser
traverseAnnotation
public void traverseAnnotation(Java.Annotation a)
- See Also:
Traverser
traverseNormalAnnotation
public void traverseNormalAnnotation(Java.NormalAnnotation na)
- See Also:
Traverser
traverseMarkerAnnotation
public void traverseMarkerAnnotation(Java.MarkerAnnotation ma)
- See Also:
Traverser
traverseClassDeclaration
public void traverseClassDeclaration(Java.ClassDeclaration cd)
- See Also:
Traverser
traverseAbstractTypeDeclaration
public void traverseAbstractTypeDeclaration(Java.AbstractTypeDeclaration atd)
- See Also:
Traverser
traverseNamedClassDeclaration
public void traverseNamedClassDeclaration(Java.NamedClassDeclaration ncd)
- See Also:
Traverser
traverseInterfaceDeclaration
public void traverseInterfaceDeclaration(Java.InterfaceDeclaration id)
- See Also:
Traverser
traverseFunctionDeclarator
public void traverseFunctionDeclarator(Java.FunctionDeclarator fd)
- See Also:
Traverser
traverseFormalParameters
public void traverseFormalParameters(Java.FunctionDeclarator.FormalParameters formalParameters)
- See Also:
Traverser
traverseFormalParameter
public void traverseFormalParameter(Java.FunctionDeclarator.FormalParameter formalParameter)
- See Also:
Traverser
traverseAbstractTypeBodyDeclaration
public void traverseAbstractTypeBodyDeclaration(Java.AbstractTypeBodyDeclaration atbd)
- See Also:
Traverser
traverseStatement
public void traverseStatement(Java.Statement s)
- See Also:
Traverser
traverseBreakableStatement
public void traverseBreakableStatement(Java.BreakableStatement bs)
- See Also:
Traverser
traverseContinuableStatement
public void traverseContinuableStatement(Java.ContinuableStatement cs)
- See Also:
Traverser
traverseRvalue
public void traverseRvalue(Java.Rvalue rv)
- See Also:
Traverser
traverseBooleanRvalue
public void traverseBooleanRvalue(Java.BooleanRvalue brv)
- See Also:
Traverser
traverseInvocation
public void traverseInvocation(Java.Invocation i)
- See Also:
Traverser
traverseConstructorInvocation
public void traverseConstructorInvocation(Java.ConstructorInvocation ci)
- See Also:
Traverser
traverseLvalue
public void traverseLvalue(Java.Lvalue lv)
- See Also:
Traverser
traverseType
public void traverseType(Java.Type t)
- See Also:
Traverser
traverseAtom
public void traverseAtom(Java.Atom a)
- See Also:
Traverser
traverseLocated
public void traverseLocated(Java.Located l)
- See Also:
Traverser