|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.vub.at.objects.natives.NATNil
NATNil implements default semantics for all test and conversion methods.
Field Summary | |
static NATNil |
_INSTANCE_
|
Constructor Summary | |
protected |
NATNil()
|
Method Summary | |
NATObject |
asAmbientTalkObject()
|
JavaClass |
asJavaClassUnderSymbiosis()
|
JavaObject |
asJavaObjectUnderSymbiosis()
|
NATBoolean |
asNativeBoolean()
|
NATException |
asNativeException()
|
NATFarReference |
asNativeFarReference()
|
NATFraction |
asNativeFraction()
|
NATNumber |
asNativeNumber()
|
NATNumeric |
asNativeNumeric()
|
NATTable |
asNativeTable()
|
NATText |
asNativeText()
|
ATBoolean |
base__opeql__opeql_(ATObject comparand)
The pointer equality == operator. |
ATActorMirror |
base_asActorMirror()
|
ATAsyncMessage |
base_asAsyncMessage()
|
ATBegin |
base_asBegin()
|
ATBoolean |
base_asBoolean()
|
ATClosure |
base_asClosure()
|
ATDefinition |
base_asDefinition()
|
ATExpression |
base_asExpression()
|
ATFarReference |
base_asFarReference()
|
ATField |
base_asField()
|
ATHandler |
base_asHandler()
|
ATMessage |
base_asMessage()
|
ATMessageCreation |
base_asMessageCreation()
|
ATMethod |
base_asMethod()
|
ATMirror |
base_asMirror()
|
ATNumber |
base_asNumber()
|
ATSplice |
base_asSplice()
|
ATStatement |
base_asStatement()
|
ATStripe |
base_asStripe()
|
ATSymbol |
base_asSymbol()
|
ATTable |
base_asTable()
|
ATUnquoteSplice |
base_asUnquoteSplice()
|
ATAssignVariable |
base_asVariableAssignment()
|
ATObject |
base_init(ATObject[] initargs)
The object initialisation method. |
boolean |
base_isBoolean()
|
boolean |
base_isCallFrame()
|
boolean |
base_isClosure()
|
boolean |
base_isFarReference()
|
boolean |
base_isMessageCreation()
|
boolean |
base_isMethod()
|
boolean |
base_isMirror()
|
boolean |
base_isSplice()
|
boolean |
base_isStripe()
|
boolean |
base_isSymbol()
|
boolean |
base_isTable()
|
boolean |
base_isUnquoteSplice()
|
boolean |
base_isVariableAssignment()
|
ATObject |
base_new(ATObject[] initargs)
The object instantiation method. |
protected ATObject |
createChild(ATClosure code,
boolean parentPointerType)
|
boolean |
equals(java.lang.Object other)
By default, two AmbientTalk objects are equal if they are the same object, or one is a proxy for the same object. |
boolean |
isAmbientTalkObject()
|
boolean |
isJavaObjectUnderSymbiosis()
|
boolean |
isNativeBoolean()
|
boolean |
isNativeField()
|
boolean |
isNativeText()
|
ATNil |
meta_addField(ATField field)
Adds a field slot to an object at runtime. |
ATNil |
meta_addMethod(ATMethod method)
Adds a method slot to an object at runtime. |
ATNil |
meta_assignField(ATObject receiver,
ATSymbol name,
ATObject value)
Sets the value of a field to the given value. |
ATNil |
meta_assignVariable(ATSymbol name,
ATObject value)
Normally, a variable assignment cannot be performed on a native AmbientTalk object. |
ATObject |
meta_clone()
Clone the receiver object. |
ATNil |
meta_defineField(ATSymbol name,
ATObject value)
Defines a new field in an object. |
ATObject |
meta_doesNotUnderstand(ATSymbol selector)
By default, when a selection is not understood by a primitive object, an error is raised. |
ATObject |
meta_eval(ATContext ctx)
All NATObjects which are not Abstract Grammar elements are self-evaluating. |
ATObject |
meta_extend(ATClosure code)
Create an is-a extension of the receiver object. |
ATObject |
meta_getDynamicParent()
Only true extending objects have a dynamic pointer, others return nil |
ATObject |
meta_getLexicalParent()
By default numbers, tables and so on do not have lexical parents, |
ATTable |
meta_getStripes()
By default, a native object (and also nil) has no stripes. |
ATField |
meta_grabField(ATSymbol fieldName)
Queries an object for one of its field slots. |
ATMethod |
meta_grabMethod(ATSymbol methodName)
Queries an object for one of its method slots. |
ATObject |
meta_invoke(ATObject receiver,
ATSymbol atSelector,
ATTable arguments)
The default behaviour of 'delegate' for primitive non-object ambienttalk language values is to check whether the requested functionality is provided by a native Java method with the same selector, but prefixed with 'base_'. |
ATBoolean |
meta_isCloneOf(ATObject original)
Detects whether this object an the passed parameter are the result of cloning from a common ancestor (possibly either one of the objects itself). |
ATBoolean |
meta_isRelatedTo(ATObject object)
Detects whether both objects have a common origin, in other words whether they are related through a combination of the cloning and extension operators. |
ATBoolean |
meta_isStripedWith(ATStripe stripe)
Native objects implement the stripe test non-recursively: only the stripes returned by meta_getStripes are tested against. |
ATTable |
meta_listFields()
Queries an object for a list of all of its field slots. |
ATTable |
meta_listMethods()
Queries an object for a list of all of its method slots. |
ATObject |
meta_lookup(ATSymbol selector)
A lookup can only be issued at the base level by writing selector inside the scope of a particular object. |
ATObject |
meta_newInstance(ATTable initargs)
Create a new instance of the receiver object. |
ATObject |
meta_pass()
This method allows objects to decide which object should be serialized in their stead when they are passed as argument in an asynchronous message send that crosses actor boundaries. |
NATText |
meta_print()
Prints out the object in a human-readable way. |
ATObject |
meta_quote(ATContext ctx)
Quoting a native object returns itself, except for pure AG elements. |
ATObject |
meta_receive(ATAsyncMessage message)
Handles a first-class message of which it is the receiver. |
ATObject |
meta_resolve()
After deserialization, ensure that nil remains unique. |
ATBoolean |
meta_respondsTo(ATSymbol atSelector)
An ambienttalk language value can respond to a message if it implements a native Java method corresponding to the selector prefixed by 'base_'. |
ATObject |
meta_select(ATObject receiver,
ATSymbol selector)
It is possible to select a method from any ambienttalk value provided that it offers the method in its provided interface. |
ATObject |
meta_send(ATAsyncMessage message)
Asynchronous messages ( o<-m( args )) sent in the context of an object o (i.e. |
ATObject |
meta_share(ATClosure code)
Create a shares-a extension of the receiver object. |
java.lang.Object |
readResolve()
Delegate the responsibility of deserialization to the AT/2 meta-level |
java.lang.String |
toString()
|
java.lang.Object |
writeReplace()
Delegate the responsibility of serialization to the AT/2 meta-level |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final NATNil _INSTANCE_
Constructor Detail |
protected NATNil()
Method Detail |
public ATObject meta_send(ATAsyncMessage message) throws InterpreterException
meta_send
in interface ATObject
message
- the asynchronous message (by default created using the actor's base_createMessage method)
Triggers the following events on this object's beholders (mirror observers):
- sentMessage when the message was sent by the actor.
InterpreterException
public ATObject meta_receive(ATAsyncMessage message) throws InterpreterException
ATObject
meta_receive
in interface ATObject
message
- the asynchronous message send by some object possibly from another actor
InterpreterException
public ATObject meta_invoke(ATObject receiver, ATSymbol atSelector, ATTable arguments) throws InterpreterException
meta_invoke
in interface ATObject
receiver
- the object to which 'self' is bound during execution of the methodatSelector
- the name of the method to be invokedarguments
- the table of arguments passed to the method
InterpreterException
public ATBoolean meta_respondsTo(ATSymbol atSelector) throws InterpreterException
meta_respondsTo
in interface ATObject
atSelector
- the name of a field or method
InterpreterException
public ATObject meta_doesNotUnderstand(ATSymbol selector) throws InterpreterException
meta_doesNotUnderstand
in interface ATObject
selector
- the selector that could not be found
InterpreterException
public ATObject meta_select(ATObject receiver, ATSymbol selector) throws InterpreterException
meta_select
in interface ATObject
receiver
- the dynamic receiver to which method closures should bind self.selector
- the name of the field or method sought for.
InterpreterException
public ATObject meta_lookup(ATSymbol selector) throws InterpreterException
meta_lookup
in interface ATObject
selector
- the name of the field or method to look up.
InterpreterException
public ATNil meta_defineField(ATSymbol name, ATObject value) throws InterpreterException
ATObject
meta_defineField
in interface ATObject
name
- the name of the new fieldvalue
- the value of the new field
InterpreterException
public ATNil meta_assignVariable(ATSymbol name, ATObject value) throws InterpreterException
meta_assignVariable
in interface ATObject
name
- a symbol representing the name of the variable to assign.value
- the value to assign to the specified slot.
InterpreterException
public ATNil meta_assignField(ATObject receiver, ATSymbol name, ATObject value) throws InterpreterException
ATObject
meta_assignField
in interface ATObject
receiver
- the object which received (and possibly delegated) the requestname
- a symbol representing the field to assign.value
- the value to assign to the specified slot.
InterpreterException
public ATObject meta_clone() throws InterpreterException
ATObject
meta_clone
in interface ATObject
InterpreterException
public ATObject meta_newInstance(ATTable initargs) throws InterpreterException
ATObject
meta_newInstance
in interface ATObject
initargs
- arguments to the 'init' constructor method
InterpreterException
protected ATObject createChild(ATClosure code, boolean parentPointerType) throws InterpreterException
InterpreterException
public ATObject meta_extend(ATClosure code) throws InterpreterException
ATObject
meta_extend
in interface ATObject
InterpreterException
public ATObject meta_share(ATClosure code) throws InterpreterException
ATObject
obj.share { code }
is represented at the meta-level by
mirror(obj).meta_share(code)
Triggers the objectShared event on this object's beholders (mirror observers).
meta_share
in interface ATObject
InterpreterException
public ATNil meta_addField(ATField field) throws InterpreterException
ATObject
meta_addField
in interface ATObject
field
- a mirror on the field to add, consisting of a selector (a symbol) and a value (an object)
InterpreterException
public ATNil meta_addMethod(ATMethod method) throws InterpreterException
ATObject
meta_addMethod
in interface ATObject
method
- a mirror on the method to add. A method consists of a selector, arguments and a body.
InterpreterException
public ATField meta_grabField(ATSymbol fieldName) throws InterpreterException
ATObject
meta_grabField
in interface ATObject
fieldName
- a symbol representing the name of the slot.
InterpreterException
public ATMethod meta_grabMethod(ATSymbol methodName) throws InterpreterException
ATObject
meta_grabMethod
in interface ATObject
methodName
- a symbol representing the name of the slot.
InterpreterException
public ATTable meta_listFields() throws InterpreterException
ATObject
meta_listFields
in interface ATObject
InterpreterException
public ATTable meta_listMethods() throws InterpreterException
ATObject
meta_listMethods
in interface ATObject
InterpreterException
public ATObject meta_eval(ATContext ctx) throws InterpreterException
meta_eval
in interface ATObject
ctx
- - context (object) to lookup bindings in.
InterpreterException
public ATObject meta_quote(ATContext ctx) throws InterpreterException
meta_quote
in interface ATObject
ctx
- - context passed on to be used in subsequent evaluations.
InterpreterException
- upon conversion errors or upon illegal unquoted expressionspublic NATText meta_print() throws InterpreterException
ATObject
meta_print
in interface ATObject
InterpreterException
public ATObject meta_getDynamicParent() throws InterpreterException
meta_getDynamicParent
in interface ATObject
InterpreterException
public ATObject meta_getLexicalParent() throws InterpreterException
meta_getLexicalParent
in interface ATObject
InterpreterException
public boolean base_isClosure() throws InterpreterException
base_isClosure
in interface ATConversions
InterpreterException
public boolean base_isSymbol() throws InterpreterException
base_isSymbol
in interface ATConversions
InterpreterException
public boolean base_isBoolean() throws InterpreterException
base_isBoolean
in interface ATConversions
InterpreterException
public boolean base_isTable() throws InterpreterException
base_isTable
in interface ATConversions
InterpreterException
public boolean base_isCallFrame() throws InterpreterException
base_isCallFrame
in interface ATConversions
InterpreterException
public boolean base_isUnquoteSplice() throws InterpreterException
base_isUnquoteSplice
in interface ATConversions
InterpreterException
public boolean base_isVariableAssignment() throws InterpreterException
base_isVariableAssignment
in interface ATConversions
InterpreterException
public boolean base_isSplice() throws InterpreterException
base_isSplice
in interface ATConversions
InterpreterException
public boolean base_isMethod() throws InterpreterException
base_isMethod
in interface ATConversions
InterpreterException
public boolean base_isMessageCreation() throws InterpreterException
base_isMessageCreation
in interface ATConversions
InterpreterException
public boolean isAmbientTalkObject()
isAmbientTalkObject
in interface ATConversions
public boolean isJavaObjectUnderSymbiosis()
isJavaObjectUnderSymbiosis
in interface ATConversions
public boolean isNativeBoolean()
isNativeBoolean
in interface ATConversions
public boolean isNativeText()
isNativeText
in interface ATConversions
public boolean isNativeField()
isNativeField
in interface ATConversions
public boolean base_isMirror() throws InterpreterException
base_isMirror
in interface ATConversions
InterpreterException
public boolean base_isStripe() throws InterpreterException
base_isStripe
in interface ATConversions
InterpreterException
public ATClosure base_asClosure() throws InterpreterException
base_asClosure
in interface ATConversions
InterpreterException
public ATSymbol base_asSymbol() throws InterpreterException
base_asSymbol
in interface ATConversions
InterpreterException
public ATTable base_asTable() throws InterpreterException
base_asTable
in interface ATConversions
InterpreterException
public ATBoolean base_asBoolean() throws InterpreterException
base_asBoolean
in interface ATConversions
InterpreterException
public ATNumber base_asNumber() throws InterpreterException
base_asNumber
in interface ATConversions
InterpreterException
public ATMessage base_asMessage() throws InterpreterException
base_asMessage
in interface ATConversions
InterpreterException
public ATField base_asField() throws InterpreterException
base_asField
in interface ATConversions
InterpreterException
public ATMethod base_asMethod() throws InterpreterException
base_asMethod
in interface ATConversions
InterpreterException
public ATMirror base_asMirror() throws InterpreterException
base_asMirror
in interface ATConversions
InterpreterException
public ATHandler base_asHandler() throws InterpreterException
base_asHandler
in interface ATConversions
InterpreterException
public ATStripe base_asStripe() throws InterpreterException
base_asStripe
in interface ATConversions
InterpreterException
public boolean base_isFarReference()
base_isFarReference
in interface ATConversions
public ATFarReference base_asFarReference() throws InterpreterException
base_asFarReference
in interface ATConversions
InterpreterException
public ATAsyncMessage base_asAsyncMessage() throws InterpreterException
base_asAsyncMessage
in interface ATConversions
InterpreterException
public ATActorMirror base_asActorMirror() throws InterpreterException
base_asActorMirror
in interface ATConversions
InterpreterException
public ATStatement base_asStatement() throws InterpreterException
base_asStatement
in interface ATConversions
InterpreterException
public ATDefinition base_asDefinition() throws InterpreterException
base_asDefinition
in interface ATConversions
InterpreterException
public ATExpression base_asExpression() throws InterpreterException
base_asExpression
in interface ATConversions
InterpreterException
public ATBegin base_asBegin() throws InterpreterException
base_asBegin
in interface ATConversions
InterpreterException
public ATMessageCreation base_asMessageCreation() throws InterpreterException
base_asMessageCreation
in interface ATConversions
InterpreterException
public ATUnquoteSplice base_asUnquoteSplice() throws InterpreterException
base_asUnquoteSplice
in interface ATConversions
InterpreterException
public ATAssignVariable base_asVariableAssignment() throws InterpreterException
base_asVariableAssignment
in interface ATConversions
InterpreterException
public ATSplice base_asSplice() throws InterpreterException
base_asSplice
in interface ATConversions
InterpreterException
public NATObject asAmbientTalkObject() throws XTypeMismatch
asAmbientTalkObject
in interface ATConversions
XTypeMismatch
public NATNumber asNativeNumber() throws XTypeMismatch
asNativeNumber
in interface ATConversions
XTypeMismatch
public NATFraction asNativeFraction() throws XTypeMismatch
asNativeFraction
in interface ATConversions
XTypeMismatch
public NATText asNativeText() throws XTypeMismatch
asNativeText
in interface ATConversions
XTypeMismatch
public NATTable asNativeTable() throws XTypeMismatch
asNativeTable
in interface ATConversions
XTypeMismatch
public NATBoolean asNativeBoolean() throws XTypeMismatch
asNativeBoolean
in interface ATConversions
XTypeMismatch
public NATNumeric asNativeNumeric() throws XTypeMismatch
asNativeNumeric
in interface ATConversions
XTypeMismatch
public NATFarReference asNativeFarReference() throws XTypeMismatch
asNativeFarReference
in interface ATConversions
XTypeMismatch
public JavaObject asJavaObjectUnderSymbiosis() throws XTypeMismatch
asJavaObjectUnderSymbiosis
in interface ATConversions
XTypeMismatch
public JavaClass asJavaClassUnderSymbiosis() throws XTypeMismatch
asJavaClassUnderSymbiosis
in interface ATConversions
XTypeMismatch
public NATException asNativeException() throws XTypeMismatch
asNativeException
in interface ATConversions
XTypeMismatch
public java.lang.String toString()
public ATBoolean base__opeql__opeql_(ATObject comparand)
ATObject
base__opeql__opeql_
in interface ATObject
public ATObject base_new(ATObject[] initargs) throws InterpreterException
ATObject
base_new
in interface ATObject
InterpreterException
public ATObject base_init(ATObject[] initargs) throws InterpreterException
ATObject
base_init
in interface ATObject
InterpreterException
public ATBoolean meta_isCloneOf(ATObject original) throws InterpreterException
ATObject
meta_isCloneOf
in interface ATObject
original
- - the object of which this object is supposedly a sibling
InterpreterException
public ATBoolean meta_isRelatedTo(ATObject object) throws InterpreterException
ATObject
meta_isRelatedTo
in interface ATObject
InterpreterException
public ATBoolean meta_isStripedWith(ATStripe stripe) throws InterpreterException
meta_isStripedWith
in interface ATObject
InterpreterException
public ATTable meta_getStripes() throws InterpreterException
meta_getStripes
in interface ATObject
InterpreterException
public ATObject meta_pass() throws InterpreterException
meta_pass
in interface ATObject
InterpreterException
- - when overridden by the programmerpublic ATObject meta_resolve() throws InterpreterException
meta_resolve
in interface ATObject
InterpreterException
public java.lang.Object writeReplace() throws java.io.ObjectStreamException
java.io.ObjectStreamException
public java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
public boolean equals(java.lang.Object other)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |