|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspark.data.SObj
spark.data.SOReflect
public class SOReflect
This is a concrete implementation of SO that has special properties. Subclasses of SOReflect can be used to expose various fields of the subclass as attributes visible to SO. It also accepts fields that are not known to the subclass and stores them as well.
Any public field that is Double, Long, Boolean, String, SO or SA will be exposes as an SO attribute.
Any pair of getXX()/setXX(v) methods will be treated as the attribute XX.
The idea is to create a subclass of SOReflect and give it public fields or get/set methods to define a set of attributes.
| Constructor Summary | |
|---|---|
SOReflect()
|
|
| Method Summary | |
|---|---|
java.lang.String[] |
attributes()
This will retrieve the names of all of the attributes that are available for this object. |
SV |
get(java.lang.String name)
This will return the value of the named attribute. |
java.lang.String |
myClass()
This returns the name of the class that implements this object. |
void |
set(java.lang.String name,
SV val)
This will set the value of the named attribute. |
void |
setNull(java.lang.String name)
|
| Methods inherited from class spark.data.SObj |
|---|
getArray, getDouble, getLong, getObj, getString, isTrue, myParent, newParent, set, set, set, set, set, set, unParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SOReflect()
| Method Detail |
|---|
public java.lang.String myClass()
SO
myClass in interface SOmyClass in class SObjpublic SV get(java.lang.String name)
SO
get in interface SOget in class SObjname - the name of the attribute value to be returned.
public void setNull(java.lang.String name)
setNull in interface SOsetNull in class SObj
public void set(java.lang.String name,
SV val)
SO
set in interface SOset in class SObjname - the name of the attribute to be set.val - the new value for the attribute.public java.lang.String[] attributes()
SO
attributes in interface SOattributes in class SObj
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||