public final class Struct extends TypeWithMembers<Struct> implements ToplevelGoloElement
struct element.
For instance:
struct Point = {x, y}
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
IMMUTABLE_FACTORY_METHOD |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(GoloIrVisitor visitor)
Accept the visitor.
|
java.util.Set<GoloFunction> |
createFactories()
Creates the factory functions for this type.
|
java.lang.String |
getImmutableName() |
protected Struct |
self() |
static Struct |
struct(java.lang.String name)
Creates a structure type.
|
addMember, children, createFullArgsConstructor, getFactoryDelegateName, getFullArgs, getMemberNames, getMembers, getPublicMembers, hasMembers, members, replaceElement, withMembergetName, getPackageAndClassancestor, ancestor, ancestorOfType, cantConvert, cantReplace, cantReplace, children, children, descendants, descendants, descendants, documentation, documentation, doesNotContain, enclosingModule, getLocalReferenceTable, hasParent, hasPosition, makeParentOf, metadata, metadata, next, next, next, ofAST, parent, positionInSourceCode, positionInSourceCode, previous, previous, previous, replaceInParentBy, walkpublic static final java.lang.String IMMUTABLE_FACTORY_METHOD
protected Struct self()
self in class GoloElement<Struct>public static Struct struct(java.lang.String name)
Typical usage:
structure("Point").members("x", "y")
creates
struct Point = {x, y}
name - the name of the struct.public java.lang.String getImmutableName()
public java.util.Set<GoloFunction> createFactories()
TypeWithMembersInternal API
createFactories in class TypeWithMembers<Struct>public void accept(GoloIrVisitor visitor)
This method should only call the visitor visitXXXX method.
The children of this node will be visited by the
GoloElement.walk(GoloIrVisitor) method.
accept in class GoloElement<Struct>