DynaClass which implements the MutableDynaClass interface.
A MutableDynaClass is a specialized extension to DynaClass
that allows properties to be added or removed dynamically.
This implementation has one slightly unusual default behaviour - calling
the getDynaProperty(name) method for a property which doesn't
exist returns a DynaProperty rather than null. The
reason for this is that BeanUtils calls this method to check if
a property exists before trying to set the value. This would defeat the object
of the LazyDynaBean which automatically adds missing properties
when any of its set() methods are called. For this reason the
isDynaProperty(name) method has been added to this implementation
in order to determine if a property actually exists. If the more normal
behaviour of returning null is required, then this can be achieved
by calling the setReturnNull(true).
The add(name, type, readable, writable) method is not implemented
and always throws an UnsupportedOperationException. I believe
this attributes need to be added to the DynaProperty class
in order to control read/write facilities.
DynaClass which implements the
MutableDynaClassinterface.A
MutableDynaClassis a specialized extension toDynaClassthat allows properties to be added or removed dynamically.This implementation has one slightly unusual default behaviour - calling the
getDynaProperty(name)method for a property which doesn't exist returns aDynaPropertyrather thannull. The reason for this is thatBeanUtilscalls this method to check if a property exists before trying to set the value. This would defeat the object of theLazyDynaBeanwhich automatically adds missing properties when any of itsset()methods are called. For this reason theisDynaProperty(name)method has been added to this implementation in order to determine if a property actually exists. If the more normal behaviour of returningnullis required, then this can be achieved by calling thesetReturnNull(true).The
add(name, type, readable, writable)method is not implemented and always throws anUnsupportedOperationException. I believe this attributes need to be added to theDynaPropertyclass in order to control read/write facilities.