public class UnionObjectResolver extends Object implements ObjectResolver
ObjectResolver
which will be processed in sequence.
the first result of a ObjectResolver which are a not-null value will be used as result.
Constructor and Description |
---|
UnionObjectResolver() |
Modifier and Type | Method and Description |
---|---|
void |
addObjectResolver(ObjectResolver objectResolver)
Some Implementations of a
ObjectResolver are delegating the functionality
to other ObjectResolvers. |
Object |
getObject(String key,
ContentResolver contentResolver)
Reads the byte[] content from the ContentResolver and creates an Object.
|
public void addObjectResolver(ObjectResolver objectResolver)
ObjectResolver
are delegating the functionality
to other ObjectResolvers.UnionObjectResolver
-------------------------------------- <objectResolver name="DefaultObjectResolver" class="org.settings4j.objectresolver.UnionObjectResolver"> <objectResolver-ref ref="JavaXMLBeansObjectResolver" /> <objectResolver-ref ref="SpringConfigObjectResolver" /> </objectResolver> --------------------------------------
addObjectResolver
in interface ObjectResolver
objectResolver
- the original objectResolver to delegate.public Object getObject(String key, ContentResolver contentResolver)
ContentResolver
.getContent(key + ".properties")ContentResolver.getContent(String key)
to an Object.getObject
in interface ObjectResolver
key
- The Key of the byte[] who should be converted to an Object.contentResolver
- The contentResolver, from where the content could be read.Copyright © 2008–2014. All rights reserved.