|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oracle.webservices.api.message.BasePropertySet
public abstract class BasePropertySet
A set of "properties" that can be accessed via strongly-typed fields as well as reflexibly through the property name.
| Nested Class Summary | |
|---|---|
protected static interface |
BasePropertySet.Accessor
Represents a typed property defined on a PropertySet. |
protected static class |
BasePropertySet.PropertyMap
Represents the list of strongly-typed known properties (keyed by property names.) |
static class |
BasePropertySet.PropertyMapEntry
PropertyMapEntry represents a Map.Entry in the PropertyMap with more efficient access. |
| Nested classes/interfaces inherited from interface com.oracle.webservices.api.message.PropertySet |
|---|
PropertySet.Property |
| Constructor Summary | |
|---|---|
protected |
BasePropertySet()
Creates a new instance of TypedMap. |
| Method Summary | |
|---|---|
Map<String,Object> |
asMap()
Creates a modifiable BasePropertySet.PropertyMap view of this PropertySet. |
boolean |
containsKey(Object key)
|
protected void |
createEntrySet(Set<Map.Entry<String,Object>> core)
|
Map<String,Object> |
createMapView()
Deprecated. use newer implementation PropertySet.asMap() which produces
readwrite BasePropertySet.PropertyMap |
protected Map<String,Object> |
createView()
|
Object |
get(Object key)
Gets the name of the property. |
protected abstract BasePropertySet.PropertyMap |
getPropertyMap()
Map representing the Fields and Methods annotated with PropertySet.Property. |
protected boolean |
mapAllowsAdditionalProperties()
Used when constructing the MapView for this object - it controls if the MapView servers only to
access strongly typed values or allows also different values |
protected static BasePropertySet.PropertyMap |
parse(Class clazz)
This method parses a class for fields and methods with PropertySet.Property. |
Object |
put(String key,
Object value)
Sets a property. |
Object |
remove(Object key)
|
boolean |
supports(Object key)
Checks if this PropertySet supports a property of the given name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected BasePropertySet()
| Method Detail |
|---|
protected abstract BasePropertySet.PropertyMap getPropertyMap()
PropertySet.Property.
Model of PropertySet class.
At the end of the derivation chain this method just needs to be implemented as:
private static final PropertyMap model;
static {
model = parse(MyDerivedClass.class);
}
protected PropertyMap getPropertyMap() {
return model;
}
protected static BasePropertySet.PropertyMap parse(Class clazz)
PropertySet.Property.
public boolean containsKey(Object key)
containsKey in interface PropertySetpublic Object get(Object key)
get in interface PropertySetkey - This field is typed as Object to follow the HashMap.get(Object)
convention, but if anything but String is passed, this method
just returns null.
public Object put(String key,
Object value)
put in interface PropertySetReadOnlyPropertyException - if the given key is an alias of a strongly-typed field,
and if the name object given is not assignable to the field.Propertypublic boolean supports(Object key)
PropertySet supports a property of the given name.
supports in interface PropertySetpublic Object remove(Object key)
remove in interface PropertySet@Deprecated public final Map<String,Object> createMapView()
PropertySet.asMap() which produces
readwrite BasePropertySet.PropertyMap
BasePropertySet.PropertyMap view of this PropertySet.
This map is partially live, in the sense that values you set to it
will be reflected to PropertySet.
However, this map may not pick up changes made
to PropertySet after the view is created.
createMapView in interface PropertySetpublic Map<String,Object> asMap()
BasePropertySet.PropertyMap view of this PropertySet.
Changes done on this BasePropertySet.PropertyMap or on PropertySet object work in both directions - values made to
BasePropertySet.PropertyMap are reflected to PropertySet and changes done using getters/setters on PropertySet
object are automatically reflected in this BasePropertySet.PropertyMap.
If necessary, it also can hold other values (not present on PropertySet) -
PropertySet#mapAllowsAdditionalProperties
asMap in interface PropertySetprotected Map<String,Object> createView()
protected boolean mapAllowsAdditionalProperties()
MapView for this object - it controls if the MapView servers only to
access strongly typed values or allows also different values
BasePropertySet.PropertyMap should allow also properties not defined as strongly typed fieldsprotected void createEntrySet(Set<Map.Entry<String,Object>> core)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||