edu.vub.at.objects
Interface Object
- All Known Subinterfaces:
- AbstractGrammar, ActorMirror, Application, AssignField, Assignment, AssignmentSymbol, AssignTable, AssignVariable, AsyncMessage, AsyncMessageCreation, Begin, Boolean, Closure, ClosureLiteral, Context, DefExternalField, DefExternalMethod, DefField, Definition, DefMethod, DefTable, DefType, Exception, Expression, FarReference, Field, FieldSelection, FieldSelectionCreation, Fraction, Handler, Import, JavaClosure, Letter, Lookup, Message, MessageCreation, MessageSend, Method, MethodInvocation, MethodInvocationCreation, MirrorRoot, MultiAssignment, MultiDefinition, Nil, Number, Numeric, Quote, Selection, Splice, Statement, Symbol, Table, Tabulation, Text, TypeTag, Unquote, UnquoteSplice
Object
ATObject represents the public interface common to any AmbientTalk/2 object.
Any value representing an ambienttalk object should implement this interface.
More specifically, this interface actually defines two interfaces all at once:
- A base-level interface to AmbientTalk objects, describing all
methods and fields that a regular AmbientTalk object understands.
- A meta-level interface to AmbientTalk objects, describing all
methods and fields that the mirror on any AmbientTalk object
understands.
In the AmbientTalk/2 Interpreter implementation, there are only a few classes
that (almost) fully implement this interface. The principal implementors are:
NativeATObject
: provides a default implementation for all native data types.
For example, native methods, closures, abstract grammar nodes, booleans, numbers, etc.
are all represented as AmbientTalk objects with 'native' behaviour.
Callframe
: overrides most of the default behaviour of NativeATObject
to
implement the behaviour of call frames, also known as activation records. In
AmbientTalk, call frames are the objects that together define the runtime stack.
They are objects with support for fields but without support for actual methods.
Object
: extends the behaviour of call frames to include support for
full-fledged, programmer-defined objects with support for methods and delegation.
JavaClass
and JavaObject
: adapt the behaviour of native AmbientTalk
objects to engage in symbiosis with either a Java class or a Java object.
This implementation makes use of the Java Reflection API to regard Java objects
as though it were AmbientTalk objects.
Mirage
and MirrorRoot
: these two classes work in tandem to
enable reflection on AmbientTalk objects. That is, because of these two classes, an
AmbientTalk programmer can himself invoke the methods provided in this interface.
Mirage
implements each operation in this interface by forwarding a
downed invocation to a custom so-called mirror object. This mirror object
can delegate to MirrorRoot
, which is a special object that implements
each meta-level operation of this interface as a base-level operation. Hence, in
a sense, MirrorRoot
also 'implements' this interface, but at the
AmbientTalk level, rather than at the Java level.
- Author:
- tvcutsem
Method Summary |
Object |
super()
Bound to the dynamic parent of this object. |
super
Object super()
- Bound to the dynamic parent of this object.
The dynamic parent of an object is the object to which failed
selection or invocation requests or type tests are delegated to.
- Returns:
- the current dynamic parent of this object.