|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.constretto.internal.GenericCollectionTypeResolver
public abstract class GenericCollectionTypeResolver
Helper class for determining element types of collections and maps.
Mainly intended for usage within the framework, determining the target type of values to be added to a collection or map (to be able to attempt type conversion if appropriate).
| Constructor Summary | |
|---|---|
GenericCollectionTypeResolver()
|
|
| Method Summary | |
|---|---|
static Class<?> |
getCollectionFieldType(Field collectionField)
Determine the generic element type of the given Collection field. |
static Class<?> |
getCollectionParameterType(MethodParameter methodParam)
Determine the generic element type of the given Collection parameter. |
static Class<?> |
getMapKeyFieldType(Field mapField)
Determine the generic key type of the given Map field. |
static Class<?> |
getMapKeyParameterType(MethodParameter methodParam)
Determine the generic key type of the given Map parameter. |
static Class<?> |
getMapValueFieldType(Field mapField)
Determine the generic value type of the given Map field. |
static Class<?> |
getMapValueParameterType(MethodParameter methodParam)
Determine the generic value type of the given Map parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericCollectionTypeResolver()
| Method Detail |
|---|
public static Class<?> getCollectionFieldType(Field collectionField)
collectionField - the collection field to introspect
null if nonepublic static Class<?> getMapKeyFieldType(Field mapField)
mapField - the map field to introspect
null if nonepublic static Class<?> getMapValueFieldType(Field mapField)
mapField - the map field to introspect
null if nonepublic static Class<?> getCollectionParameterType(MethodParameter methodParam)
methodParam - the method parameter specification
null if nonepublic static Class<?> getMapKeyParameterType(MethodParameter methodParam)
methodParam - the method parameter specification
null if nonepublic static Class<?> getMapValueParameterType(MethodParameter methodParam)
methodParam - the method parameter specification
null if none
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||