|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.navel.beans.PropertyValues
public class PropertyValues
The storage class that supports the data bucket behavior for all simple properties of a JavaBean. Expose an interface that allows for programmatic manipulation of the bean contents, safely. That is putting new values by property names are checked to ensure the do not violate the properties the bean exposes through its compile time interfaces.
Method Summary | |
---|---|
void |
clear()
Clears all of the internal storage entries. |
boolean |
containsKey(java.lang.String dotExpression)
Figure out if the supplied expression refers to a valid entry in the underlying storage. |
java.util.Map<java.lang.String,java.lang.Object> |
copyValues(boolean flatten)
Return a copy of the internal values, generally safe to manipulate. |
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
get(java.lang.String dotExpression)
Evaluates the supplied expression and returns the corresponding value, if there is one. |
ProxyDescriptor |
getProxyDescriptor()
|
int |
hashCode()
|
boolean |
isImmutable()
|
void |
put(java.lang.String dotExpression,
java.lang.Object value)
Checks that the supplied expression is valid for the JavaBean's compile time property set, that the type matches or can be coerced, and adds the supplied value to internal storage. |
void |
putAll(java.util.Map<java.lang.String,java.lang.Object> newValues)
Forwards to the internal map, after resolving nested and list properties and validating the new map. |
java.lang.Object |
remove(java.lang.String dotExpression)
Evaluates the supplied expression and removes the corresponding value, if there is one. |
static void |
resetToStringTemplate()
Restore the default format template for toString() . |
java.lang.Object |
resolve(java.lang.String dotExpression)
|
java.util.Map<java.lang.String,java.lang.Object> |
resolveDelegates(boolean flatten)
Interrogate the registered PropertyDelegate instances and invoke
their PropertyDelegate.get(PropertyValues, String) method to
generate a Map of synthetic values. |
static void |
setToStringTemplate(java.lang.String toStringTemplate)
Allows callers to specify their own template for use with String.format(String, Object...) which excepts one argument. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static void setToStringTemplate(java.lang.String toStringTemplate)
String.format(String, Object...)
which excepts one argument.
Map.toString()
result
toStringTemplate
- Custom format template.public static void resetToStringTemplate()
toString()
.
public ProxyDescriptor getProxyDescriptor()
public java.util.Map<java.lang.String,java.lang.Object> copyValues(boolean flatten)
flatten
- If true, the nested beans will be flattened, calculating new
keys in the flat return map that are valid dot-notation
expressions representing where the original values where in
the normalized storage graph.
public java.util.Map<java.lang.String,java.lang.Object> resolveDelegates(boolean flatten)
PropertyDelegate
instances and invoke
their PropertyDelegate.get(PropertyValues, String)
method to
generate a Map
of synthetic values.
flatten
- Whether the delegates on any nested proxies should also be
resolved and flattened into the output Map
.
Map
of just the returns of
PropertyDelegate.get(PropertyValues, String)
keyed by the
properties to which the respective delegates are registered.public void put(java.lang.String dotExpression, java.lang.Object value)
dotExpression
- A property in the set of properties introspected when the
associated Proxy and JavaBeanHandler were created by the
ProxyFactory.value
- Checked for type safety against the appropriate property.public void putAll(java.util.Map<java.lang.String,java.lang.Object> newValues)
public java.lang.Object get(java.lang.String dotExpression)
dotExpression
- Property names chained with the dot (.) character, may also
use the bracket characters ([]) with an index value to
de-reference lists and arrays.
InvalidExpressionException
- If the dot expression doesn't parse with the given bean
interfaces.public java.lang.Object resolve(java.lang.String dotExpression)
public boolean containsKey(java.lang.String dotExpression)
dotExpression
- Property names chained with the dot (.) character, may also
use the bracket characters ([]) with an index value to
de-reference lists and arrays.
InvalidExpressionException
- If the dot expression doesn't parse with the given bean
interfaces.public java.lang.Object remove(java.lang.String dotExpression)
dotExpression
- Property names chained with the dot (.) character, may also
use the bracket characters ([]) with an index value to
de-reference lists and arrays.
InvalidExpressionException
- If the dot expression doesn't parse with the given bean
interfaces.public void clear()
public boolean isImmutable()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |