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 TypeMethodDescriptionbooleanbooleanbooleanstatic ParameterBinding.ExpressionofExpression(ValueExpression expression) Creates aParameterBinding.Expressionfor the givenexpression.ofParameter(int position) Creates aParameterBinding.MethodInvocationArgumentobject forposition.ofParameter(@Nullable String name, @Nullable Integer position) ofParameter(String name) Creates aParameterBinding.MethodInvocationArgumentobject fornameofParameter(ParameterBinding.BindingIdentifier identifier) ofParameter(Parameter parameter) Creates aParameterBinding.MethodInvocationArgumentobject forposition.static ParameterBinding.SyntheticCreates aParameterBinding.Expressionfor the givenexpressionstring.
-
Method Details
-
ofExpression
Creates aParameterBinding.Expressionfor the givenexpression.- Parameters:
expression- must not be null.- Returns:
ParameterBinding.Expressionfor the givenexpression.
-
synthetic
Creates aParameterBinding.Expressionfor the givenexpressionstring.- Parameters:
value- the captured value.source- source from which this value is derived.- Returns:
ParameterBinding.Syntheticfor the givenvalue.
-
ofParameter
Creates aParameterBinding.MethodInvocationArgumentobject forname- Parameters:
name- the parameter name from the method invocation.- Returns:
ParameterBinding.MethodInvocationArgumentobject forname.
-
ofParameter
static ParameterBinding.MethodInvocationArgument ofParameter(@Nullable String name, @Nullable Integer position) Creates aParameterBinding.MethodInvocationArgumentobject fornameandposition. 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.MethodInvocationArgumentobject fornameandposition.
-
ofParameter
Creates aParameterBinding.MethodInvocationArgumentobject forposition.- Parameters:
parameter- the parameter from the method invocation.- Returns:
ParameterBinding.MethodInvocationArgumentobject forposition.
-
ofParameter
Creates aParameterBinding.MethodInvocationArgumentobject forposition.- Parameters:
position- the parameter position (1-based) from the method invocation.- Returns:
ParameterBinding.MethodInvocationArgumentobject forposition.
-
ofParameter
static ParameterBinding.MethodInvocationArgument ofParameter(ParameterBinding.BindingIdentifier identifier) - Parameters:
identifier- must not be null.- Returns:
ParameterBinding.MethodInvocationArgumentforParameterBinding.BindingIdentifier.
-
isMethodArgument
boolean isMethodArgument()- Returns:
trueif the origin is a method argument reference.
-
isExpression
boolean isExpression()- Returns:
trueif the origin is an expression.
-
isSynthetic
boolean isSynthetic()- Returns:
trueif the origin is synthetic (contributed by e.g. KeysetPagination)
-