Interface ConventionModifier<Convention,Node>
- Type Parameters:
Convention
- The type of the convention.Node
- The type of the localio.github.eutro.jwasm.tree
node.
public interface ConventionModifier<Convention,Node>
A function which modifies a local convention.
- See Also:
-
WirJavaConventionFactory.Builder.setModifyFuncConvention(ConventionModifier)
WirJavaConventionFactory.Builder.setModifyGlobalConvention(ConventionModifier)
WirJavaConventionFactory.Builder.setModifyMemConvention(ConventionModifier)
WirJavaConventionFactory.Builder.setModifyTableConvention(ConventionModifier)
-
Method Summary
Modifier and TypeMethodDescriptiondefault ConventionModifier<Convention,
Node> andThen
(ConventionModifier<Convention, Node> next) Compose this convention modifier with another.static <C,
N> ConventionModifier<C, N> identity()
Returns the identity convention modifier, which does nothing.modify
(Convention convention, Node node, int index) Modify the given convention, possibly returning a new one that modifies its behaviour, likely its export behaviour.
-
Method Details
-
modify
Modify the given convention, possibly returning a new one that modifies its behaviour, likely its export behaviour.- Parameters:
convention
- The convention to modify.node
- The local node of the WebAssembly module.index
- The index of the node in its respective index space.- Returns:
- The modified convention.
-
identity
Returns the identity convention modifier, which does nothing.- Type Parameters:
C
- The convention type.N
- The node type.- Returns:
- The identity convention modifier.
-
andThen
Compose this convention modifier with another.- Parameters:
next
- The modifier to run after this.- Returns:
- The composed convention modifier.
-