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
FieldsFields inherited from class io.github.eutro.jwasm.BaseVisitor
dl -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a visitor with no delegate.FunctionsNode(@Nullable FunctionsVisitor dl) Construct a visitor with a delegate. -
Method Summary
Modifier and TypeMethodDescriptionvoidMake the givenFunctionsVisitorvisit all the function types of this node.iterator()voidvisitFunc(int type) Visit the type of a function that is defined in the module.Methods inherited from class io.github.eutro.jwasm.BaseVisitor
visitEndMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
funcs
The vector ofFuncNodes 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 givenFunctionsVisitorvisit all the function types of this node.- Parameters:
fv- The visitor to visit.
-
visitFunc
public void visitFunc(int type) Description copied from class:FunctionsVisitorVisit 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 correspondingCodesVisitorobtained fromModuleVisitor.visitCode(), if it is notnull.- Overrides:
visitFuncin classFunctionsVisitor- Parameters:
type- The index of the function's type.- See Also:
-
iterator
-