| java.lang.Object org.andromda.core.common.Introspector
Introspector | final public class Introspector (Code) | | A simple class providing the ability to manipulate properties on java bean objects.
author: Chad Brandon |
Method Summary | |
public boolean | containsValidProperty(Object object, String name, String value) Indicates whether or not the given object contains a
valid property with the given name and value .
A valid property means the following:
- It exists on the object
- It is not null on the object
- If its a boolean value, then it evaluates to
true
- If value is not null, then the property matches the given .value
All other possibilities return false
Parameters: object - the object to test for the valid property. Parameters: name - the name of the propery for which to test. Parameters: value - the value to evaluate against. | final public Object | getProperty(Object object, String name) Attempts to retrieve the property with the given name on the object . | public static Introspector | instance() Gets the shared instance. | public boolean | isReadable(Object object, String name) Indicates if the object has a property that
is readable with the given name . | public boolean | isWritable(Object object, String name) Indicates if the object has a property that
is writable with the given name . | public void | setProperty(Object object, String name, Object value) Sets the property having the given name on the object
with the given value . | public void | shutdown() Shuts this instance down and reclaims
any resouces used by this instance. |
containsValidProperty | public boolean containsValidProperty(Object object, String name, String value)(Code) | | Indicates whether or not the given object contains a
valid property with the given name and value .
A valid property means the following:
- It exists on the object
- It is not null on the object
- If its a boolean value, then it evaluates to
true
- If value is not null, then the property matches the given .value
All other possibilities return false
Parameters: object - the object to test for the valid property. Parameters: name - the name of the propery for which to test. Parameters: value - the value to evaluate against. true/false |
getProperty | final public Object getProperty(Object object, String name)(Code) | | Attempts to retrieve the property with the given name on the object .
Parameters: object - the object to which the property belongs. Parameters: name - the name of the property the value of the property. |
instance | public static Introspector instance()(Code) | | Gets the shared instance.
the shared introspector instance. |
isReadable | public boolean isReadable(Object object, String name)(Code) | | Indicates if the object has a property that
is readable with the given name .
Parameters: object - the object to check. Parameters: name - the property to check for. |
isWritable | public boolean isWritable(Object object, String name)(Code) | | Indicates if the object has a property that
is writable with the given name .
Parameters: object - the object to check. Parameters: name - the property to check for. |
setProperty | public void setProperty(Object object, String name, Object value)(Code) | | Sets the property having the given name on the object
with the given value .
Parameters: object - the object on which to set the property. Parameters: name - the name of the property to populate. Parameters: value - the value to give the property. |
shutdown | public void shutdown()(Code) | | Shuts this instance down and reclaims
any resouces used by this instance.
|
|
|