public abstract static class BeanVisitor.ContainerVisitor extends Object implements BeanVisitor.Vzt
Recursively handle common containers with empty constructor, eg. ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap, LinkedHashMap Object[]
| Constructor and Description |
|---|
ContainerVisitor() |
| Modifier and Type | Method and Description |
|---|---|
Object |
amend(@NotNull Field field,
@NotNull Annotation[] annos,
Object obj)
Handle field value or container element, object reference changes as modifications
|
protected Object[] |
amendArr(@NotNull Field field,
@NotNull Annotation[] annos,
@NotNull Object[] arr)
Object[]
|
protected List<?> |
amendList(@NotNull Field field,
@NotNull Annotation[] annos,
@NotNull List<?> lst)
ArrayList, LinkedList
|
protected Map<?,?> |
amendMap(@NotNull Field field,
@NotNull Annotation[] annos,
@NotNull Map<?,?> map)
HashMap, TreeMap, LinkedHashMap
|
protected Set<?> |
amendSet(@NotNull Field field,
@NotNull Annotation[] annos,
@NotNull Set<?> set)
HashSet, TreeSet,
|
protected abstract @Nullable Object |
amendValue(@NotNull Field field,
@NotNull Annotation[] annos,
@Nullable Object obj)
obj is not List/Map/Set/Object[]
|
protected <T> T |
newContainer(@NotNull Class<?> claz,
int size)
new instance, eg.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcarespublic Object amend(@NotNull @NotNull Field field, @NotNull @NotNull Annotation[] annos, Object obj)
BeanVisitor.Vztamend in interface BeanVisitor.Vztfield - bean fieldannos - annotation on the fieldobj - field value or container elementprotected Map<?,?> amendMap(@NotNull @NotNull Field field, @NotNull @NotNull Annotation[] annos, @NotNull @NotNull Map<?,?> map)
protected Set<?> amendSet(@NotNull @NotNull Field field, @NotNull @NotNull Annotation[] annos, @NotNull @NotNull Set<?> set)
protected List<?> amendList(@NotNull @NotNull Field field, @NotNull @NotNull Annotation[] annos, @NotNull @NotNull List<?> lst)
protected Object[] amendArr(@NotNull @NotNull Field field, @NotNull @NotNull Annotation[] annos, @NotNull @NotNull Object[] arr)
@NotNull
protected <T> T newContainer(@NotNull
@NotNull Class<?> claz,
int size)
@Nullable protected abstract @Nullable Object amendValue(@NotNull @NotNull Field field, @NotNull @NotNull Annotation[] annos, @Nullable @Nullable Object obj)
Copyright © 2023. All rights reserved.