|
|||||||||||
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.NATByCopy
edu.vub.at.objects.natives.NATMethod
NATMethod implements methods as named functions which are in fact simply containers for a name, a table of arguments and a body.
Field Summary | |
private ATBegin |
body_
|
private ATSymbol |
name_
|
private PartialBinder |
parameterBindingFunction_
|
private ATTable |
parameters_
|
Fields inherited from class edu.vub.at.objects.natives.NATNil |
_INSTANCE_ |
Constructor Summary | |
NATMethod(ATSymbol name,
ATTable parameters,
ATBegin body)
|
Method Summary | |
ATObject |
base_apply(ATTable arguments,
ATContext ctx)
To apply a function, first bind its parameters to the evaluated arguments within a new call frame. |
ATObject |
base_applyInScope(ATTable arguments,
ATContext ctx)
Applies the method in the context given, without first inserting a call frame to bind parameters. |
ATMethod |
base_asMethod()
|
ATBegin |
base_getBodyExpression()
Structural access to the body of the method. |
ATSymbol |
base_getName()
Structural access to the name of the method. |
ATTable |
base_getParameters()
Structural access to the parameter list of the method, which is normally a table of symbols. |
boolean |
base_isMethod()
|
ATTable |
meta_getStripes()
Returns the stripes of this object. |
NATText |
meta_print()
Prints out the object in a human-readable way. |
Methods inherited from class edu.vub.at.objects.natives.NATByCopy |
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_newInstance, meta_pass, meta_quote, meta_receive, meta_resolve, meta_respondsTo, meta_select, meta_send, meta_share |
Field Detail |
private final ATSymbol name_
private final ATTable parameters_
private final ATBegin body_
private final PartialBinder parameterBindingFunction_
Constructor Detail |
public NATMethod(ATSymbol name, ATTable parameters, ATBegin body) throws InterpreterException
Method Detail |
public ATSymbol base_getName()
ATMethod
base_getName
in interface ATMethod
public ATTable base_getParameters()
ATMethod
base_getParameters
in interface ATMethod
public ATBegin base_getBodyExpression()
ATMethod
base_getBodyExpression
in interface ATMethod
public ATObject base_apply(ATTable arguments, ATContext ctx) throws InterpreterException
base_apply
in interface ATMethod
arguments
- the evaluated actual argumentsctx
- the context in which to evaluate the method body, where a call frame will be inserted first
InterpreterException
public ATObject base_applyInScope(ATTable arguments, ATContext ctx) throws InterpreterException
base_applyInScope
in interface ATMethod
arguments
- the evaluated actual argumentsctx
- the context in which to evaluate the method body, to be used as-is
InterpreterException
public NATText meta_print() throws InterpreterException
ATObject
meta_print
in interface ATObject
meta_print
in class NATNil
InterpreterException
public ATMethod base_asMethod() throws XTypeMismatch
base_asMethod
in interface ATConversions
base_asMethod
in class NATNil
XTypeMismatch
public boolean base_isMethod()
base_isMethod
in interface ATConversions
base_isMethod
in class NATNil
public ATTable meta_getStripes() throws InterpreterException
ATObject
meta_getStripes
in interface ATObject
meta_getStripes
in class NATNil
InterpreterException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |