edu.vub.at.objects.natives
Class NATException

java.lang.Object
  extended byedu.vub.at.objects.natives.NATNil
      extended byedu.vub.at.objects.natives.NATByCopy
          extended byedu.vub.at.objects.natives.NATException
All Implemented Interfaces:
ATAbstractGrammar, ATConversions, ATExpression, ATNil, ATObject, ATStatement, java.io.Serializable

public class NATException
extends NATByCopy

Instances of the class NATException provide a AmbientTalk representation for the default instances of all InterpreterExceptions. They allow catching exceptions thrown by the interpreter in AmbientTalk, as well as raising them for within custom code.

Author:
smostinc
See Also:
Serialized Form

Field Summary
private  InterpreterException wrappedException_
           
 
Fields inherited from class edu.vub.at.objects.natives.NATNil
_INSTANCE_
 
Constructor Summary
NATException(InterpreterException wrappedException)
           
 
Method Summary
 NATException asNativeException()
           
 InterpreterException getWrappedException()
           
 ATTable meta_getStripes()
          By default, a native object (and also nil) has no stripes.
 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.
 ATObject meta_newInstance(ATTable initargs)
          Create a new instance of the receiver object.
 
Methods inherited from class edu.vub.at.objects.natives.NATByCopy
meta_pass, meta_resolve
 
Methods inherited from class edu.vub.at.objects.natives.NATNil
asAmbientTalkObject, asJavaClassUnderSymbiosis, asJavaObjectUnderSymbiosis, asNativeBoolean, asNativeFarReference, asNativeFraction, asNativeNumber, asNativeNumeric, asNativeTable, asNativeText, base__opeql__opeql_, base_asActorMirror, base_asAsyncMessage, base_asBegin, base_asBoolean, base_asClosure, base_asDefinition, base_asExpression, base_asFarReference, base_asField, base_asHandler, base_asMessage, base_asMessageCreation, base_asMethod, base_asMirror, base_asNumber, base_asSplice, base_asStatement, base_asStripe, base_asSymbol, base_asTable, base_asUnquoteSplice, base_asVariableAssignment, base_init, base_isBoolean, base_isCallFrame, base_isClosure, base_isFarReference, base_isMessageCreation, base_isMethod, base_isMirror, base_isSplice, base_isStripe, base_isSymbol, base_isTable, base_isUnquoteSplice, base_isVariableAssignment, base_new, createChild, equals, isAmbientTalkObject, isJavaObjectUnderSymbiosis, isNativeBoolean, isNativeField, isNativeText, 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_isStripedWith, meta_listFields, meta_listMethods, meta_lookup, meta_print, meta_quote, meta_receive, meta_respondsTo, meta_select, meta_send, meta_share, readResolve, toString, writeReplace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wrappedException_

private final InterpreterException wrappedException_
Constructor Detail

NATException

public NATException(InterpreterException wrappedException)
Method Detail

asNativeException

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

getWrappedException

public InterpreterException getWrappedException()

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
Overrides:
meta_newInstance in class NATNil
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
Overrides:
meta_isRelatedTo in class NATNil
Throws:
InterpreterException

meta_getStripes

public ATTable meta_getStripes()
                        throws InterpreterException
Description copied from class: NATNil
By default, a native object (and also nil) has no stripes.

Specified by:
meta_getStripes in interface ATObject
Overrides:
meta_getStripes in class NATNil
Throws:
InterpreterException