|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by objects which want to override the method and field access which uses Java introspection by default.
An executable object is considered by the interpreter to consists of properties and methods. The interface defines 3 major functions:
getValue
: gets a value from the object
setValue
: sets a value in the object
method
: calls a method on the object
Method Summary | |
java.lang.Object |
getValue(java.lang.String field_name,
java.lang.String attrib_name)
Called to get the value of a field |
java.lang.Object |
getValueAt(java.lang.Object array_index,
java.lang.String attrib_name)
Called to get the value of an object in this collection |
java.lang.Object |
method(java.lang.String method_name,
java.lang.Object[] arguments)
Called if a Simkin script calls a method on this object. |
void |
setValue(java.lang.String field_name,
java.lang.String attrib_name,
java.lang.Object value)
Called to set the value of a field. |
void |
setValueAt(java.lang.Object array_index,
java.lang.String attrib_name,
java.lang.Object value)
Called to set an object into this collection. |
Method Detail |
public void setValue(java.lang.String field_name, java.lang.String attrib_name, java.lang.Object value) throws java.lang.RuntimeException, java.lang.NoSuchFieldException
field_name
- the name of the fieldattrib_name
- the name of the attribute to be set (can be null)value
- the value to be setjava.lang.RuntimeException
- - if there was a problem running the script (such as not having permission to access a field)java.lang.NoSuchFieldException
- - if the field could not be foundpublic void setValueAt(java.lang.Object array_index, java.lang.String attrib_name, java.lang.Object value) throws java.lang.RuntimeException
array_index
- an object whose value indicates the index of the item in the collectionattrib_name
- the name of the attribute to be set (can be null)value
- the value to be setjava.lang.RuntimeException
- - if there was a problem running the scriptpublic java.lang.Object getValue(java.lang.String field_name, java.lang.String attrib_name) throws java.lang.RuntimeException, java.lang.NoSuchFieldException
field_name
- the name of the fieldattrib_name
- attribute name (null if no attribute specified)java.lang.RuntimeException
- - if there was a problem running the script (such as not having permission to access a field)java.lang.NoSuchFieldException
- - if the field could not be foundpublic java.lang.Object getValueAt(java.lang.Object array_index, java.lang.String attrib_name) throws java.lang.RuntimeException
array_index
- an object whose value indicates the index of the item in the collectionattrib_name
- attribute name (null if no attribute specified)java.lang.RuntimeException
- - if there was a problem running the scriptjava.lang.NoSuchFieldException
- - if the field could not be foundpublic java.lang.Object method(java.lang.String method_name, java.lang.Object[] arguments) throws ParseException, java.lang.RuntimeException, java.lang.NoSuchMethodException
method_name
- the name of the methodarguments
- an array of arguments passed to the methodjava.lang.RuntimeException
- - if there was a problem running the script (such as divide by zero)java.lang.NoSuchMethodException
- - if the method could not be found
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |