visitor

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrainAfterVisits

func DrainAfterVisits(editor any, t java.Tree, ctx any) java.Tree

DrainAfterVisits applies any visitors that `editor` queued via GoVisitor.DoAfterVisit. After-visits can themselves queue more after-visits (transitive); this loops until no provider has anything left in its queue. Mirrors JavaVisitor's afterVisit drain semantics.

Returns the (possibly modified) tree. Callers should ALWAYS run this after the main editor.Visit so DoAfterVisit-queued follow-ups land. Pass `editor` as the recipe's TreeVisitor and the current tree + ctx.

func FirstEnclosing

func FirstEnclosing[T java.Tree](c *Cursor) (T, bool)

FirstEnclosing walks up the cursor chain to find the first ancestor matching the given type. The cursor itself is not considered — only ancestors.

func Init

func Init[T any](v *T) *T

Init sets the Self field on a visitor to enable virtual dispatch, then returns the visitor. Works with any visitor struct that has an exported Self field (GoVisitor, JavaVisitor, XmlVisitor, etc.).

func (r *myRecipe) Editor() recipe.TreeVisitor {
    return visitor.Init(&myVisitor{oldName: r.OldName})
}

Types

type AfterVisitor

type AfterVisitor interface {
	Visit(t java.Tree, p any) java.Tree
}

AfterVisitor is the interface a follow-up visitor must satisfy to participate in DoAfterVisit. It's a structural alias for the recipe.TreeVisitor interface — duplicated here to avoid an import cycle between pkg/visitor and pkg/recipe.

type AfterVisitsProvider

type AfterVisitsProvider interface {
	AfterVisits() []AfterVisitor
	DoAfterVisit(AfterVisitor)
}

AfterVisitsProvider is the structural interface a visitor implements to expose its DoAfterVisit queue. GoVisitor satisfies it; user-defined visitors that embed GoVisitor inherit the methods automatically.

type Cursor

type Cursor struct {
	// contains filtered or unexported fields
}

Cursor tracks the path from root to the currently visited node and carries a per-frame message map so passes can stash state for ancestors / descendants. Mirrors org.openrewrite.Cursor in Java.

func BuildChain

func BuildChain(values []java.Tree) *Cursor

BuildChain constructs a cursor chain from a list of tree values, root first. Returns nil for an empty input. Used by the RPC layer to reconstruct the cursor from a Visit request's `cursor` field (a list of tree IDs whose values have already been fetched in order).

func NewCursor

func NewCursor(parent *Cursor, value java.Tree) *Cursor

func (*Cursor) ComputeMessageIfAbsent

func (c *Cursor) ComputeMessageIfAbsent(key string, supplier func() any) any

ComputeMessageIfAbsent returns the value for the key on THIS frame, computing and storing it via the supplier if absent. Mirrors Java Cursor.computeMessageIfAbsent.

func (*Cursor) GetMessage

func (c *Cursor) GetMessage(key string) any

GetMessage returns the value previously stored on THIS frame, or nil if no value exists. Does not walk up the parent chain. Mirrors Java Cursor.getMessage(String).

func (*Cursor) GetNearestMessage

func (c *Cursor) GetNearestMessage(key string) any

GetNearestMessage walks up the cursor chain (starting from this frame) returning the first matching value. Returns nil if no frame has a value for the key. Mirrors Java Cursor.getNearestMessage(String).

func (*Cursor) GetNearestMessageOrDefault

func (c *Cursor) GetNearestMessageOrDefault(key string, defaultValue any) any

GetNearestMessageOrDefault is GetNearestMessage with a fallback when no frame holds a value for the key.

func (*Cursor) Parent

func (c *Cursor) Parent() *Cursor

func (*Cursor) PollNearestMessage

func (c *Cursor) PollNearestMessage(key string) any

PollNearestMessage walks up the chain like GetNearestMessage, but REMOVES the value from the frame where it was found. Returns nil if no frame had it. Mirrors Java Cursor.pollNearestMessage(String).

func (*Cursor) PutMessage

func (c *Cursor) PutMessage(key string, value any)

PutMessage stores a value on this cursor's frame, keyed by name. Mirrors Java Cursor.putMessage(String, Object).

func (*Cursor) PutMessageOnFirstEnclosing

func (c *Cursor) PutMessageOnFirstEnclosing(match func(t java.Tree) bool, key string, value any)

PutMessageOnFirstEnclosing walks up looking for the first ancestor whose value matches the predicate, and stores the message on that frame. No-op if no ancestor matches. Mirrors Java Cursor.putMessageOnFirstEnclosing(Class, String, Object), generalized to a predicate so callers can match on any type or condition.

func (*Cursor) Value

func (c *Cursor) Value() java.Tree

type GoVisitor

type GoVisitor struct {
	// Self must point to the outermost embedding struct for virtual dispatch.
	// If nil, dispatches to the default implementations on GoVisitor itself.
	Self interface{}
	// contains filtered or unexported fields
}

GoVisitor traverses and optionally transforms an OpenRewrite LST. Embed GoVisitor in a struct and override visit methods to customize behavior. Set Self to the outer struct to enable virtual dispatch.

Cursor: GoVisitor maintains the current cursor as state. Recipes that need ancestor context call v.Cursor() inside any Visit* override (matches the JavaVisitor.getCursor() pattern). The RPC layer seeds an initial cursor via SetCursor before traversal begins.

After-visits: a visit method can queue follow-up visitors via DoAfterVisit. The recipe runner drains the queue once the main visit returns and re-applies each queued visitor (transitively — afters can queue afters). This mirrors JavaVisitor.doAfterVisit and is the canonical way to compose side-effects like "add an import" after the main edit.

func (*GoVisitor) AfterVisits

func (v *GoVisitor) AfterVisits() []AfterVisitor

AfterVisits returns the queued follow-up visitors, then clears the queue. The recipe runner calls this once the main Visit returns and applies each visitor to the modified tree, looping until empty.

func (*GoVisitor) Cursor

func (v *GoVisitor) Cursor() *Cursor

Cursor returns the current cursor (the path from root to the node currently being visited). Mirrors JavaVisitor.getCursor().

func (*GoVisitor) DoAfterVisit

func (v *GoVisitor) DoAfterVisit(other AfterVisitor)

DoAfterVisit queues a follow-up visitor to run after the main visit completes. Mirrors JavaVisitor.doAfterVisit. Use this from inside any Visit* override to compose side-effects like adding an import:

svc := service.ImportServiceFor(cu)
v.DoAfterVisit(svc.AddImportVisitor("fmt", nil, false))

The recipe runner drains the queue after Visit returns; queued visitors can themselves queue more after-visitors (transitive).

func (*GoVisitor) PendingAfterVisits added in v0.0.9

func (v *GoVisitor) PendingAfterVisits() []AfterVisitor

PendingAfterVisits returns the currently queued follow-up visitors without clearing the queue. Helper APIs use this to keep convenience methods like MaybeAddImport idempotent before the drain runs.

func (*GoVisitor) PreVisit

func (v *GoVisitor) PreVisit(t java.Tree, p any) java.Tree

PreVisit is the per-node hook called by Visit() before dispatching to the type-specific Visit* method. The default implementation is the identity function. RPC senders/receivers override it to serialize/deserialize the cross-cutting `id`, `prefix`, and `markers` fields once per node, mirroring Java's JavaVisitor.preVisit pattern.

func (*GoVisitor) SetCursor

func (v *GoVisitor) SetCursor(c *Cursor)

SetCursor seeds the visitor with an initial cursor chain. The RPC layer calls this with the chain reconstructed from a Visit request's cursor IDs before invoking Visit. Recipes typically don't call this directly.

func (*GoVisitor) Visit

func (v *GoVisitor) Visit(t java.Tree, p any) java.Tree

Visit dispatches to the appropriate visit method based on the node's concrete type.

Lifecycle:

  1. cursor is pushed for `t`.
  2. PreVisit(t, p) is called via virtual dispatch — subclasses (e.g. RPC sender/receiver) override it to handle cross-cutting fields (id, prefix, markers) once per node.
  3. The type-specific Visit* method is dispatched via virtual dispatch on the (possibly modified) tree returned by PreVisit.
  4. cursor pops on return.

PreVisit returning nil short-circuits the visit — useful for receivers that get DELETE state from the wire.

func (*GoVisitor) VisitAnnotation

func (v *GoVisitor) VisitAnnotation(ann *java.Annotation, p any) java.J

func (*GoVisitor) VisitArrayAccess

func (v *GoVisitor) VisitArrayAccess(aa *java.ArrayAccess, p any) java.J

func (*GoVisitor) VisitArrayDimension

func (v *GoVisitor) VisitArrayDimension(ad *java.ArrayDimension, p any) java.J

func (*GoVisitor) VisitArrayType

func (v *GoVisitor) VisitArrayType(at *java.ArrayType, p any) java.J

func (*GoVisitor) VisitAssignment

func (v *GoVisitor) VisitAssignment(assign *java.Assignment, p any) java.J

func (*GoVisitor) VisitAssignmentOperation

func (v *GoVisitor) VisitAssignmentOperation(ao *java.AssignmentOperation, p any) java.J

func (*GoVisitor) VisitBinary

func (v *GoVisitor) VisitBinary(bin *java.Binary, p any) java.J

func (*GoVisitor) VisitBlock

func (v *GoVisitor) VisitBlock(block *java.Block, p any) java.J

func (*GoVisitor) VisitBreak

func (v *GoVisitor) VisitBreak(b *java.Break, p any) java.J

func (*GoVisitor) VisitCase

func (v *GoVisitor) VisitCase(c *java.Case, p any) java.J

func (*GoVisitor) VisitChannel

func (v *GoVisitor) VisitChannel(ch *golang.Channel, p any) java.J

func (*GoVisitor) VisitCommClause

func (v *GoVisitor) VisitCommClause(cc *golang.CommClause, p any) java.J

func (*GoVisitor) VisitCompilationUnit

func (v *GoVisitor) VisitCompilationUnit(cu *golang.CompilationUnit, p any) java.J

func (*GoVisitor) VisitComposite

func (v *GoVisitor) VisitComposite(c *golang.Composite, p any) java.J

func (*GoVisitor) VisitContinue

func (v *GoVisitor) VisitContinue(c *java.Continue, p any) java.J

func (*GoVisitor) VisitControlParentheses

func (v *GoVisitor) VisitControlParentheses(cp *java.ControlParentheses, p any) java.J

func (*GoVisitor) VisitDeclarationBlock added in v0.0.12

func (v *GoVisitor) VisitDeclarationBlock(db *golang.DeclarationBlock, p any) java.J

func (*GoVisitor) VisitDefer

func (v *GoVisitor) VisitDefer(d *golang.Defer, p any) java.J

func (*GoVisitor) VisitElse

func (v *GoVisitor) VisitElse(el *java.Else, p any) java.J

VisitElse handles the synthetic *java.Else wrapper that JavaSender produces for RPC parity with Java's J.If.Else. The node never appears in a parsed Go AST — language-level recipes go through VisitIf instead — so the default implementation simply visits the body so traversal terminates correctly.

func (*GoVisitor) VisitEmpty

func (v *GoVisitor) VisitEmpty(empty *java.Empty, p any) java.J

func (*GoVisitor) VisitFallthrough

func (v *GoVisitor) VisitFallthrough(f *golang.Fallthrough, p any) java.J

func (*GoVisitor) VisitFieldAccess

func (v *GoVisitor) VisitFieldAccess(fa *java.FieldAccess, p any) java.J

func (*GoVisitor) VisitForControl

func (v *GoVisitor) VisitForControl(control *java.ForControl, p any) java.J

func (*GoVisitor) VisitForEachControl

func (v *GoVisitor) VisitForEachControl(control *java.ForEachControl, p any) java.J

func (*GoVisitor) VisitForEachLoop

func (v *GoVisitor) VisitForEachLoop(forEach *java.ForEachLoop, p any) java.J

func (*GoVisitor) VisitForLoop

func (v *GoVisitor) VisitForLoop(forLoop *java.ForLoop, p any) java.J

func (*GoVisitor) VisitFuncType

func (v *GoVisitor) VisitFuncType(ft *golang.FuncType, p any) java.J

func (*GoVisitor) VisitGoArrayType added in v0.0.13

func (v *GoVisitor) VisitGoArrayType(at *golang.ArrayType, p any) java.J

func (*GoVisitor) VisitGoAssignmentOperation added in v0.0.6

func (v *GoVisitor) VisitGoAssignmentOperation(a *golang.AssignmentOperation, p any) java.J

func (*GoVisitor) VisitGoBinary added in v0.0.6

func (v *GoVisitor) VisitGoBinary(b *golang.Binary, p any) java.J

func (*GoVisitor) VisitGoMethodDeclaration added in v0.0.12

func (v *GoVisitor) VisitGoMethodDeclaration(md *golang.MethodDeclaration, p any) java.J

func (*GoVisitor) VisitGoMod added in v0.0.10

func (v *GoVisitor) VisitGoMod(gm *golang.GoMod, p any) java.Tree

func (*GoVisitor) VisitGoModBlock added in v0.0.10

func (v *GoVisitor) VisitGoModBlock(b *golang.GoModBlock, p any) java.Tree

func (*GoVisitor) VisitGoModDirective added in v0.0.10

func (v *GoVisitor) VisitGoModDirective(d *golang.GoModDirective, p any) java.Tree

func (*GoVisitor) VisitGoModValue added in v0.0.10

func (v *GoVisitor) VisitGoModValue(val *golang.GoModValue, p any) java.Tree

func (*GoVisitor) VisitGoReturn added in v0.0.11

func (v *GoVisitor) VisitGoReturn(ret *golang.Return, p any) java.J

func (*GoVisitor) VisitGoStmt

func (v *GoVisitor) VisitGoStmt(g *golang.GoStmt, p any) java.J

func (*GoVisitor) VisitGoUnary added in v0.0.6

func (v *GoVisitor) VisitGoUnary(u *golang.Unary, p any) java.J

func (*GoVisitor) VisitGoVariadic added in v0.0.6

func (v *GoVisitor) VisitGoVariadic(vr *golang.Variadic, p any) java.J

func (*GoVisitor) VisitGoto

func (v *GoVisitor) VisitGoto(g *golang.Goto, p any) java.J

func (*GoVisitor) VisitIdentifier

func (v *GoVisitor) VisitIdentifier(ident *java.Identifier, p any) java.J

func (*GoVisitor) VisitIf

func (v *GoVisitor) VisitIf(ifStmt *java.If, p any) java.J

func (*GoVisitor) VisitImport

func (v *GoVisitor) VisitImport(imp *java.Import, p any) java.J

func (*GoVisitor) VisitIndexList

func (v *GoVisitor) VisitIndexList(il *golang.IndexList, p any) java.J

func (*GoVisitor) VisitInterfaceType

func (v *GoVisitor) VisitInterfaceType(it *golang.InterfaceType, p any) java.J

func (*GoVisitor) VisitKeyValue

func (v *GoVisitor) VisitKeyValue(kv *golang.KeyValue, p any) java.J

func (*GoVisitor) VisitLabel

func (v *GoVisitor) VisitLabel(l *java.Label, p any) java.J

func (*GoVisitor) VisitLiteral

func (v *GoVisitor) VisitLiteral(lit *java.Literal, p any) java.J

func (*GoVisitor) VisitMapType

func (v *GoVisitor) VisitMapType(mt *golang.MapType, p any) java.J

func (*GoVisitor) VisitMethodDeclaration

func (v *GoVisitor) VisitMethodDeclaration(md *java.MethodDeclaration, p any) java.J

func (*GoVisitor) VisitMethodInvocation

func (v *GoVisitor) VisitMethodInvocation(mi *java.MethodInvocation, p any) java.J

func (*GoVisitor) VisitMultiAssignment

func (v *GoVisitor) VisitMultiAssignment(ma *golang.MultiAssignment, p any) java.J

func (*GoVisitor) VisitParameterizedType

func (v *GoVisitor) VisitParameterizedType(pt *java.ParameterizedType, p any) java.J

func (*GoVisitor) VisitParentheses

func (v *GoVisitor) VisitParentheses(paren *java.Parentheses, p any) java.J

func (*GoVisitor) VisitPointerType

func (v *GoVisitor) VisitPointerType(pt *golang.PointerType, p any) java.J

func (*GoVisitor) VisitReturn

func (v *GoVisitor) VisitReturn(ret *java.Return, p any) java.J

func (*GoVisitor) VisitSend

func (v *GoVisitor) VisitSend(s *golang.Send, p any) java.J

func (*GoVisitor) VisitSlice

func (v *GoVisitor) VisitSlice(s *golang.Slice, p any) java.J

func (*GoVisitor) VisitSpace

func (v *GoVisitor) VisitSpace(space java.Space, p any) java.Space

func (*GoVisitor) VisitStatementExpression

func (v *GoVisitor) VisitStatementExpression(se *golang.StatementExpression, p any) java.J

func (*GoVisitor) VisitStatementWithInit added in v0.0.13

func (v *GoVisitor) VisitStatementWithInit(s *golang.StatementWithInit, p any) java.J

func (*GoVisitor) VisitStructType

func (v *GoVisitor) VisitStructType(st *golang.StructType, p any) java.J

func (*GoVisitor) VisitSwitch

func (v *GoVisitor) VisitSwitch(sw *java.Switch, p any) java.J

func (*GoVisitor) VisitType

func (v *GoVisitor) VisitType(javaType java.JavaType, p any) java.JavaType

func (*GoVisitor) VisitTypeCast

func (v *GoVisitor) VisitTypeCast(tc *java.TypeCast, p any) java.J

func (*GoVisitor) VisitTypeDecl

func (v *GoVisitor) VisitTypeDecl(td *golang.TypeDecl, p any) java.J

func (*GoVisitor) VisitTypeList

func (v *GoVisitor) VisitTypeList(tl *golang.TypeList, p any) java.J

func (*GoVisitor) VisitTypeParameter added in v0.0.5

func (v *GoVisitor) VisitTypeParameter(tp *java.TypeParameter, p any) java.J

func (*GoVisitor) VisitTypeParameters added in v0.0.5

func (v *GoVisitor) VisitTypeParameters(tps *java.TypeParameters, p any) java.J

func (*GoVisitor) VisitUnary

func (v *GoVisitor) VisitUnary(unary *java.Unary, p any) java.J

func (*GoVisitor) VisitUnderlyingType added in v0.0.5

func (v *GoVisitor) VisitUnderlyingType(ut *golang.UnderlyingType, p any) java.J

func (*GoVisitor) VisitUnion added in v0.0.5

func (v *GoVisitor) VisitUnion(u *golang.Union, p any) java.J

func (*GoVisitor) VisitVariableDeclarations

func (v *GoVisitor) VisitVariableDeclarations(vd *java.VariableDeclarations, p any) java.J

func (*GoVisitor) VisitVariableDeclarator

func (v *GoVisitor) VisitVariableDeclarator(vd *java.VariableDeclarator, p any) java.J

type JavaTypeVisitor

type JavaTypeVisitor struct {
	// Self must point to the outermost embedding struct for virtual dispatch.
	Self JavaTypeVisitorI
}

JavaTypeVisitor traverses and optionally transforms JavaType instances. Mirrors org.openrewrite.java.JavaTypeVisitor in Java. Embed in a struct and override visit methods to customize behavior.

func (*JavaTypeVisitor) Visit

func (v *JavaTypeVisitor) Visit(javaType java.JavaType, p any) java.JavaType

Visit dispatches to the appropriate visit method based on concrete type.

func (*JavaTypeVisitor) VisitAnnotation

func (v *JavaTypeVisitor) VisitAnnotation(annotation *java.JavaTypeAnnotation, p any) java.JavaType

func (*JavaTypeVisitor) VisitArray

func (v *JavaTypeVisitor) VisitArray(array *java.JavaTypeArray, p any) java.JavaType

func (*JavaTypeVisitor) VisitClass

func (v *JavaTypeVisitor) VisitClass(class_ *java.JavaTypeClass, p any) java.JavaType

func (*JavaTypeVisitor) VisitGenericTypeVariable

func (v *JavaTypeVisitor) VisitGenericTypeVariable(generic *java.JavaTypeGenericTypeVariable, p any) java.JavaType

func (*JavaTypeVisitor) VisitIntersection

func (v *JavaTypeVisitor) VisitIntersection(intersection *java.JavaTypeIntersection, p any) java.JavaType

func (*JavaTypeVisitor) VisitList

func (v *JavaTypeVisitor) VisitList(javaTypes []java.JavaType, p any) []java.JavaType

VisitList visits a list of JavaTypes.

func (*JavaTypeVisitor) VisitMethod

func (v *JavaTypeVisitor) VisitMethod(method *java.JavaTypeMethod, p any) java.JavaType

func (*JavaTypeVisitor) VisitMultiCatch

func (v *JavaTypeVisitor) VisitMultiCatch(multiCatch *java.JavaTypeMultiCatch, p any) java.JavaType

func (*JavaTypeVisitor) VisitParameterized

func (v *JavaTypeVisitor) VisitParameterized(parameterized *java.JavaTypeParameterized, p any) java.JavaType

func (*JavaTypeVisitor) VisitPrimitive

func (v *JavaTypeVisitor) VisitPrimitive(primitive *java.JavaTypePrimitive, p any) java.JavaType

func (*JavaTypeVisitor) VisitShallowClass added in v0.0.3

func (v *JavaTypeVisitor) VisitShallowClass(shallow *java.JavaTypeShallowClass, p any) java.JavaType

func (*JavaTypeVisitor) VisitUnknown

func (v *JavaTypeVisitor) VisitUnknown(unknown *java.JavaTypeUnknown, p any) java.JavaType

func (*JavaTypeVisitor) VisitVariable

func (v *JavaTypeVisitor) VisitVariable(variable *java.JavaTypeVariable, p any) java.JavaType

type JavaTypeVisitorI

type JavaTypeVisitorI interface {
	Visit(javaType java.JavaType, p any) java.JavaType
	VisitAnnotation(annotation *java.JavaTypeAnnotation, p any) java.JavaType
	VisitArray(array *java.JavaTypeArray, p any) java.JavaType
	VisitClass(class_ *java.JavaTypeClass, p any) java.JavaType
	VisitShallowClass(shallow *java.JavaTypeShallowClass, p any) java.JavaType
	VisitGenericTypeVariable(generic *java.JavaTypeGenericTypeVariable, p any) java.JavaType
	VisitIntersection(intersection *java.JavaTypeIntersection, p any) java.JavaType
	VisitMethod(method *java.JavaTypeMethod, p any) java.JavaType
	VisitMultiCatch(multiCatch *java.JavaTypeMultiCatch, p any) java.JavaType
	VisitParameterized(parameterized *java.JavaTypeParameterized, p any) java.JavaType
	VisitPrimitive(primitive *java.JavaTypePrimitive, p any) java.JavaType
	VisitUnknown(unknown *java.JavaTypeUnknown, p any) java.JavaType
	VisitVariable(variable *java.JavaTypeVariable, p any) java.JavaType
}

JavaTypeVisitorI defines all overridable visit methods for JavaType.

type PendingAfterVisitsProvider added in v0.0.9

type PendingAfterVisitsProvider interface {
	PendingAfterVisits() []AfterVisitor
}

PendingAfterVisitsProvider is implemented by visitors that can expose their queued after-visits without draining them.

type VisitorI

type VisitorI interface {
	Visit(t java.Tree, p any) java.Tree
	PreVisit(t java.Tree, p any) java.Tree
	VisitCompilationUnit(cu *golang.CompilationUnit, p any) java.J
	// go.mod nodes are Tree, not J (their tokens are not Java
	// expressions), so these return java.Tree rather than java.J.
	VisitGoMod(gm *golang.GoMod, p any) java.Tree
	VisitGoModDirective(d *golang.GoModDirective, p any) java.Tree
	VisitGoModBlock(b *golang.GoModBlock, p any) java.Tree
	VisitGoModValue(val *golang.GoModValue, p any) java.Tree
	VisitIdentifier(ident *java.Identifier, p any) java.J
	VisitLiteral(lit *java.Literal, p any) java.J
	VisitBinary(bin *java.Binary, p any) java.J
	VisitBlock(block *java.Block, p any) java.J
	VisitReturn(ret *java.Return, p any) java.J
	VisitIf(ifStmt *java.If, p any) java.J
	VisitElse(el *java.Else, p any) java.J
	VisitAssignment(assign *java.Assignment, p any) java.J
	VisitMethodDeclaration(md *java.MethodDeclaration, p any) java.J
	VisitFieldAccess(fa *java.FieldAccess, p any) java.J
	VisitMethodInvocation(mi *java.MethodInvocation, p any) java.J
	VisitVariableDeclarations(vd *java.VariableDeclarations, p any) java.J
	VisitDeclarationBlock(db *golang.DeclarationBlock, p any) java.J
	VisitVariableDeclarator(vd *java.VariableDeclarator, p any) java.J
	VisitImport(imp *java.Import, p any) java.J
	VisitUnary(unary *java.Unary, p any) java.J
	VisitAssignmentOperation(ao *java.AssignmentOperation, p any) java.J
	VisitSwitch(sw *java.Switch, p any) java.J
	VisitCase(c *java.Case, p any) java.J
	VisitForLoop(forLoop *java.ForLoop, p any) java.J
	VisitForControl(control *java.ForControl, p any) java.J
	VisitForEachLoop(forEach *java.ForEachLoop, p any) java.J
	VisitForEachControl(control *java.ForEachControl, p any) java.J
	VisitBreak(b *java.Break, p any) java.J
	VisitContinue(c *java.Continue, p any) java.J
	VisitLabel(l *java.Label, p any) java.J
	VisitGoStmt(g *golang.GoStmt, p any) java.J
	VisitDefer(d *golang.Defer, p any) java.J
	VisitSend(s *golang.Send, p any) java.J
	VisitGoto(g *golang.Goto, p any) java.J
	VisitFallthrough(f *golang.Fallthrough, p any) java.J
	VisitEmpty(empty *java.Empty, p any) java.J
	VisitAnnotation(ann *java.Annotation, p any) java.J
	VisitArrayType(at *java.ArrayType, p any) java.J
	VisitGoArrayType(at *golang.ArrayType, p any) java.J
	VisitParentheses(paren *java.Parentheses, p any) java.J
	VisitTypeCast(tc *java.TypeCast, p any) java.J
	VisitControlParentheses(cp *java.ControlParentheses, p any) java.J
	VisitArrayAccess(aa *java.ArrayAccess, p any) java.J
	VisitParameterizedType(pt *java.ParameterizedType, p any) java.J
	VisitTypeParameters(tps *java.TypeParameters, p any) java.J
	VisitTypeParameter(tp *java.TypeParameter, p any) java.J
	VisitIndexList(il *golang.IndexList, p any) java.J
	VisitArrayDimension(ad *java.ArrayDimension, p any) java.J
	VisitComposite(c *golang.Composite, p any) java.J
	VisitKeyValue(kv *golang.KeyValue, p any) java.J
	VisitSlice(s *golang.Slice, p any) java.J
	VisitMapType(mt *golang.MapType, p any) java.J
	VisitStatementExpression(se *golang.StatementExpression, p any) java.J
	VisitPointerType(pt *golang.PointerType, p any) java.J
	VisitChannel(ch *golang.Channel, p any) java.J
	VisitFuncType(ft *golang.FuncType, p any) java.J
	VisitTypeList(tl *golang.TypeList, p any) java.J
	VisitUnion(u *golang.Union, p any) java.J
	VisitUnderlyingType(ut *golang.UnderlyingType, p any) java.J
	VisitTypeDecl(td *golang.TypeDecl, p any) java.J
	VisitStructType(st *golang.StructType, p any) java.J
	VisitInterfaceType(it *golang.InterfaceType, p any) java.J
	VisitMultiAssignment(ma *golang.MultiAssignment, p any) java.J
	VisitGoReturn(ret *golang.Return, p any) java.J
	VisitGoMethodDeclaration(md *golang.MethodDeclaration, p any) java.J
	VisitStatementWithInit(s *golang.StatementWithInit, p any) java.J
	VisitCommClause(cc *golang.CommClause, p any) java.J
	VisitGoUnary(u *golang.Unary, p any) java.J
	VisitGoBinary(b *golang.Binary, p any) java.J
	VisitGoAssignmentOperation(a *golang.AssignmentOperation, p any) java.J
	VisitGoVariadic(v *golang.Variadic, p any) java.J
	VisitSpace(space java.Space, p any) java.Space
	VisitType(javaType java.JavaType, p any) java.JavaType
}

VisitorI defines all overridable visit methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL