|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.beans.autowired.AutowiredContainerAbstract<Object>
org.omnaest.utils.beans.autowired.TypeToAutowiredPropertyContainerAdapter<B>
B - public class TypeToAutowiredPropertyContainerAdapter<B>
Adapter to create a Map view on an underlying Java Bean object. Modifications to the bean or the map will be reflected
to each other.
PropertynameMapToTypeAdapter,
Serialized Form| Field Summary | |
|---|---|
protected B |
bean
|
protected Map<String,BeanPropertyAccessor<B>> |
propertynameToBeanPropertyAccessorMap
|
protected Map<Class<?>,Set<BeanPropertyAccessor<B>>> |
propertyTypeToBeanPropertyAccessorSetMap
|
| Constructor Summary | |
|---|---|
protected |
TypeToAutowiredPropertyContainerAdapter(B bean)
|
| Method Summary | ||
|---|---|---|
|
getPropertynameToValueMap(Class<O> type)
Returns a Map for all properties which can be assigned to the given Class. |
|
protected
|
getPropertynameToValueMapForArbitraryType(Class<?> type)
|
|
|
getValueSet(Class<? extends O> type)
Returns a Set for all values which can be assigned to the given Class. |
|
Iterator<Object> |
iterator()
|
|
static
|
newInstance(B bean)
Factory method to create a Map view on a given Java Bean object. |
|
AutowiredContainer<Object> |
put(Object object)
Adds an Object to the AutowiredContainer using its Object.getClass() as primary type. |
|
|
put(O object,
Class<? extends O>... types)
Adds an Object to the AutowiredContainer for one or more given Class types. |
|
AutowiredPropertyContainer |
put(String propertyname,
Object value)
Adds an Object to the AutowiredPropertyContainer. |
|
AutowiredContainer<Object> |
removeAllAssignableTo(Class<? extends Object> type)
Removes all elements within the AutowiredContainer which are Class.isAssignableFrom(Class) to the given type. |
|
AutowiredContainer<Object> |
removeAllHavingExactTypeOf(Class<? extends Object> type)
Removes all elements within the AutowiredContainer which are put into the container with the given primary type. |
|
| Methods inherited from class org.omnaest.utils.beans.autowired.AutowiredContainerAbstract |
|---|
containsAssignable, equals, getValue, hashCode, isEmpty, putAll, remove, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.omnaest.utils.beans.autowired.AutowiredContainer |
|---|
containsAssignable, getValue, isEmpty, putAll, remove, size |
| Field Detail |
|---|
protected B bean
protected Map<String,BeanPropertyAccessor<B>> propertynameToBeanPropertyAccessorMap
protected Map<Class<?>,Set<BeanPropertyAccessor<B>>> propertyTypeToBeanPropertyAccessorSetMap
| Constructor Detail |
|---|
protected TypeToAutowiredPropertyContainerAdapter(B bean)
bean - newInstance(Object)| Method Detail |
|---|
public static <B> AutowiredPropertyContainer newInstance(B bean)
Map view on a given Java Bean object. Changes to this map will be translated to the Java
Bean object and vice versa.
B - bean -
public <O> AutowiredContainer<Object> put(O object,
Class<? extends O>... types)
AutowiredContainerObject to the AutowiredContainer for one or more given Class types.
put in interface AutowiredContainer<Object>AutowiredContainer.put(Object)public AutowiredContainer<Object> put(Object object)
AutowiredContainerObject to the AutowiredContainer using its Object.getClass() as primary type.
put in interface AutowiredContainer<Object>AutowiredContainer.put(Object, Class...),
AutowiredContainer.putAll(Iterable)
public AutowiredPropertyContainer put(String propertyname,
Object value)
AutowiredPropertyContainerObject to the AutowiredPropertyContainer. This will update all properties of the underlying Java Bean
object which can be assigned by the given Object.
put in interface AutowiredPropertyContainerpublic <O> Map<String,O> getPropertynameToValueMap(Class<O> type)
AutowiredPropertyContainerMap for all properties which can be assigned to the given Class. The Map has the property
names as key and the values of the properties as values.
getPropertynameToValueMap in interface AutowiredPropertyContainerprotected <O> Map<String,O> getPropertynameToValueMapForArbitraryType(Class<?> type)
public <O> Set<O> getValueSet(Class<? extends O> type)
AutowiredContainerSet for all values which can be assigned to the given Class.
getValueSet in interface AutowiredContainer<Object>public Iterator<Object> iterator()
iterator in interface Iterable<Object>public AutowiredContainer<Object> removeAllHavingExactTypeOf(Class<? extends Object> type)
AutowiredContainerAutowiredContainer which are put into the container with the given primary type.
removeAllHavingExactTypeOf in interface AutowiredContainer<Object>AutowiredContainer.removeAllAssignableTo(Class)public AutowiredContainer<Object> removeAllAssignableTo(Class<? extends Object> type)
AutowiredContainerAutowiredContainer which are Class.isAssignableFrom(Class) to the given type.
removeAllAssignableTo in interface AutowiredContainer<Object>AutowiredContainer.removeAllHavingExactTypeOf(Class)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||