Package io.github.eutro.jwasm
Class FunctionsVisitor
- Direct Known Subclasses:
FunctionsNode
,FunctionsWriter
A visitor that visits the
function section
of a module.
Methods are expected to be called in the order:
( visitFunc
)*
visitEnd
-
Field Summary
Fields inherited from class io.github.eutro.jwasm.BaseVisitor
dl
-
Constructor Summary
ConstructorDescriptionConstruct a visitor with no delegate.FunctionsVisitor
(@Nullable FunctionsVisitor dl) Construct a visitor with a delegate. -
Method Summary
Modifier and TypeMethodDescriptionvoid
visitFunc
(int type) Visit the type of a function that is defined in the module.Methods inherited from class io.github.eutro.jwasm.BaseVisitor
visitEnd
-
Constructor Details
-
FunctionsVisitor
public FunctionsVisitor()Construct a visitor with no delegate. -
FunctionsVisitor
Construct a visitor with a delegate.- Parameters:
dl
- The visitor to delegate all method calls to, ornull
.
-
-
Method Details
-
visitFunc
public void visitFunc(int type) Visit the type of a function that is defined in the module.The locals and body fields of the function are visited by the
CodesVisitor.visitCode(byte[])
.Each call to this function should be matched with a
CodesVisitor.visitCode(byte[])
call to the correspondingCodesVisitor
obtained fromModuleVisitor.visitCode()
, if it is notnull
.- Parameters:
type
- The index of the function's type.- See Also:
-