public class JLambdaMethodRef extends AbstractJExpressionImpl
| Constructor and Description |
|---|
JLambdaMethodRef(AbstractJType aType)
Constructor for a constructor method reference (
type::new). |
JLambdaMethodRef(AbstractJType aType,
String sMethod)
Constructor for an arbitrary method reference.
|
JLambdaMethodRef(JMethod aMethod)
Constructor to reference the passed method
|
JLambdaMethodRef(JVar aVar,
JMethod aMethod)
Constructor for an arbitrary instance method reference.
|
JLambdaMethodRef(JVar aVar,
String sMethod)
Constructor for an arbitrary instance method reference.
|
| Modifier and Type | Method and Description |
|---|---|
void |
generate(JFormatter f) |
boolean |
isStaticRef() |
JMethod |
method() |
String |
methodName() |
AbstractJType |
type() |
JVar |
var() |
_instanceof, band, bor, cand, complement, component, component, component0, cor, decr, div, div, div, div, div, eq, eq0, eqNull, gt, gt0, gte, gte0, incr, invoke, invoke, lt, lt0, lte, lte0, minus, minus, minus, minus, minus, minus, mod, mul, mul, mul, mul, mul, ne, ne0, neNull, not, plus, plus, plus, plus, plus, plus, predecr, preincr, ref, ref, shl, shl, shr, shr, shrz, shrz, xorpublic JLambdaMethodRef(@Nonnull JMethod aMethod)
aMethod - The static method to reference. May not be null.public JLambdaMethodRef(@Nonnull AbstractJType aType)
type::new).aType - Type to reference the constructor from. May not be null
.public JLambdaMethodRef(@Nonnull AbstractJType aType, @Nonnull String sMethod)
aType - Type the method belongs to. May not be null.sMethod - Name of the static method to reference. May neither be
null nor empty.public JLambdaMethodRef(@Nonnull JVar aVar, @Nonnull String sMethod)
aVar - Variable containing the instance. May not be null.sMethod - Name of the method to reference. May neither be null
nor empty.public boolean isStaticRef()
true if this is a static reference, false
if this is an instance reference.@Nullable public JMethod method()
null if a constructor with
method name was used.@Nonnull public AbstractJType type()
null .@Nullable public JVar var()
null
if this is a static reference.@Nonnull public String methodName()
null.public void generate(@Nonnull JFormatter f)
Copyright © 2013–2017 Philip Helger. All rights reserved.