jruby/docs BETA
Navigation
org.jruby.ast 141
C AliasNode
C AndNode
C ArgsCatNode
C ArgsNode
C ArgsPushNode
C ArgumentNode
C ArrayNode
C ArrayPatternNode
C AssignableNode
C AttrAssignNode
C BackRefNode
C BeginNode
C BignumNode
I BinaryOperatorNode
I BlockAcceptingNode
C BlockArgNode
C BlockNode
C BlockPassNode
C BreakNode
C CallNode
I CanRaise
C CaseNode
C ClassNode
C ClassVarAsgnNode
C ClassVarNode
C Colon2ConstNode
C Colon2ImplicitNode
C Colon2Node
C Colon3Node
C ComplexNode
C ConstDeclNode
C ConstNode
C DAsgnNode
C DNode
C DRegexpNode
C DStrNode
C DSymbolNode
C DVarNode
C DXStrNode
C DefHolder
I DefNode
C DefinedNode
C DefnNode
C DefsNode
C DotNode
C EncodingNode
C EnsureNode
C ErrorNode
C EvStrNode
C FCallNode
C FalseNode
C FileNode
C FindPatternNode
C FixnumNode
C FlipNode
C FloatNode
C ForNode
C ForwardingBlockArgNode
C GlobalAsgnNode
C GlobalVarNode
C HashNode
C HashPatternNode
I IArgumentNode
I IScopedNode
I IScopingNode
C IfNode
C InNode
C InstAsgnNode
C InstVarNode
I InvisibleNode
C IterNode
C KeywordArgNode
C KeywordRestArgNode
C LambdaNode
C LineStubVisitor
C ListNode
C LiteralNode
I LiteralValue
C LocalAsgnNode
C LocalVarNode
C Match2CaptureNode
C Match2Node
C Match3Node
C MatchNode
C MethodDefNode
C ModuleNode
C MultipleAsgnNode
C NextNode
C NilImplicitNode
C NilNode
C NilRestArgNode
C Node
E NodeType
I NonLocalControlFlowNode
C NthRefNode
C NumericNode
C OpAsgnAndNode
C OpAsgnConstDeclNode
C OpAsgnNode
C OpAsgnOrNode
C OpElementAsgnNode
C OptArgNode
C OrNode
C PatternCaseNode
C PostExeNode
C PreExe19Node
C PreExeNode
C RationalNode
C RedoNode
C RegexpNode
C RequiredKeywordArgumentValueNode
C RescueBodyNode
C RescueModNode
C RescueNode
C RestArgNode
C RetryNode
C ReturnNode
C RootNode
C SClassNode
C SValueNode
C SelfNode
I SideEffectFree
C SplatNode
C StarNode
C StrNode
C SuperNode
C SymbolNode
C TrueNode
I TwoValueNode
C UndefNode
C UnnamedRestArgNode
C UntilNode
C VAliasNode
C VCallNode
C WhenNode
C WhenOneArgNode
C WhileNode
C XStrNode
C YieldNode
C ZArrayNode
C ZSuperNode
ZArrayNode — members 3+
C new(line)
M accept(i_visitor) T
M node_type() NodeType
from Node
M contains_variable_assignment() boolean
M executes_once() boolean
M file() String
M line() int
C line=(line)
M needs_definition_check() boolean
M newline?() boolean
M nil?() boolean
C set_newline()
M to_string() String
M to_string(indent, indentation) String
M to_string_extra_info() String
C unset_newline()
from Iterable
C for_each(arg0)
M spliterator() Spliterator<T>
from ListNode
M add(node) ListNode
M add_all(other) ListNode
M add_all(other, index, length) ListNode
M add_all(other) ListNode
M child_nodes() Node>
M children() Node[]
M empty?() boolean
M get(idx) Node
M iterator() Node>
M last() Node
M size() int

org.jruby.ast.ZArrayNode

class extends ListNode implements ILiteralNode 3 members

zero length list

Constructors

new

new ( int line )
Java: <init>(int line)

Instance Methods

accept

T accept ( NodeVisitor<T> i_visitor )
Java: accept(org.jruby.ast.visitor.NodeVisitor<T> iVisitor)

Accept for the visitor pattern.

nametypedescription
i_visitororg.jruby.ast.visitor.NodeVisitor<T>the visitor

node_type

NodeType node_type ( )
Java: getNodeType() · also: get_node_type

Inherited

from Node

contains_variable_assignment

boolean contains_variable_assignment ( )
Java: containsVariableAssignment()

Does this node or one of its children contain an assignment?

executes_once

boolean executes_once ( )
Java: executesOnce()

Returns: is it possible this node will execute only once. Note: This is not comprehensive. It is used to look from root node down to class/module nodes to make sure that narrow case can execute once. It is possible much deeper down the tree some nodes can only execute once but it will be marked as false because that case is not what this is for.

file

String file ( )
Java: getFile() · also: get_file

line

int line ( )
Java: getLine() · also: get_line

line=

line= ( int line )
Java: setLine(int line) · also: set_line

needs_definition_check

boolean needs_definition_check ( )
Java: needsDefinitionCheck()

Check whether the given node is considered always "defined" or whether it has some form of definition check.

Returns: Whether the type of node represents a possibly undefined construct

newline?

boolean newline? ( )
Java: isNewline() · also: is_newline

nil?

boolean nil? ( )
Java: isNil() · also: is_nil

Whether the node evaluates to nil and has no side effects.

Returns: true if nil, false otherwise

set_newline

set_newline ( )
Java: setNewline()

to_string

String to_string ( )
Java: toString()

to_string

String to_string ( boolean indent, int indentation )
Java: toString(boolean indent, int indentation)

to_string_extra_info

String to_string_extra_info ( )
Java: toStringExtraInfo()

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).

Returns: null for no extra info or something otherwise.

unset_newline

unset_newline ( )
Java: unsetNewline()

from Iterable

for_each

for_each ( Consumer<? super T> arg0 )
Java: forEach(java.util.function.Consumer<? super T> arg0)

spliterator

Spliterator<T> spliterator ( )
Java: spliterator()

from ListNode

add

ListNode add ( Node node )
Java: add(org.jruby.ast.Node node)

add_all

ListNode add_all ( ListNode other )
Java: addAll(org.jruby.ast.ListNode other)

Add all elements in other list to this list node.

nametypedescription
otherorg.jruby.ast.ListNodelist which has elements

Returns: this instance for method chaining

add_all

ListNode add_all ( Node[] other, int index, int length )
Java: addAll(org.jruby.ast.Node[] other, int index, int length)

add_all

ListNode add_all ( Node other )
Java: addAll(org.jruby.ast.Node other)

Add other element to this list

nametypedescription
otherorg.jruby.ast.Nodelist which has elements

Returns: this instance for method chaining

child_nodes

List<Node> child_nodes ( )
Java: childNodes()

children

Node[] children ( )
Java: children()

empty?

boolean empty? ( )
Java: isEmpty() · also: is_empty

get

Node get ( int idx )
Java: get(int idx)

iterator

Iterator<Node> iterator ( )
Java: iterator()

last

Node last ( )
Java: getLast() · also: get_last

size

int size ( )
Java: size()