|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Property implements the
interface and defines behavior for a property of a Java class.
These properties have modifiers, types, and names, as well
as a value.
Binding
| Field Summary | |
static int |
ACCESS_PRIVATE
Access Modifier: private |
static int |
ACCESS_PROTECTED
Access Modifier: private |
static int |
ACCESS_PUBLIC
Access Modifier: public |
static int |
MUTABILITY_FINAL
Mutability Modifier: final |
static int |
MUTABILITY_SYNCHRONIZED
Mutability Modifier: synchronized |
static int |
MUTABILITY_TRANSIENT
Mutability Modifier: transient |
static int |
MUTABILITY_VOLATILE
Mutability Modifier: volatile |
static int |
STORAGE_STATIC
Storage Modifier: static |
| Method Summary | |
java.lang.Object |
getDefaultValue()
This will retrieve the default value associated with this property, or null if there is not one. |
java.util.Vector |
getEnumeration()
This returns the Vector of allowed values for this
Property, or null if there is none. |
java.util.BitSet |
getModifier()
This will return the modifier for a property.The value returned will be in the form of a BitSet,
in which the set bits correspond to the constants defined
(,
,
,
,
,
or
). |
java.lang.String |
getModifierString()
This will return the Java String representation
of this Property's modifier. |
boolean |
hasDefaultValue()
This indicates whether or not this Property has a
a default value set. |
boolean |
hasEnumeration()
This will indicate if this Property has a set of
allowed values (an enumeration) specified for it. |
boolean |
isCollection()
This will indicate whether this Property represents
a Collection of values (resulting in a true
result from this method), or a singular value (resulting in a
false result). |
void |
setDefaultValue(java.lang.Object defaultValue)
This will set the default value of the property. |
void |
setEnumeration(java.util.Vector enumeration)
This will set a list (enumeration) of allowed values for this Property. |
void |
setIsCollection(boolean isCollection)
This will whether or not this Property
is a Collection (in other words, the property
represents a collection of values). |
void |
setModifier(java.util.BitSet modifier)
This will set the modifier for a property. |
| Methods inherited from interface org.enhydra.zeus.Binding |
getJavaName,
getJavaType,
getXMLName,
setJavaType,
setXMLName |
| Field Detail |
public static final int ACCESS_PRIVATE
privatepublic static final int ACCESS_PROTECTED
privatepublic static final int ACCESS_PUBLIC
publicpublic static final int STORAGE_STATIC
staticpublic static final int MUTABILITY_VOLATILE
volatilepublic static final int MUTABILITY_FINAL
finalpublic static final int MUTABILITY_SYNCHRONIZED
synchronizedpublic static final int MUTABILITY_TRANSIENT
transient| Method Detail |
public void setModifier(java.util.BitSet modifier)
This will set the modifier for a property. The
value submitted must be in the form of a BitSet,
in which the set bits correspond to the constants defined
(,
ACCESS_PRIVATE,
ACCESS_PROTECTED,
ACCESS_PUBLIC,
STORAGE_STATIC,
MUTABILITY_VOLATILE or
MUTABILITY_FINAL). By default,
all properties will be MUTABILITY_SYNCHRONIZEDprivate
(ACCESS_PRIVATE).
modifier - int constant for access level.ACCESS_PRIVATE,
ACCESS_PROTECTED,
ACCESS_PUBLIC,
STORAGE_STATIC,
MUTABILITY_VOLATILE,
MUTABILITY_FINAL,
MUTABILITY_SYNCHRONIZEDpublic java.util.BitSet getModifier()
This will return the modifier for a property.The
value returned will be in the form of a BitSet,
in which the set bits correspond to the constants defined
(,
ACCESS_PRIVATE,
ACCESS_PROTECTED,
ACCESS_PUBLIC,
STORAGE_STATIC,
MUTABILITY_VOLATILE or
MUTABILITY_FINAL). By default,
all properties will be MUTABILITY_SYNCHRONIZEDprivate
(ACCESS_PRIVATE).
modifier - int constant for access level.ACCESS_PRIVATE,
ACCESS_PROTECTED,
ACCESS_PUBLIC,
STORAGE_STATIC,
MUTABILITY_VOLATILE,
MUTABILITY_FINAL,
MUTABILITY_SYNCHRONIZEDpublic java.lang.String getModifierString()
This will return the Java String representation
of this Property's modifier. For
example, would be
converted to "private".
ACCESS_PRIVATE
modifier - int constant for access level.ACCESS_PRIVATE,
ACCESS_PROTECTED,
ACCESS_PUBLIC,
STORAGE_STATIC,
MUTABILITY_VOLATILE,
MUTABILITY_FINAL,
MUTABILITY_SYNCHRONIZEDpublic void setIsCollection(boolean isCollection)
This will whether or not this Property
is a Collection (in other words, the property
represents a collection of values). By default, properties
are all singular values.
isCollection - true is multiple values can be stored,
or else false.public boolean isCollection()
This will indicate whether this Property represents
a Collection of values (resulting in a true
result from this method), or a singular value (resulting in a
false result).
boolean - whether or not this Property
represents a Collection.public boolean hasDefaultValue()
This indicates whether or not this Property has a
a default value set.
boolean - whether there is a default value set.public void setDefaultValue(java.lang.Object defaultValue)
This will set the default value of the property. Since no typing
is available at this point, a simple Java Object
is allowed as the type supplied. As a result, any errors in
mismatches between object type and allowed paramater type will
occur at runtime, when class generation takes place. Supplying
a value here essentially results in:
public class Foo {
private String myString = "some default value";
public String getMyString() {
return myString;
}
public void setMyString(String myString) {
this.myString = myString;
}
// Other methods and properties
}
Also, note that data binding users who supply their own class implementations will LOSE THIS DEFAULT VALUE, as the interface alone cannot specify a default value. So use this carefully!
defaultValue - Object to be used as default value.public java.lang.Object getDefaultValue()
This will retrieve the default value associated with this property,
or null if there is not one. For more information on
default property values, see .
setDefaultValue(Object)
Object - default value of the property.public boolean hasEnumeration()
This will indicate if this Property has a set of
allowed values (an enumeration) specified for it.
boolean - whether an enumeration is specified.public void setEnumeration(java.util.Vector enumeration)
This will set a list (enumeration) of allowed values for this
Property.
enumeration - the Vector of allowed values.public java.util.Vector getEnumeration()
This returns the Vector of allowed values for this
Property, or null if there is none.
Vector - the allowed values.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||