Class Function
java.lang.Object
org.springframework.data.spel.spi.Function
Value object to represent a function. Can either be backed by a static
Method invocation (see
Function(Method)) or a method invocation on an instance (see Function(Method, Object).- Since:
- 1.9
- Author:
- Thomas Darimont, Oliver Gierke, Jens Schauder, Johannes Englmeier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> Returns the type declaring theFunction.getName()Returns the name of the function.intReturns the number of parameters required by the underlying method.Invokes the function with the given arguments.booleanisSignatureEqual(Function other) Checks whether thisFunctionhas the same signature as anotherFunction.booleansupports(List<TypeDescriptor> argumentTypes) Returns true if the function can be called with the givenargumentTypes.booleansupportsExact(List<TypeDescriptor> argumentTypes) Checks if the encapsulated method has exactly the argument types as those passed as an argument.
-
Constructor Details
-
Function
-
Function
-
-
Method Details
-
invoke
-
getName
-
getDeclaringClass
-
supports
Returns true if the function can be called with the givenargumentTypes.- Parameters:
argumentTypes-- Returns:
-
getParameterCount
public int getParameterCount()Returns the number of parameters required by the underlying method.- Returns:
-
supportsExact
Checks if the encapsulated method has exactly the argument types as those passed as an argument.- Parameters:
argumentTypes- a list ofTypeDescriptors to compare with the argument types of the method- Returns:
- true if the types are equal, false otherwise.
-
isSignatureEqual
Checks whether thisFunctionhas the same signature as anotherFunction.- Parameters:
other- theFunctionto comparethiswith.- Returns:
- true if name and argument list are the same.
-