Interface GlslNode
- All Known Subinterfaces:
GlslConstantNode,GlslRootNode
- All Known Implementing Classes:
GlslAssignmentNode,GlslBitwiseNode,GlslBoolConstantNode,GlslCaseLabelNode,GlslCompareNode,GlslCompoundNode,GlslConditionalNode,GlslDoubleConstantNode,GlslEmptyNode,GlslFloatConstantNode,GlslForLoopNode,GlslFunctionNode,GlslGetArrayNode,GlslGetFieldNode,GlslIfNode,GlslIntConstantNode,GlslInvokeFunctionNode,GlslJumpNode,GlslNewFieldNode,GlslOperationNode,GlslPrecisionNode,GlslPrimitiveConstructorNode,GlslReturnNode,GlslStructDeclarationNode,GlslSwitchNode,GlslUnaryNode,GlslVariableDeclarationNode,GlslVariableNode,GlslWhileLoopNode
@NonExtendable
public interface GlslNode
Represents a single operation in a
GlslTree.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic GlslBoolConstantNodebooleanConstant(boolean value) static GlslNodestatic GlslNodecompound(Collection<GlslNode> nodes) static GlslDoubleConstantNodedoubleConstant(double value) static GlslFloatConstantNodefloatConstant(float value) default @Nullable GlslNodeListgetBody()default @Nullable GlslSpecifiedTypegetType()static GlslIntConstantNodeintConstant(int value) default booleanSets the body of this node.default booleansetBody(Collection<GlslNode> body) Sets the body of this node.stream()toList()default Stringstatic GlslIntConstantNodeunsignedIntConstant(int value) voidvisit(GlslNodeVisitor visitor) Visits this node.
-
Method Details
-
toSourceString
- Returns:
- This node represented as a string
- See Also:
-
visit
Visits this node.- Parameters:
visitor- The visitor visiting this node
-
getNodeType
GlslNodeType getNodeType()- Returns:
- The type of node this class represents
-
getType
- Returns:
- The type of this node if it is a field
-
toList
- Returns:
- A new list with the child contents of this node
-
getBody
- Returns:
- The body of this node or
nullif there is no sub-body in this node
-
setBody
Sets the body of this node.- Parameters:
body- The new body- Returns:
- Whether the action was successful
-
setBody
Sets the body of this node.- Parameters:
body- The new body- Returns:
- Whether the action was successful
-
stream
-
intConstant
-
unsignedIntConstant
-
floatConstant
-
doubleConstant
-
booleanConstant
-
compound
-
compound
-