public interface InheritanceValueMap extends ValueMap
InheritanceValueMap
is an extension of the ValueMap
which allows to take the hierarchy of resources into account while looking
for properties. As such, if a property is not found on the current resource,
it will be looked up on its parent and so on. The exact inheritance mechanism
depends on the implementation.
For this purpose, the additional methods getInherited(String, Class)
and getInherited(String, Object)
are added to the ValueMap
interface.
Modifier and Type | Method and Description |
---|---|
<T> T |
getInherited(java.lang.String name,
java.lang.Class<T> type)
Get a named property and convert it into the given type, and take the
properties of parent resources / pages into account, if the property is
not found locally.
|
<T> T |
getInherited(java.lang.String name,
T defaultValue)
Get a named property and convert it into the given type, and take the
properties of parent resources / pages into account, if the property is
not found locally.
|
<T> T getInherited(java.lang.String name, java.lang.Class<T> type)
The exact inheritance mechanism depends on the implementation.
T
- type parametername
- The name of the propertytype
- The class of the typenull
if
non existing or can't be converted.<T> T getInherited(java.lang.String name, T defaultValue)
The exact inheritance mechanism depends on the implementation.
T
- type parametername
- The name of the propertydefaultValue
- The default value to use if the named property does not exist
or cannot be converted to the requested type. The default
value is also used to define the type to convert the value to.
If this is null
any existing property is not
converted.Copyright © 2010 - 2020 Adobe. All Rights Reserved