| org.apache.commons.beanutils.MutableDynaClass
All known Subclasses: org.apache.commons.beanutils.LazyDynaClass, org.apache.commons.beanutils.LazyDynaMap,
MutableDynaClass | public interface MutableDynaClass extends DynaClass(Code) | | A specialized extension to DynaClass that allows properties
to be added or removed dynamically.
WARNING - No guarantees that this will be in the final
APIs ... it's here primarily to preserve some concepts that were in the
original proposal for further discussion.
author: Craig McClanahan author: Michael Smith author: Paulo Gaspar version: $Revision: 555824 $ $Date: 2007-07-13 01:27:15 +0100 (Fri, 13 Jul 2007) $ |
Method Summary | |
public void | add(String name) Add a new dynamic property with no restrictions on data type,
readability, or writeability. | public void | add(String name, Class type) Add a new dynamic property with the specified data type, but with
no restrictions on readability or writeability. | public void | add(String name, Class type, boolean readable, boolean writeable) Add a new dynamic property with the specified data type, readability,
and writeability. | public boolean | isRestricted() Is this DynaClass currently restricted, if so, no changes to the
existing registration of property names, data types, readability, or
writeability are allowed. | public void | remove(String name) Remove the specified dynamic property, and any associated data type,
readability, and writeability, from this dynamic class. | public void | setRestricted(boolean restricted) Set the restricted state of this DynaClass to the specified value. |
add | public void add(String name)(Code) | | Add a new dynamic property with no restrictions on data type,
readability, or writeability.
Parameters: name - Name of the new dynamic property exception: IllegalArgumentException - if name is null exception: IllegalStateException - if this DynaClass is currentlyrestricted, so no new properties can be added |
add | public void add(String name, Class type)(Code) | | Add a new dynamic property with the specified data type, but with
no restrictions on readability or writeability.
Parameters: name - Name of the new dynamic property Parameters: type - Data type of the new dynamic property (null for norestrictions) exception: IllegalArgumentException - if name is null exception: IllegalStateException - if this DynaClass is currentlyrestricted, so no new properties can be added |
add | public void add(String name, Class type, boolean readable, boolean writeable)(Code) | | Add a new dynamic property with the specified data type, readability,
and writeability.
Parameters: name - Name of the new dynamic property Parameters: type - Data type of the new dynamic property (null for norestrictions) Parameters: readable - Set to true if this property valueshould be readable Parameters: writeable - Set to true if this property valueshould be writeable exception: IllegalArgumentException - if name is null exception: IllegalStateException - if this DynaClass is currentlyrestricted, so no new properties can be added |
isRestricted | public boolean isRestricted()(Code) | | Is this DynaClass currently restricted, if so, no changes to the
existing registration of property names, data types, readability, or
writeability are allowed.
true if this Mutable DynaClass is restricted,otherwise false |
remove | public void remove(String name)(Code) | | Remove the specified dynamic property, and any associated data type,
readability, and writeability, from this dynamic class.
NOTE - This does NOT cause any
corresponding property values to be removed from DynaBean instances
associated with this DynaClass.
Parameters: name - Name of the dynamic property to remove exception: IllegalArgumentException - if name is null exception: IllegalStateException - if this DynaClass is currentlyrestricted, so no properties can be removed |
setRestricted | public void setRestricted(boolean restricted)(Code) | | Set the restricted state of this DynaClass to the specified value.
Parameters: restricted - The new restricted state |
|
|