Inheritance diagram for burst.reflect.PropertyDef:
There is a subclass for each property type (boolean, etc.). There is an instance for each property name.
Public Member Functions | |
PropertyDef (Object values) | |
Initialize a PropertyDef instance. | |
Object | parse (String str, Object dflt) |
If the input str is null or all white, then a default is returned: if dflt is not undefined, it is returned (this includes dflt being null) if the property has a defined defaultValue, it is returned otherwise undefined is returned. | |
abstract Object | parseImpl (String str) |
Abstract method which must be implemented by a subclass. | |
abstract String | valueType () |
The name of the type of the values returned by the parse method. | |
abstract String | propertyType () |
the name of the burst.reflect.PropertyDef subclass | |
Boolean | setDefault (Object obj) |
If the object has no member variable by this name, and this burst.reflect.PropertyDef has a defaultValue, set it in the object and return true. | |
void | checkMandatory (Object obj, Function handler) |
If this property is not mandatory, do nothing. | |
Static Public Member Functions | |
void | setDefaultEach (Object obj, Array propdefs) |
A class method to call setDefault for each instance in an Array of burst.reflect.PropertyDef. | |
void | checkMandatoryEach (Object obj, Array propdefs, Function handler) |
A class method to call checkMandatory for each instance in an Array of burst.reflect.PropertyDef. |
|
Initialize a PropertyDef instance. The single constructor argument is an associative array with these keys:
|
|
If this property is not mandatory, do nothing. If the object has a defined value for the property, do nothing. Otherwise, if handler is specified, call it with (propdef, obj) Otherwise throw burst.props.PropertyError complaining about the missing value.
|
|
If the input str is null or all white, then a default is returned: if dflt is not undefined, it is returned (this includes dflt being null) if the property has a defined defaultValue, it is returned otherwise undefined is returned.
|
|
Abstract method which must be implemented by a subclass. The passed in String str will never be null or all white. |
|
If the object has no member variable by this name, and this burst.reflect.PropertyDef has a defaultValue, set it in the object and return true. If either the object is already set, or this burst.reflect.PropertyDef has no defaultValue, return false.
|