Package org.springframework.data.mapping
Class PreferredConstructor.Parameter<T,P extends PersistentProperty<P>>
java.lang.Object
org.springframework.data.mapping.PreferredConstructor.Parameter<T,P>
- Type Parameters:
T
- the type of the parameter
- Enclosing class:
- PreferredConstructor<T,
P extends PersistentProperty<P>>
public static class PreferredConstructor.Parameter<T,P extends PersistentProperty<P>>
extends Object
Value object to represent constructor parameters.
- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionParameter
(String name, TypeInformation<T> type, Annotation[] annotations, PersistentEntity<T, P> entity) Creates a newPreferredConstructor.Parameter
with the given name,TypeInformation
as well as an array ofAnnotation
s. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Merged annotations that this parameter is annotated with.getName()
Returns the name of the parameter.Returns the raw resolved type of the parameter.Returns the key to be used when looking up a source data structure to populate the actual parameter value.getType()
Returns theTypeInformation
of the parameter.int
hashCode()
boolean
Returns whether the constructor parameter is equipped with a SpEL expression.
-
Constructor Details
-
Parameter
public Parameter(@Nullable String name, TypeInformation<T> type, Annotation[] annotations, @Nullable PersistentEntity<T, P> entity) Creates a newPreferredConstructor.Parameter
with the given name,TypeInformation
as well as an array ofAnnotation
s. Will inspect the annotations for anValue
annotation to lookup a key or an SpEL expression to be evaluated.- Parameters:
name
- the name of the parameter, can be nulltype
- must not be nullannotations
- must not be null but can be emptyentity
- must not be null.
-
-
Method Details
-
getName
Returns the name of the parameter.- Returns:
-
getType
Returns theTypeInformation
of the parameter.- Returns:
-
getAnnotations
Merged annotations that this parameter is annotated with.- Returns:
- Since:
- 2.5
-
getRawType
Returns the raw resolved type of the parameter.- Returns:
-
getSpelExpression
Returns the key to be used when looking up a source data structure to populate the actual parameter value.- Returns:
-
hasSpelExpression
public boolean hasSpelExpression()Returns whether the constructor parameter is equipped with a SpEL expression.- Returns:
-
equals
-
hashCode
public int hashCode()
-