|
|||||||||||
| 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.NATByRef
edu.vub.at.objects.mirrors.NativeAnonymousMethod
A NativeAnonymousMethod represents the meta_apply method of an anonymous NativeClosure subclass. An anonymous native method has the following properties: - name = "nativelambda" (to distinguish it from 'ordinary' lambdas) - arguments = [ \@args ] (it takes an arbitrary number of arguments) - body = "Native implementation in {class}" (a string telling an inspector that this closure is natively implemented in the given Java class) - applying a nativelambda directly (without going through this NativeClosure) results in an error
| Field Summary | |
private java.lang.Class |
creatorClass_
|
| Fields inherited from class edu.vub.at.objects.natives.NATNil |
_INSTANCE_ |
| Constructor Summary | |
NativeAnonymousMethod(java.lang.Class creatorClass)
|
|
| Method Summary | |
ATObject |
base_apply(ATTable arguments,
ATContext ctx)
It is an error to directly apply an anonymous method. |
ATObject |
base_applyInScope(ATTable arguments,
ATContext ctx)
Applies the method to the given arguments in the given context. |
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. |
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.NATByRef |
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 java.lang.Class creatorClass_
| Constructor Detail |
public NativeAnonymousMethod(java.lang.Class creatorClass)
creatorClass - class of the object that has created the NativeClosure that will wrap this| Method Detail |
public ATObject base_apply(ATTable arguments,
ATContext ctx)
throws InterpreterException
base_apply in interface ATMethodarguments - the actual arguments, already eagerly evaluatedctx - the context in which to evaluate the method body, call frame not yet inserted
XIllegalApplication - because an anonymous method must be applied through its wrapping closure.
InterpreterException
public ATObject base_applyInScope(ATTable arguments,
ATContext ctx)
throws InterpreterException
ATMethod
base_applyInScope in interface ATMethodarguments - the actual arguments, already eagerly evaluatedctx - the context in which to evaluate the method body, to be used without inserting a call frame
InterpreterExceptionpublic ATSymbol base_getName()
ATMethod
base_getName in interface ATMethodpublic ATTable base_getParameters()
ATMethod
base_getParameters in interface ATMethodpublic ATBegin base_getBodyExpression()
ATMethod
base_getBodyExpression in interface ATMethod
public NATText meta_print()
throws InterpreterException
ATObject
meta_print in interface ATObjectmeta_print in class NATNilInterpreterException
public ATTable meta_getStripes()
throws InterpreterException
ATObject
meta_getStripes in interface ATObjectmeta_getStripes in class NATNilInterpreterException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||