Class Nodes.CallNode
java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.CallNode
- Enclosing class:
Nodes
Represents a method call, in all of the various forms that can take.
foo
^^^
foo()
^^^^^
+foo
^^^^
foo + bar
^^^^^^^^^
foo.bar
^^^^^^^
foo&.bar
^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Nodes.ArgumentsNodeRepresents the arguments to the method call.final Nodes.NodeRepresents the block that is being passed to the method.final shortfinal org.jruby.RubySymbolRepresents the name of the method being called.final Nodes.NodeThe object that the method is being called on.Fields inherited from class org.prism.Nodes.Node
EMPTY_ARRAY, length, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionCallNode(int startOffset, int length, short flags, Nodes.Node receiver, org.jruby.RubySymbol name, Nodes.ArgumentsNode arguments, Nodes.Node block) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(AbstractNodeVisitor<T> visitor) booleanbooleanbooleanbooleanprotected String<T> voidvisitChildNodes(AbstractNodeVisitor<T> visitor) Methods inherited from class org.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
flags
public final short flags -
receiver
The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). foo.bar ^^^ +foo ^^^ foo + bar ^^^ -
name
public final org.jruby.RubySymbol nameRepresents the name of the method being called. foo.bar # name `:foo` ^^^ -
arguments
Represents the arguments to the method call. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). foo(bar) ^^^ -
block
Represents the block that is being passed to the method. foo { |a| a } ^^^^^^^^^
-
-
Constructor Details
-
CallNode
public CallNode(int startOffset, int length, short flags, Nodes.Node receiver, org.jruby.RubySymbol name, Nodes.ArgumentsNode arguments, Nodes.Node block)
-
-
Method Details
-
isVariableCall
public boolean isVariableCall() -
isAttributeWrite
public boolean isAttributeWrite() -
isIgnoreVisibility
public boolean isIgnoreVisibility() -
visitChildNodes
- Specified by:
visitChildNodesin classNodes.Node
-
childNodes
- Specified by:
childNodesin classNodes.Node
-
accept
- Specified by:
acceptin classNodes.Node
-
toString
- Specified by:
toStringin classNodes.Node