|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.ws.message.PropertySet
public abstract class PropertySet
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 |
PropertySet.Accessor
Represents a typed property defined on a PropertySet. |
static interface |
PropertySet.Property
Marks a field on PropertySet as a
property of MessageContext. |
protected static class |
PropertySet.PropertyMap
Represents the list of strongly-typed known properties (keyed by property names.) |
| Constructor Summary | |
|---|---|
protected |
PropertySet()
Creates a new instance of TypedMap. |
| Method Summary | |
|---|---|
boolean |
containsKey(Object key)
|
Map<String,Object> |
createMapView()
Creates a Map view of this PropertySet. |
Object |
get(Object key)
Gets the name of the property. |
protected abstract PropertySet.PropertyMap |
getPropertyMap()
Map representing the Fields and Methods annotated with PropertySet.Property. |
protected static PropertySet.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 PropertySet()
| Method Detail |
|---|
protected abstract PropertySet.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 PropertySet.PropertyMap parse(Class clazz)
PropertySet.Property.
public final boolean containsKey(Object key)
public Object get(Object key)
key - This field is typed as Object to follow the Map.get(Object)
convention, but if anything but String is passed, this method
just returns null.
public Object put(String key,
Object value)
com.sun.xml.ws.util.ReadOnlyPropertyException - if the given key is an alias of a strongly-typed field,
and if the name object given is not assignable to the field.PropertySet.Propertypublic boolean supports(Object key)
PropertySet supports a property of the given name.
public Object remove(Object key)
public final Map<String,Object> createMapView()
Map 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||