Package io.github.eutro.jwasm.tree
Class FunctionsNode
java.lang.Object
io.github.eutro.jwasm.BaseVisitor<FunctionsVisitor>
io.github.eutro.jwasm.FunctionsVisitor
io.github.eutro.jwasm.tree.FunctionsNode
A node that represents the
function section
of a module.
- See Also:
-
Field Summary
Fields inherited from class io.github.eutro.jwasm.BaseVisitor
dl
-
Constructor Summary
ConstructorDescriptionConstruct a visitor with no delegate.FunctionsNode
(@Nullable FunctionsVisitor dl) Construct a visitor with a delegate. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Make the givenFunctionsVisitor
visit all the function types of this node.iterator()
void
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
funcs
The vector ofFuncNode
s in this module.
-
-
Constructor Details
-
FunctionsNode
public FunctionsNode()Construct a visitor with no delegate. -
FunctionsNode
Construct a visitor with a delegate.- Parameters:
dl
- The visitor to delegate all method calls to, ornull
.
-
-
Method Details
-
accept
Make the givenFunctionsVisitor
visit all the function types of this node.- Parameters:
fv
- The visitor to visit.
-
visitFunc
public void visitFunc(int type) Description copied from class:FunctionsVisitor
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
.- Overrides:
visitFunc
in classFunctionsVisitor
- Parameters:
type
- The index of the function's type.- See Also:
-
iterator
-