| org.w3c.tools.resources.ResourceShadower
ResourceShadower | public interface ResourceShadower (Code) | | This interface describe the proxy pattern.
Resource can be proxied: a given resource can act as if it was some other
resource; this interface describe how to access the proxy resource
attributes in such cases.
|
Method Summary | |
public boolean | definesTargetAttribute(int idx) Does this shadow object defines the given attribute. | public boolean | definesTargetAttribute(String name) Does this shadow object defines the given attribute (by name).
Parameters: name - The name of the target attribute. | public Attribute[] | getTargetAttributes() Get the list of attributes shadowed byt htis shadowing resource. | public Resource | getTargetResource() Get the resource shadowed by this object. | public Object | getTargetValue(int idx, Object def) Get a shadowed attribute value.
Parameters: idx - The index of the shadowed attribute. Parameters: def - The default return value (if no shadow value defined). | public Object | getTargetValue(String name, Object def) Get a shadowed attribute value (by name).
Parameters: name - The name of the shadowed attribute. Parameters: def - The default return value (if no shadow value defined). | public void | setTargetValue(int idx, Object value) Set a shadowed attribute value. | public void | setTargetValue(String name, Object def) Set a shadowed attribute value by name. |
definesTargetAttribute | public boolean definesTargetAttribute(int idx)(Code) | | Does this shadow object defines the given attribute.
Parameters: idx - The index of the shadowed attribute to test. |
definesTargetAttribute | public boolean definesTargetAttribute(String name)(Code) | | Does this shadow object defines the given attribute (by name).
Parameters: name - The name of the target attribute. A boolean true if attribute is defined. |
getTargetAttributes | public Attribute[] getTargetAttributes()(Code) | | Get the list of attributes shadowed byt htis shadowing resource.
The attribute list of the shadowed object. |
getTargetResource | public Resource getTargetResource()(Code) | | Get the resource shadowed by this object.
A Resource instance, or null |
getTargetValue | public Object getTargetValue(int idx, Object def)(Code) | | Get a shadowed attribute value.
Parameters: idx - The index of the shadowed attribute. Parameters: def - The default return value (if no shadow value defined). The shadowed attribute value, of the provided default. |
getTargetValue | public Object getTargetValue(String name, Object def)(Code) | | Get a shadowed attribute value (by name).
Parameters: name - The name of the shadowed attribute. Parameters: def - The default return value (if no shadow value defined). The shadowed attribute value, of the provided default. |
setTargetValue | public void setTargetValue(int idx, Object value)(Code) | | Set a shadowed attribute value.
Parameters: idx - The index of the attribute to set. Parameters: value - Its new value. |
setTargetValue | public void setTargetValue(String name, Object def)(Code) | | Set a shadowed attribute value by name.
Parameters: name - The name of the shadowed attribute. Parameters: value - Its new value. |
|
|