|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.beans.adapter.ListToTypeAdapter<T,L>
T - L - public class ListToTypeAdapter<T,L extends List<?>>
This class creates a proxy implementation for a given Java Bean type which is used as a facade to an underlying List<?>.
Be aware of the fact that only the declared fields of the Class or interface type will affect the List and no
access on properties declared by supertypes.
newInstance(List, Class)| Nested Class Summary | |
|---|---|
protected class |
ListToTypeAdapter.ClassAdapterMethodInterceptor
A MethodInterceptor implementation special for this ListToTypeAdapter |
static interface |
ListToTypeAdapter.UnderlyingListAware<L extends List<?>>
This interface makes a derivative type aware of an underlying map implementation. |
| Field Summary | |
|---|---|
protected T |
classAdapter
|
protected Class<? extends T> |
clazz
|
protected boolean |
hasAccessToUnderlyingData
|
protected List<Object> |
list
|
protected List<String> |
propertynameList
|
| Constructor Summary | |
|---|---|
protected |
ListToTypeAdapter(L list,
Class<T> clazz,
Comparator<String> comparatorPropertyname,
List<String> propertynameList,
boolean underlyingListAware)
|
| Method Summary | ||
|---|---|---|
protected void |
ensureListSize()
Initializes the given List to match the size of the list of declared methods of the underlying Class. |
|
protected void |
initializeClassAdapter(Class<? extends T> clazz,
boolean underlyingListAware)
Creates the stub |
|
static
|
newInstance(List<?> list,
Class<T> clazz)
Factory method to create a new ListToTypeAdapter for a given List with the given Class as facade. |
|
static
|
newInstance(List<?> list,
Class<T> clazz,
boolean underlyingListAware)
Factory method to create a new ListToTypeAdapter for a given List with the given Class as facade. |
|
static
|
newInstance(List<?> list,
Class<T> clazz,
Comparator<String> comparatorPropertyname,
boolean underlyingListAware)
Factory method to create a new ListToTypeAdapter for a given List with the given Class as facade. |
|
protected static
|
newInstance(List<?> list,
Class<T> clazz,
Comparator<String> comparatorPropertyname,
List<String> propertynameList,
boolean underlyingListAware)
Factory method to create a new ListToTypeAdapter for a given List with the given Class as facade. |
|
static
|
newInstance(List<?> list,
Class<T> clazz,
List<String> propertynameList,
boolean underlyingListAware)
Factory method to create a new ListToTypeAdapter for a given List with the given Class as facade. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<Object> list
protected T classAdapter
protected Class<? extends T> clazz
protected List<String> propertynameList
protected boolean hasAccessToUnderlyingData
| Constructor Detail |
|---|
protected ListToTypeAdapter(L list,
Class<T> clazz,
Comparator<String> comparatorPropertyname,
List<String> propertynameList,
boolean underlyingListAware)
list - clazz - comparatorPropertyname - : optionalpropertynameList - : optionalunderlyingListAware - | Method Detail |
|---|
public static <T> T newInstance(List<?> list,
Class<T> clazz,
Comparator<String> comparatorPropertyname,
boolean underlyingListAware)
ListToTypeAdapter for a given List with the given Class as facade. The
list will contain as many elements as properties are possible and for each property an immutable index position is reserved.
Within the list the objects will be stored in the order the property names have after invoking the given Comparator
on them.
list - clazz - comparatorPropertyname - underlyingListAware - : true > returned stub implements ListToTypeAdapter.UnderlyingListAware
newInstance(List, Class)
public static <T> T newInstance(List<?> list,
Class<T> clazz,
List<String> propertynameList,
boolean underlyingListAware)
ListToTypeAdapter for a given List with the given Class as facade. The
list will contain as many elements as properties are possible and for each property an immutable index position is reserved.
The objects will be stored in the order of the given List of property names.
list - clazz - underlyingListAware - : true > returned stub implements ListToTypeAdapter.UnderlyingListAware
newInstance(List, Class)
public static <T> T newInstance(List<?> list,
Class<T> clazz,
boolean underlyingListAware)
ListToTypeAdapter for a given List with the given Class as facade. The
list will contain as many elements as properties are possible and for each property an immutable index position is reserved.
The objects will be stored in no particular order within the List.
list - clazz - underlyingListAware - : true > returned stub implements ListToTypeAdapter.UnderlyingListAware
newInstance(List, Class)
public static <T> T newInstance(List<?> list,
Class<T> clazz)
ListToTypeAdapter for a given List with the given Class as facade. The
list will contain as many elements as properties are possible and for each property an immutable index position is reserved.
The objects will be stored in no particular order within the List.
list - clazz -
newInstance(List, Class, boolean),
newInstance(List, Class, List, boolean),
*
protected static <T> T newInstance(List<?> list,
Class<T> clazz,
Comparator<String> comparatorPropertyname,
List<String> propertynameList,
boolean underlyingListAware)
ListToTypeAdapter for a given List with the given Class as facade.
list - clazz - comparatorPropertyname - propertynameList - underlyingListAware -
newInstance(List, Class),
newInstance(List, Class, Comparator, boolean),
newInstance(List, Class, List, boolean)protected void ensureListSize()
List to match the size of the list of declared methods of the underlying Class.
protected void initializeClassAdapter(Class<? extends T> clazz,
boolean underlyingListAware)
clazz - underlyingListAware -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||