|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.vub.at.objects.natives.NATNil
edu.vub.at.objects.natives.NATByRef
edu.vub.at.objects.mirrors.NativeField
Native Fields are represented in our reflective implementation as a pair of accessor and mutator methods in the class of the native AmbientTalk object. For instance, a native AmbientTalk object of class C has a field 'f' if the class C implements a method 'getF()'. If the class also implements 'setF(v)' the field is assignable.
Field Summary | |
private java.lang.reflect.Method |
accessor_
The native Java accessor method to be called when accessing the field |
private ATObject |
host_
The AmbientTalk native object to which this field belongs |
private java.lang.reflect.Method |
mutator_
The native Java mutator method to be called when assigning to the field. |
private ATSymbol |
name_
The AmbientTalk name of the field |
Fields inherited from class edu.vub.at.objects.natives.NATNil |
_INSTANCE_ |
Constructor Summary | |
NativeField(ATObject host,
ATSymbol name,
java.lang.reflect.Method accessor,
java.lang.reflect.Method mutator)
|
Method Summary | |
ATField |
base_asField()
|
ATSymbol |
base_getName()
|
ATObject |
base_readField()
|
ATNil |
base_writeField(ATObject newValue)
Sets the value of the field if possible |
boolean |
isNativeField()
|
ATTable |
meta_getStripes()
Returns the stripes of this object. |
ATObject |
meta_newInstance(ATTable initargs)
Fields can be re-initialized when installed in an object that is being cloned. |
NATText |
meta_print()
Prints out the object in a human-readable way. |
Methods inherited from class edu.vub.at.objects.natives.NATByRef |
meta_pass, meta_resolve |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.vub.at.objects.ATObject |
base__opeql__opeql_, base_init, base_new, meta_addField, meta_addMethod, meta_assignField, meta_assignVariable, meta_clone, meta_defineField, meta_doesNotUnderstand, meta_eval, meta_extend, meta_getDynamicParent, meta_getLexicalParent, meta_grabField, meta_grabMethod, meta_invoke, meta_isCloneOf, meta_isRelatedTo, meta_isStripedWith, meta_listFields, meta_listMethods, meta_lookup, meta_pass, meta_quote, meta_receive, meta_resolve, meta_respondsTo, meta_select, meta_send, meta_share |
Field Detail |
private final ATSymbol name_
private ATObject host_
private final java.lang.reflect.Method accessor_
private final java.lang.reflect.Method mutator_
Constructor Detail |
public NativeField(ATObject host, ATSymbol name, java.lang.reflect.Method accessor, java.lang.reflect.Method mutator)
Method Detail |
public ATSymbol base_getName()
base_getName
in interface ATField
public ATObject base_readField() throws InterpreterException
base_readField
in interface ATField
InterpreterException
public ATNil base_writeField(ATObject newValue) throws InterpreterException
ATField
base_writeField
in interface ATField
newValue
- - the value the field should hold.
InterpreterException
- - if the field cannot be modified.public ATObject meta_newInstance(ATTable initargs) throws InterpreterException
meta_newInstance
in interface ATObject
meta_newInstance
in class NATNil
InterpreterException
public NATText meta_print() throws InterpreterException
ATObject
meta_print
in interface ATObject
meta_print
in class NATNil
InterpreterException
public ATTable meta_getStripes() throws InterpreterException
ATObject
meta_getStripes
in interface ATObject
meta_getStripes
in class NATNil
InterpreterException
public boolean isNativeField()
isNativeField
in interface ATConversions
isNativeField
in class NATNil
public ATField base_asField()
base_asField
in interface ATConversions
base_asField
in class NATNil
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |