public final class MethodReferenceExpr extends Expression implements NodeWithTypeArguments<MethodReferenceExpr>, NodeWithIdentifier<MethodReferenceExpr>
System.out::println;
the scope is System.out and the identifier is "println"
(test ? stream.map(String::trim) : stream)::toArray;
Bar<String>::<Integer>new
the String type argument is on the scope,
and the Integer type argument is on this MethodReferenceExpr.Node.ObserverRegistrationMode, Node.Parsedness
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
identifier |
private Expression |
scope |
private NodeList<Type> |
typeArguments |
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration
Constructor and Description |
---|
MethodReferenceExpr() |
MethodReferenceExpr(Expression scope,
NodeList<Type> typeArguments,
java.lang.String identifier) |
MethodReferenceExpr(TokenRange tokenRange,
Expression scope,
NodeList<Type> typeArguments,
java.lang.String identifier)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method and Description |
---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
MethodReferenceExpr |
clone() |
java.lang.String |
getIdentifier() |
MethodReferenceExprMetaModel |
getMetaModel() |
java.util.List<NodeList<?>> |
getNodeLists()
The list of NodeLists owned by this node.
|
Expression |
getScope() |
java.util.Optional<NodeList<Type>> |
getTypeArguments() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
MethodReferenceExpr |
setIdentifier(java.lang.String identifier) |
MethodReferenceExpr |
setScope(Expression scope) |
MethodReferenceExpr |
setTypeArguments(NodeList<Type> typeArguments)
Sets the typeArguments
|
addOrphanComment, customInitialization, equals, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, toString, toString, tryAddImportToParentCompilationUnit, unregister
finalize, getClass, notify, notifyAll, wait, wait, wait
isUsingDiamondOperator, removeTypeArguments, setDiamondOperator, setTypeArguments
getId, setId
getAncestorOfType
containsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBefore
private Expression scope
private java.lang.String identifier
public MethodReferenceExpr()
public MethodReferenceExpr(Expression scope, NodeList<Type> typeArguments, java.lang.String identifier)
@Generated(value="com.github.javaparser.generator.core.node.MainConstructorGenerator") public MethodReferenceExpr(TokenRange tokenRange, Expression scope, NodeList<Type> typeArguments, java.lang.String identifier)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitable
accept
in interface Visitable
R
- the type of the return value of the visitorA
- the type the user argument passed to the visitorv
- the visitor implementationarg
- the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitable
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Expression getScope()
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public MethodReferenceExpr setScope(Expression scope)
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public java.util.Optional<NodeList<Type>> getTypeArguments()
getTypeArguments
in interface NodeWithTypeArguments<MethodReferenceExpr>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public MethodReferenceExpr setTypeArguments(NodeList<Type> typeArguments)
setTypeArguments
in interface NodeWithTypeArguments<MethodReferenceExpr>
typeArguments
- the typeArguments, can be null@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public java.lang.String getIdentifier()
getIdentifier
in interface NodeWithIdentifier<MethodReferenceExpr>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public MethodReferenceExpr setIdentifier(java.lang.String identifier)
setIdentifier
in interface NodeWithIdentifier<MethodReferenceExpr>
@Generated(value="com.github.javaparser.generator.core.node.GetNodeListsGenerator") public java.util.List<NodeList<?>> getNodeLists()
Node
getNodeLists
in class Node
@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
remove
in class Expression
@Generated(value="com.github.javaparser.generator.core.node.CloneGenerator") public MethodReferenceExpr clone()
clone
in class Expression
@Generated(value="com.github.javaparser.generator.core.node.GetMetaModelGenerator") public MethodReferenceExprMetaModel getMetaModel()
getMetaModel
in class Expression
@Generated(value="com.github.javaparser.generator.core.node.ReplaceMethodGenerator") public boolean replace(Node node, Node replacementNode)
replace
in class Expression