edu.vub.at.objects.natives
Class NATNil

java.lang.Object
  extended byedu.vub.at.objects.natives.NATNil
All Implemented Interfaces:
ATAbstractGrammar, ATConversions, ATExpression, ATNil, ATObject, ATStatement, java.io.Serializable
Direct Known Subclasses:
NATByCopy, NATByRef, NATObjectClosureTest.AGScopeTest, OBJUnit

public class NATNil
extends java.lang.Object
implements ATNil, java.io.Serializable

NATNil implements default semantics for all test and conversion methods.

Author:
smostinc
See Also:
Serialized Form

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

_INSTANCE_

public static final NATNil _INSTANCE_
Constructor Detail

NATNil

protected NATNil()
Method Detail

meta_send

public ATObject meta_send(ATAsyncMessage message)
                   throws InterpreterException
Asynchronous messages ( o<-m( args )) sent in the context of an object o (i.e. sent in a method or closure where the self pseudovariable is bound to o) are delegated to the base-level send method of the actor in which the object o is contained.

Specified by:
meta_send in interface ATObject
Parameters:
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.
Throws:
InterpreterException

meta_receive

public ATObject meta_receive(ATAsyncMessage message)
                      throws InterpreterException
Description copied from interface: ATObject
Handles a first-class message of which it is the receiver.

Specified by:
meta_receive in interface ATObject
Parameters:
message - the asynchronous message send by some object possibly from another actor
Returns:
the return value of invoking the method corresponding to the message
Throws:
InterpreterException

meta_invoke

public ATObject meta_invoke(ATObject receiver,
                            ATSymbol atSelector,
                            ATTable arguments)
                     throws InterpreterException
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_'. Because an explicit AmbientTalk method invocation must be converted into an implicit Java method invocation, the invocation must be deified ('upped'). The result of the upped invocation is a Java object, which must subsequently be 'downed' again. If no method to invoke is found, doesNotUnderstand is invoked which should return a closure to be invoked with the appropriate arguments.

Specified by:
meta_invoke in interface ATObject
Parameters:
receiver - the object to which 'self' is bound during execution of the method
atSelector - the name of the method to be invoked
arguments - the table of arguments passed to the method
Returns:
return value of the method Triggers the following events on this object's beholders (mirror observers): - methodFound when a method has been found but not yet applied - methodInvoked when the received method has been applied
Throws:
InterpreterException

meta_respondsTo

public ATBoolean meta_respondsTo(ATSymbol atSelector)
                          throws InterpreterException
An ambienttalk language value can respond to a message if it implements a native Java method corresponding to the selector prefixed by 'base_'.

Specified by:
meta_respondsTo in interface ATObject
Parameters:
atSelector - the name of a field or method
Returns:
a boolean denoting whether the object responds to o.selector
Throws:
InterpreterException

meta_doesNotUnderstand

public ATObject meta_doesNotUnderstand(ATSymbol selector)
                                throws InterpreterException
By default, when a selection is not understood by a primitive object, an error is raised.

Specified by:
meta_doesNotUnderstand in interface ATObject
Parameters:
selector - the selector that could not be found
Throws:
InterpreterException

meta_select

public ATObject meta_select(ATObject receiver,
                            ATSymbol selector)
                     throws InterpreterException
It is possible to select a method from any ambienttalk value provided that it offers the method in its provided interface. The result is a NativeMethod wrapper which encapsulates the reflective Method object as well as the receiver. There exists a certain ambiguity in field selection on AmbientTalk implementation-level objects. When nativeObject.m is evaluated, the corresponding Java class must have a method named either base_getM which means m is represented as a readable field, or base_m which means m is represented as a method

Specified by:
meta_select in interface ATObject
Parameters:
receiver - the dynamic receiver to which method closures should bind self.
selector - the name of the field or method sought for.
Returns:
the contents of the slot Triggers the slotSelected event on this object's beholders (mirror observers).
Throws:
InterpreterException

meta_lookup

public ATObject meta_lookup(ATSymbol selector)
                     throws InterpreterException
A lookup can only be issued at the base level by writing selector inside the scope of a particular object. For primitive language values, this should not happen as no AmbientTalk code can be possibly nested within native code. However, using meta-programming a primitive object could be installed as the lexical parent of an AmbientTalk object. One particular case where this method will often be called is when a lookup reaches the lexical root, OBJLexicalRoot, which inherits this implementation. In such cases a lookup is treated exactly like a selection, where the 'original receiver' of the selection equals the primitive object.

Specified by:
meta_lookup in interface ATObject
Parameters:
selector - the name of the field or method to look up.
Returns:
the contents of the slot
Throws:
InterpreterException

meta_defineField

public ATNil meta_defineField(ATSymbol name,
                              ATObject value)
                       throws InterpreterException
Description copied from interface: ATObject
Defines a new field in an object.

Specified by:
meta_defineField in interface ATObject
Parameters:
name - the name of the new field
value - the value of the new field
Returns:
nil
Throws:
InterpreterException

meta_assignVariable

public ATNil meta_assignVariable(ATSymbol name,
                                 ATObject value)
                          throws InterpreterException
Normally, a variable assignment cannot be performed on a native AmbientTalk object. This is because a variable assignment can normally be only raised by performing an assignment in the lexical scope of an object. However, using metaprogramming a native object could be installed as the lexical parent of an AT object. In such cases, variable assignment is treated as field assignment. One particular case where this method will often be called is when a variable assignment reaches the lexical root, OBJLexicalRoot, which inherits this implementation.

Specified by:
meta_assignVariable in interface ATObject
Parameters:
name - a symbol representing the name of the variable to assign.
value - the value to assign to the specified slot.
Returns:
nil
Throws:
InterpreterException

meta_assignField

public ATNil meta_assignField(ATObject receiver,
                              ATSymbol name,
                              ATObject value)
                       throws InterpreterException
Description copied from interface: ATObject
Sets the value of a field to the given value. Triggers the fieldAssigned event on this object's beholders (mirror observers). Field assignment may result in the assignment of a parent's field.

Specified by:
meta_assignField in interface ATObject
Parameters:
receiver - the object which received (and possibly delegated) the request
name - a symbol representing the field to assign.
value - the value to assign to the specified slot.
Returns:
nil
Throws:
InterpreterException

meta_clone

public ATObject meta_clone()
                    throws InterpreterException
Description copied from interface: ATObject
Clone the receiver object. This cloning closely corresponds to the allocation phase in class-based OO languages. In class-based languages, instance creation is based on the equation = () (i.e. first allocate a new instance, then initialize it). In our object-based model, allocation is replaced by cloning. When an object is asked to clone itself, it will also clone its dynamic parent if it extends this parent in an 'is-a' relationship. This is similar to the observation that, in class-based languages, allocating a new object of a subclass entails allocating space for the state of the superclass. Triggers the objectCloned event on this object's beholders (mirror observers). Initializing the clone is the responsibility of the method named .

Specified by:
meta_clone in interface ATObject
Throws:
InterpreterException

meta_newInstance

public ATObject meta_newInstance(ATTable initargs)
                          throws InterpreterException
Description copied from interface: ATObject
Create a new instance of the receiver object. AmbientTalk mimics the initialization protocol of Class-based languages like Smalltalk. In a typical CBL, object initialization equals class allocation + new instance initialization. In AmbientTalk, class allocation is replaced by cloning via the meta_clone operation. Object initialization itself differs from cloning in that it additionally initializes the clone. For standard AmbientTalk objects, this happens by invoking a method named 'init' on the newly created instance.

Specified by:
meta_newInstance in interface ATObject
Parameters:
initargs - arguments to the 'init' constructor method
Returns:
the new instance
Throws:
InterpreterException

createChild

protected ATObject createChild(ATClosure code,
                               boolean parentPointerType)
                        throws InterpreterException
Throws:
InterpreterException

meta_extend

public ATObject meta_extend(ATClosure code)
                     throws InterpreterException
Description copied from interface: ATObject
Create an is-a extension of the receiver object. The base-level code is represented at the meta-level by Triggers the objectExtended event on this object's beholders (mirror observers).

Specified by:
meta_extend in interface ATObject
Returns:
a fresh object whose dynamic parent points to with 'is-a' semantics.
Throws:
InterpreterException

meta_share

public ATObject meta_share(ATClosure code)
                    throws InterpreterException
Description copied from interface: ATObject
Create a shares-a extension of the receiver object. The base-level code 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).

Specified by:
meta_share in interface ATObject
Returns:
a fresh object whose dynamic parent points to with 'shares-a' semantics.
Throws:
InterpreterException

meta_addField

public ATNil meta_addField(ATField field)
                    throws InterpreterException
Description copied from interface: ATObject
Adds a field slot to an object at runtime. Triggers the fieldAdded event on this object's beholders (mirror observers) if the field is added successfully.

Specified by:
meta_addField in interface ATObject
Parameters:
field - a mirror on the field to add, consisting of a selector (a symbol) and a value (an object)
Returns:
nil
Throws:
InterpreterException

meta_addMethod

public ATNil meta_addMethod(ATMethod method)
                     throws InterpreterException
Description copied from interface: ATObject
Adds a method slot to an object at runtime. Triggers the methodAdded event on this object's beholders (mirror observers) if the method is added successfully.

Specified by:
meta_addMethod in interface ATObject
Parameters:
method - a mirror on the method to add. A method consists of a selector, arguments and a body.
Returns:
nil
Throws:
InterpreterException

meta_grabField

public ATField meta_grabField(ATSymbol fieldName)
                       throws InterpreterException
Description copied from interface: ATObject
Queries an object for one of its field slots. Triggers the fieldAccessed event on this object's beholders (mirror observers).

Specified by:
meta_grabField in interface ATObject
Parameters:
fieldName - a symbol representing the name of the slot.
Returns:
a mirror on this object's field slot.
Throws:
InterpreterException

meta_grabMethod

public ATMethod meta_grabMethod(ATSymbol methodName)
                         throws InterpreterException
Description copied from interface: ATObject
Queries an object for one of its method slots. Triggers the methodAccessed event on this object's beholders (mirror observers).

Specified by:
meta_grabMethod in interface ATObject
Parameters:
methodName - a symbol representing the name of the slot.
Returns:
a mirror on this object's method slot.
Throws:
InterpreterException

meta_listFields

public ATTable meta_listFields()
                        throws InterpreterException
Description copied from interface: ATObject
Queries an object for a list of all of its field slots. TODO(beholders) should this method trigger beholders? if so, using a single 'fieldsQueried' event or by invoking 'fieldAccessed' for each field in the list returned?

Specified by:
meta_listFields in interface ATObject
Returns:
a table of ATField mirrors.
Throws:
InterpreterException

meta_listMethods

public ATTable meta_listMethods()
                         throws InterpreterException
Description copied from interface: ATObject
Queries an object for a list of all of its method slots. TODO(beholders) should this method trigger beholders? if so, using a single 'methodsQueried' event or by invoking 'methodAccessed' for each field in the list returned?

Specified by:
meta_listMethods in interface ATObject
Returns:
a table of ATMethod mirrors.
Throws:
InterpreterException

meta_eval

public ATObject meta_eval(ATContext ctx)
                   throws InterpreterException
All NATObjects which are not Abstract Grammar elements are self-evaluating.

Specified by:
meta_eval in interface ATObject
Parameters:
ctx - - context (object) to lookup bindings in.
Throws:
InterpreterException

meta_quote

public ATObject meta_quote(ATContext ctx)
                    throws InterpreterException
Quoting a native object returns itself, except for pure AG elements.

Specified by:
meta_quote in interface ATObject
Parameters:
ctx - - context passed on to be used in subsequent evaluations.
Throws:
InterpreterException - upon conversion errors or upon illegal unquoted expressions

meta_print

public NATText meta_print()
                   throws InterpreterException
Description copied from interface: ATObject
Prints out the object in a human-readable way.

Specified by:
meta_print in interface ATObject
Returns:
a native textual representation of the object.
Throws:
InterpreterException

meta_getDynamicParent

public ATObject meta_getDynamicParent()
                               throws InterpreterException
Only true extending objects have a dynamic pointer, others return nil

Specified by:
meta_getDynamicParent in interface ATObject
Throws:
InterpreterException

meta_getLexicalParent

public ATObject meta_getLexicalParent()
                               throws InterpreterException
By default numbers, tables and so on do not have lexical parents,

Specified by:
meta_getLexicalParent in interface ATObject
Throws:
InterpreterException

base_isClosure

public boolean base_isClosure()
                       throws InterpreterException
Specified by:
base_isClosure in interface ATConversions
Throws:
InterpreterException

base_isSymbol

public boolean base_isSymbol()
                      throws InterpreterException
Specified by:
base_isSymbol in interface ATConversions
Throws:
InterpreterException

base_isBoolean

public boolean base_isBoolean()
                       throws InterpreterException
Specified by:
base_isBoolean in interface ATConversions
Throws:
InterpreterException

base_isTable

public boolean base_isTable()
                     throws InterpreterException
Specified by:
base_isTable in interface ATConversions
Throws:
InterpreterException

base_isCallFrame

public boolean base_isCallFrame()
                         throws InterpreterException
Specified by:
base_isCallFrame in interface ATConversions
Throws:
InterpreterException

base_isUnquoteSplice

public boolean base_isUnquoteSplice()
                             throws InterpreterException
Specified by:
base_isUnquoteSplice in interface ATConversions
Throws:
InterpreterException

base_isVariableAssignment

public boolean base_isVariableAssignment()
                                  throws InterpreterException
Specified by:
base_isVariableAssignment in interface ATConversions
Throws:
InterpreterException

base_isSplice

public boolean base_isSplice()
                      throws InterpreterException
Specified by:
base_isSplice in interface ATConversions
Throws:
InterpreterException

base_isMethod

public boolean base_isMethod()
                      throws InterpreterException
Specified by:
base_isMethod in interface ATConversions
Throws:
InterpreterException

base_isMessageCreation

public boolean base_isMessageCreation()
                               throws InterpreterException
Specified by:
base_isMessageCreation in interface ATConversions
Throws:
InterpreterException

isAmbientTalkObject

public boolean isAmbientTalkObject()
Specified by:
isAmbientTalkObject in interface ATConversions

isJavaObjectUnderSymbiosis

public boolean isJavaObjectUnderSymbiosis()
Specified by:
isJavaObjectUnderSymbiosis in interface ATConversions

isNativeBoolean

public boolean isNativeBoolean()
Specified by:
isNativeBoolean in interface ATConversions

isNativeText

public boolean isNativeText()
Specified by:
isNativeText in interface ATConversions

isNativeField

public boolean isNativeField()
Specified by:
isNativeField in interface ATConversions

base_isMirror

public boolean base_isMirror()
                      throws InterpreterException
Specified by:
base_isMirror in interface ATConversions
Throws:
InterpreterException

base_isStripe

public boolean base_isStripe()
                      throws InterpreterException
Specified by:
base_isStripe in interface ATConversions
Throws:
InterpreterException

base_asClosure

public ATClosure base_asClosure()
                         throws InterpreterException
Specified by:
base_asClosure in interface ATConversions
Throws:
InterpreterException

base_asSymbol

public ATSymbol base_asSymbol()
                       throws InterpreterException
Specified by:
base_asSymbol in interface ATConversions
Throws:
InterpreterException

base_asTable

public ATTable base_asTable()
                     throws InterpreterException
Specified by:
base_asTable in interface ATConversions
Throws:
InterpreterException

base_asBoolean

public ATBoolean base_asBoolean()
                         throws InterpreterException
Specified by:
base_asBoolean in interface ATConversions
Throws:
InterpreterException

base_asNumber

public ATNumber base_asNumber()
                       throws InterpreterException
Specified by:
base_asNumber in interface ATConversions
Throws:
InterpreterException

base_asMessage

public ATMessage base_asMessage()
                         throws InterpreterException
Specified by:
base_asMessage in interface ATConversions
Throws:
InterpreterException

base_asField

public ATField base_asField()
                     throws InterpreterException
Specified by:
base_asField in interface ATConversions
Throws:
InterpreterException

base_asMethod

public ATMethod base_asMethod()
                       throws InterpreterException
Specified by:
base_asMethod in interface ATConversions
Throws:
InterpreterException

base_asMirror

public ATMirror base_asMirror()
                       throws InterpreterException
Specified by:
base_asMirror in interface ATConversions
Throws:
InterpreterException

base_asHandler

public ATHandler base_asHandler()
                         throws InterpreterException
Specified by:
base_asHandler in interface ATConversions
Throws:
InterpreterException

base_asStripe

public ATStripe base_asStripe()
                       throws InterpreterException
Specified by:
base_asStripe in interface ATConversions
Throws:
InterpreterException

base_isFarReference

public boolean base_isFarReference()
Specified by:
base_isFarReference in interface ATConversions

base_asFarReference

public ATFarReference base_asFarReference()
                                   throws InterpreterException
Specified by:
base_asFarReference in interface ATConversions
Throws:
InterpreterException

base_asAsyncMessage

public ATAsyncMessage base_asAsyncMessage()
                                   throws InterpreterException
Specified by:
base_asAsyncMessage in interface ATConversions
Throws:
InterpreterException

base_asActorMirror

public ATActorMirror base_asActorMirror()
                                 throws InterpreterException
Specified by:
base_asActorMirror in interface ATConversions
Throws:
InterpreterException

base_asStatement

public ATStatement base_asStatement()
                             throws InterpreterException
Specified by:
base_asStatement in interface ATConversions
Throws:
InterpreterException

base_asDefinition

public ATDefinition base_asDefinition()
                               throws InterpreterException
Specified by:
base_asDefinition in interface ATConversions
Throws:
InterpreterException

base_asExpression

public ATExpression base_asExpression()
                               throws InterpreterException
Specified by:
base_asExpression in interface ATConversions
Throws:
InterpreterException

base_asBegin

public ATBegin base_asBegin()
                     throws InterpreterException
Specified by:
base_asBegin in interface ATConversions
Throws:
InterpreterException

base_asMessageCreation

public ATMessageCreation base_asMessageCreation()
                                         throws InterpreterException
Specified by:
base_asMessageCreation in interface ATConversions
Throws:
InterpreterException

base_asUnquoteSplice

public ATUnquoteSplice base_asUnquoteSplice()
                                     throws InterpreterException
Specified by:
base_asUnquoteSplice in interface ATConversions
Throws:
InterpreterException

base_asVariableAssignment

public ATAssignVariable base_asVariableAssignment()
                                           throws InterpreterException
Specified by:
base_asVariableAssignment in interface ATConversions
Throws:
InterpreterException

base_asSplice

public ATSplice base_asSplice()
                       throws InterpreterException
Specified by:
base_asSplice in interface ATConversions
Throws:
InterpreterException

asAmbientTalkObject

public NATObject asAmbientTalkObject()
                              throws XTypeMismatch
Specified by:
asAmbientTalkObject in interface ATConversions
Throws:
XTypeMismatch

asNativeNumber

public NATNumber asNativeNumber()
                         throws XTypeMismatch
Specified by:
asNativeNumber in interface ATConversions
Throws:
XTypeMismatch

asNativeFraction

public NATFraction asNativeFraction()
                             throws XTypeMismatch
Specified by:
asNativeFraction in interface ATConversions
Throws:
XTypeMismatch

asNativeText

public NATText asNativeText()
                     throws XTypeMismatch
Specified by:
asNativeText in interface ATConversions
Throws:
XTypeMismatch

asNativeTable

public NATTable asNativeTable()
                       throws XTypeMismatch
Specified by:
asNativeTable in interface ATConversions
Throws:
XTypeMismatch

asNativeBoolean

public NATBoolean asNativeBoolean()
                           throws XTypeMismatch
Specified by:
asNativeBoolean in interface ATConversions
Throws:
XTypeMismatch

asNativeNumeric

public NATNumeric asNativeNumeric()
                           throws XTypeMismatch
Specified by:
asNativeNumeric in interface ATConversions
Throws:
XTypeMismatch

asNativeFarReference

public NATFarReference asNativeFarReference()
                                     throws XTypeMismatch
Specified by:
asNativeFarReference in interface ATConversions
Throws:
XTypeMismatch

asJavaObjectUnderSymbiosis

public JavaObject asJavaObjectUnderSymbiosis()
                                      throws XTypeMismatch
Specified by:
asJavaObjectUnderSymbiosis in interface ATConversions
Throws:
XTypeMismatch

asJavaClassUnderSymbiosis

public JavaClass asJavaClassUnderSymbiosis()
                                    throws XTypeMismatch
Specified by:
asJavaClassUnderSymbiosis in interface ATConversions
Throws:
XTypeMismatch

asNativeException

public NATException asNativeException()
                               throws XTypeMismatch
Specified by:
asNativeException in interface ATConversions
Throws:
XTypeMismatch

toString

public java.lang.String toString()

base__opeql__opeql_

public ATBoolean base__opeql__opeql_(ATObject comparand)
Description copied from interface: ATObject
The pointer equality == operator. OBJ(o1) == OBJ(o2) => BLN(o1.equals(o2))

Specified by:
base__opeql__opeql_ in interface ATObject

base_new

public ATObject base_new(ATObject[] initargs)
                  throws InterpreterException
Description copied from interface: ATObject
The object instantiation method. obj.new(@args) => (reflect: obj).newInstance(@args)

Specified by:
base_new in interface ATObject
Throws:
InterpreterException

base_init

public ATObject base_init(ATObject[] initargs)
                   throws InterpreterException
Description copied from interface: ATObject
The object initialisation method. By default, it does nothing. obj.init(@args) => nil

Specified by:
base_init in interface ATObject
Throws:
InterpreterException

meta_isCloneOf

public ATBoolean meta_isCloneOf(ATObject original)
                         throws InterpreterException
Description copied from interface: ATObject
Detects whether this object an the passed parameter are the result of cloning from a common ancestor (possibly either one of the objects itself).

Specified by:
meta_isCloneOf in interface ATObject
Parameters:
original - - the object of which this object is supposedly a sibling
Returns:
NATBoolean._TRUE_ if both objects are related.
Throws:
InterpreterException

meta_isRelatedTo

public ATBoolean meta_isRelatedTo(ATObject object)
                           throws InterpreterException
Description copied from interface: ATObject
Detects whether both objects have a common origin, in other words whether they are related through a combination of the cloning and extension operators.

Specified by:
meta_isRelatedTo in interface ATObject
Throws:
InterpreterException

meta_isStripedWith

public ATBoolean meta_isStripedWith(ATStripe stripe)
                             throws InterpreterException
Native objects implement the stripe test non-recursively: only the stripes returned by meta_getStripes are tested against.

Specified by:
meta_isStripedWith in interface ATObject
Throws:
InterpreterException

meta_getStripes

public ATTable meta_getStripes()
                        throws InterpreterException
By default, a native object (and also nil) has no stripes.

Specified by:
meta_getStripes in interface ATObject
Throws:
InterpreterException

meta_pass

public ATObject meta_pass()
                   throws InterpreterException
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. By default, nil decides that it is safe to serialize the object itself. Special objects such as e.g. closures should override this method and return a far reference encoding instead.

Specified by:
meta_pass in interface ATObject
Returns:
Objects may choose to return themselves, a clone or a proxy representation
Throws:
InterpreterException - - when overridden by the programmer

meta_resolve

public ATObject meta_resolve()
                      throws InterpreterException
After deserialization, ensure that nil remains unique.

Specified by:
meta_resolve in interface ATObject
Returns:
the object represented by this deserialized object
Throws:
InterpreterException

writeReplace

public java.lang.Object writeReplace()
                              throws java.io.ObjectStreamException
Delegate the responsibility of serialization to the AT/2 meta-level

Throws:
java.io.ObjectStreamException

readResolve

public java.lang.Object readResolve()
                             throws java.io.ObjectStreamException
Delegate the responsibility of deserialization to the AT/2 meta-level

Throws:
java.io.ObjectStreamException

equals

public 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.