|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.util.ParentTypeAwareTypeInformation<S>
public abstract class ParentTypeAwareTypeInformation<S>
Base class for TypeInformation implementations that need parent type awareness.
| Constructor Summary | |
|---|---|
protected |
ParentTypeAwareTypeInformation(Type type,
org.springframework.data.util.TypeDiscoverer<?> parent,
Map<TypeVariable,Type> map)
Creates a new ParentTypeAwareTypeInformation. |
| Method Summary | |
|---|---|
protected TypeInformation<?> |
createInfo(Type fieldType)
Creates TypeInformation for the given Type. |
boolean |
equals(Object obj)
|
TypeInformation<?> |
getActualType()
Transparently returns the Map value type if the type is a Map, returns the
component type if the type TypeInformation.isCollectionLike() or the simple type if none of this applies. |
TypeInformation<?> |
getComponentType()
Returns the component type for Collections or the key type for Maps. |
TypeInformation<?> |
getMapValueType()
Will return the type of the value in case the underlying type is a Map. |
List<TypeInformation<?>> |
getParameterTypes(Constructor<?> constructor)
|
TypeInformation<?> |
getProperty(String fieldname)
Returns the property information for the property with the given name. |
TypeInformation<?> |
getReturnType(Method method)
Returns a TypeInformation for the return type of the given Method. |
Class<S> |
getType()
Returns the type of the property. |
protected Map<TypeVariable,Type> |
getTypeVariableMap()
Considers the parent's type variable map before invoking the super class method. |
int |
hashCode()
|
boolean |
isCollectionLike()
Returns whether the type can be considered a collection, which means it's a container of elements, e.g. a Collection and Array or anything implementing Iterable. |
boolean |
isMap()
Returns whether the property is a Map. |
protected Class<S> |
resolveType(Type type)
Resolves the given type into a plain Class. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ParentTypeAwareTypeInformation(Type type,
org.springframework.data.util.TypeDiscoverer<?> parent,
Map<TypeVariable,Type> map)
ParentTypeAwareTypeInformation.
type - typeVariableMap - | Method Detail |
|---|
protected Map<TypeVariable,Type> getTypeVariableMap()
protected TypeInformation<?> createInfo(Type fieldType)
TypeInformation for the given Type.
public boolean equals(Object obj)
public int hashCode()
protected Class<S> resolveType(Type type)
Class.
type -
public List<TypeInformation<?>> getParameterTypes(Constructor<?> constructor)
getParameterTypes in interface TypeInformation<S>public TypeInformation<?> getProperty(String fieldname)
TypeInformation
getProperty in interface TypeInformation<S>public Class<S> getType()
TypeInformation
getType in interface TypeInformation<S>public TypeInformation<?> getActualType()
TypeInformationMap value type if the type is a Map, returns the
component type if the type TypeInformation.isCollectionLike() or the simple type if none of this applies.
getActualType in interface TypeInformation<S>public boolean isMap()
TypeInformationMap. If this returns true you can expect
TypeInformation.getComponentType() as well as TypeInformation.getMapValueType() to return something not null.
isMap in interface TypeInformation<S>public TypeInformation<?> getMapValueType()
TypeInformationMap.
getMapValueType in interface TypeInformation<S>public boolean isCollectionLike()
TypeInformationCollection and Array or anything implementing Iterable. If this
returns true you can expect TypeInformation.getComponentType() to return a non-null value.
isCollectionLike in interface TypeInformation<S>public TypeInformation<?> getComponentType()
TypeInformationCollections or the key type for Maps.
getComponentType in interface TypeInformation<S>public TypeInformation<?> getReturnType(Method method)
TypeInformationTypeInformation for the return type of the given Method. Will potentially resolve
generics information against the current types type parameter bindings.
getReturnType in interface TypeInformation<S>method - must not be null.
|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||