R - the reflection form builder to useC - the component to producepublic abstract class GenericListTypeHandler<R extends ReflectionFormBuilder,C extends Component> extends Object implements TypeHandler<List<Object>,FieldUpdateEvent<List<Object>>,R,C>
TypeHandler which allows to check for an exact type match (which is
handled immediately (and the result returned)) and retrieve the type of the
List.Furthermore check different class annotations for the base type
and the generic list type.| Constructor and Description |
|---|
GenericListTypeHandler(Map<Type,TypeHandler<?,?,?,?>> genericsTypeHandlerMapping,
Map<Type,TypeHandler<?,?,?,?>> typeHandlerMapping) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.lang3.tuple.Pair<JComponent,ComponentHandler<?>> |
handle(Type type,
List<Object> fieldValue,
String fieldName,
Class<?> declaringClass,
FieldUpdateListener<FieldUpdateEvent<List<Object>>> updateListener,
R reflectionFormBuilder)
Checks
typeClassAnnotationHandlerMapping and then
typeHandlerMapping for exact matches.If there're no results,
checks typeClassAnnotationHandlerMapping and
genericsTypeClassAnnotationHandlerMapping. |
protected abstract org.apache.commons.lang3.tuple.Pair<JComponent,ComponentHandler<?>> |
handleGenericType(Type type,
List<Object> fieldValue,
String fieldName,
Class<?> declaringClass,
FieldUpdateListener<FieldUpdateEvent<List<Object>>> updateListener,
R reflectionFormBuilder) |
Type |
retrieveTypeGenericType(Type type) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresetpublic GenericListTypeHandler(Map<Type,TypeHandler<?,?,?,?>> genericsTypeHandlerMapping, Map<Type,TypeHandler<?,?,?,?>> typeHandlerMapping)
public org.apache.commons.lang3.tuple.Pair<JComponent,ComponentHandler<?>> handle(Type type, List<Object> fieldValue, String fieldName, Class<?> declaringClass, FieldUpdateListener<FieldUpdateEvent<List<Object>>> updateListener, R reflectionFormBuilder) throws FieldHandlingException, ResetException
typeClassAnnotationHandlerMapping and then
typeHandlerMapping for exact matches.If there're no results,
checks typeClassAnnotationHandlerMapping and
genericsTypeClassAnnotationHandlerMapping.handle in interface TypeHandler<List<Object>,FieldUpdateEvent<List<Object>>,R extends ReflectionFormBuilder,C extends Component>type - the type to handlefieldValue - the current field valuefieldName - the field namedeclaringClass - the class declaring standing on top of the hiearchy
using the typeupdateListener - the update listener to usereflectionFormBuilder - the reflection form builder to useFieldHandlingException - wraps all exceptions occuring during read
or write access to fieldsResetException - if an exception during resetting the field occursprotected abstract org.apache.commons.lang3.tuple.Pair<JComponent,ComponentHandler<?>> handleGenericType(Type type, List<Object> fieldValue, String fieldName, Class<?> declaringClass, FieldUpdateListener<FieldUpdateEvent<List<Object>>> updateListener, R reflectionFormBuilder) throws FieldHandlingException, ResetException
FieldHandlingExceptionResetExceptionCopyright © 2018. All rights reserved.