Package org.jruby.ast
Class FixnumNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.NumericNode
org.jruby.ast.FixnumNode
- All Implemented Interfaces:
LiteralValue
,SideEffectFree
,ILiteralNode
Represents an integer literal.
-
Field Summary
Fields inherited from class org.jruby.ast.Node
containsVariableAssignment, newline
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(NodeVisitor<T> iVisitor) boolean
long
getValue()
Gets the value.int
hashCode()
literalValue
(Ruby runtime) negate()
void
setValue
(long value) Not all interesting info in the AST is from Node data.Methods inherited from class org.jruby.ast.Node
containsVariableAssignment, createList, createList, createList, createList, executesOnce, getFile, getLine, getNodeName, isNewline, isNil, needsDefinitionCheck, setLine, setNewline, toString, toString, toStringInternal, unsetNewline
-
Constructor Details
-
FixnumNode
public FixnumNode(int line, long value)
-
-
Method Details
-
accept
-
getNodeType
- Specified by:
getNodeType
in classNode
- Returns:
- the nodeId
-
negate
- Overrides:
negate
in classNumericNode
-
getValue
public long getValue()Gets the value.- Returns:
- Returns a long
-
setValue
public void setValue(long value) -
childNodes
- Specified by:
childNodes
in classNode
-
toStringExtraInfo
Description copied from class:Node
Not all interesting info in the AST is from Node data. This method will print out anything else of note (e.g. FixnumNode's long value).- Overrides:
toStringExtraInfo
in classNode
- Returns:
- null for no extra info or something otherwise.
-
equals
-
hashCode
public int hashCode() -
literalValue
- Specified by:
literalValue
in interfaceLiteralValue
-