Package org.jruby.ast
Class OpAsgnNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.OpAsgnNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final RubySymbolprivate final Nodeprivate final Nodeprivate final RubySymbolprivate final RubySymbolFields inherited from class org.jruby.ast.Node
containsVariableAssignment, EMPTY_LIST, newline -
Constructor Summary
ConstructorsConstructorDescriptionOpAsgnNode(int line, Node receiverNode, Node valueNode, RubySymbol variableName, RubySymbol operatorName, boolean isLazy) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(NodeVisitor<T> iVisitor) Accept for the visitor pattern.Gets the methodName.Gets the receiverNode.Gets the valueNode.Gets the varibaleName.booleanisAnd()booleanisLazy()booleanisOr()booleanCheck whether the given node is considered always "defined" or whether it has some form of definition check.Methods inherited from class org.jruby.ast.Node
containsVariableAssignment, createList, createList, createList, createList, executesOnce, findFirstChild, getFile, getLine, getNodeName, isNewline, isNil, setLine, setNewline, toString, toString, toStringExtraInfo, toStringInternal, unsetNewline
-
Field Details
-
receiverNode
-
valueNode
-
variableName
-
operatorName
-
variableNameAsgn
-
isLazy
private final boolean isLazy
-
-
Constructor Details
-
OpAsgnNode
public OpAsgnNode(int line, Node receiverNode, Node valueNode, RubySymbol variableName, RubySymbol operatorName, boolean isLazy)
-
-
Method Details
-
getNodeType
- Specified by:
getNodeTypein classNode- Returns:
- the nodeId
-
accept
Accept for the visitor pattern. -
getOperatorName
Gets the methodName.- Returns:
- Returns a String
-
getOperatorByteName
-
getOperatorSymbolName
-
isOr
public boolean isOr() -
isAnd
public boolean isAnd() -
getReceiverNode
Gets the receiverNode.- Returns:
- Returns a Node
-
getValueNode
Gets the valueNode.- Returns:
- Returns a Node
-
getVariableName
Gets the varibaleName.- Returns:
- Returns a String
-
getVariableByteName
-
getVariableSymbolName
-
getVariableNameAsgn
-
getVariableByteNameAsgn
-
getVariableSymbolNameAsgn
-
childNodes
- Specified by:
childNodesin classNode
-
isLazy
public boolean isLazy() -
needsDefinitionCheck
public boolean needsDefinitionCheck()Description copied from class:NodeCheck whether the given node is considered always "defined" or whether it has some form of definition check.- Overrides:
needsDefinitionCheckin classNode- Returns:
- Whether the type of node represents a possibly undefined construct
-