Interface ParameterBinding.ParameterOrigin
- All Known Implementing Classes:
ParameterBinding.Expression, ParameterBinding.MethodInvocationArgument, ParameterBinding.Synthetic
- Enclosing class:
ParameterBinding
public static sealed interface ParameterBinding.ParameterOrigin
permits ParameterBinding.Expression, ParameterBinding.MethodInvocationArgument, ParameterBinding.Synthetic
Value type hierarchy to describe where a binding parameter comes from, either method call or an expression.
- Since:
- 3.1.2
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
static ParameterBinding.Expression
ofExpression
(ValueExpression expression) Creates aParameterBinding.Expression
for the givenexpression
.ofParameter
(int position) Creates aParameterBinding.MethodInvocationArgument
object forposition
.ofParameter
(@Nullable String name, @Nullable Integer position) ofParameter
(String name) Creates aParameterBinding.MethodInvocationArgument
object forname
ofParameter
(ParameterBinding.BindingIdentifier identifier) ofParameter
(Parameter parameter) Creates aParameterBinding.MethodInvocationArgument
object forposition
.static ParameterBinding.Synthetic
Creates aParameterBinding.Expression
for the givenexpression
string.
-
Method Details
-
ofExpression
Creates aParameterBinding.Expression
for the givenexpression
.- Parameters:
expression
- must not be null.- Returns:
ParameterBinding.Expression
for the givenexpression
.
-
synthetic
Creates aParameterBinding.Expression
for the givenexpression
string.- Parameters:
value
- the captured value.source
- source from which this value is derived.- Returns:
ParameterBinding.Synthetic
for the givenvalue
.
-
ofParameter
Creates aParameterBinding.MethodInvocationArgument
object forname
- Parameters:
name
- the parameter name from the method invocation.- Returns:
ParameterBinding.MethodInvocationArgument
object forname
.
-
ofParameter
static ParameterBinding.MethodInvocationArgument ofParameter(@Nullable String name, @Nullable Integer position) Creates aParameterBinding.MethodInvocationArgument
object forname
andposition
. Either the name or the position must be given.- Parameters:
name
- the parameter name from the method invocation, can be null.position
- the parameter position (1-based) from the method invocation, can be null.- Returns:
ParameterBinding.MethodInvocationArgument
object forname
andposition
.
-
ofParameter
Creates aParameterBinding.MethodInvocationArgument
object forposition
.- Parameters:
parameter
- the parameter from the method invocation.- Returns:
ParameterBinding.MethodInvocationArgument
object forposition
.
-
ofParameter
Creates aParameterBinding.MethodInvocationArgument
object forposition
.- Parameters:
position
- the parameter position (1-based) from the method invocation.- Returns:
ParameterBinding.MethodInvocationArgument
object forposition
.
-
ofParameter
static ParameterBinding.MethodInvocationArgument ofParameter(ParameterBinding.BindingIdentifier identifier) - Parameters:
identifier
- must not be null.- Returns:
ParameterBinding.MethodInvocationArgument
forParameterBinding.BindingIdentifier
.
-
isMethodArgument
boolean isMethodArgument()- Returns:
true
if the origin is a method argument reference.
-
isExpression
boolean isExpression()- Returns:
true
if the origin is an expression.
-
isSynthetic
boolean isSynthetic()- Returns:
true
if the origin is synthetic (contributed by e.g. KeysetPagination)
-