public 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
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration
Constructor and Description |
---|
MethodReferenceExpr() |
MethodReferenceExpr(Expression scope,
NodeList<Type> typeArguments,
String identifier) |
MethodReferenceExpr(TokenRange tokenRange,
Expression scope,
NodeList<Type> typeArguments,
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() |
String |
getIdentifier() |
MethodReferenceExprMetaModel |
getMetaModel() |
List<NodeList<?>> |
getNodeLists()
The list of NodeLists owned by this node.
|
Expression |
getScope() |
Optional<NodeList<Type>> |
getTypeArguments() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
MethodReferenceExpr |
setIdentifier(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, 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
public MethodReferenceExpr()
public MethodReferenceExpr(Expression scope, NodeList<Type> typeArguments, String identifier)
@Generated(value="com.github.javaparser.generator.core.node.MainConstructorGenerator") public MethodReferenceExpr(TokenRange tokenRange, Expression scope, NodeList<Type> typeArguments, 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 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 String getIdentifier()
getIdentifier
in interface NodeWithIdentifier<MethodReferenceExpr>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public MethodReferenceExpr setIdentifier(String identifier)
setIdentifier
in interface NodeWithIdentifier<MethodReferenceExpr>
@Generated(value="com.github.javaparser.generator.core.node.GetNodeListsGenerator") public 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
Copyright © 2007–2017. All rights reserved.