Search in sources :

Example 1 with ABSDynamicDelta

use of abs.backend.java.lib.runtime.ABSDynamicDelta in project abstools by abstools.

the class Delta method setupMetaAPI.

/*
     * Define the methods of this class
     */
public static void setupMetaAPI() {
    thisClass.setName("Delta");
    thisClass.addMethod(/*ABSString*/
    "getName", new ABSClosure() {

        @Override
        public ABSString exec(ABSDynamicObject t, ABSValue... params) {
            ABSDynamicDelta delta = (ABSDynamicDelta) t;
            return ABSString.fromString(delta.getName());
        }
    });
    thisClass.addMethod(/*ABSUnit*/
    "apply", new ABSClosure() {

        @Override
        public ABSValue exec(ABSDynamicObject t, ABSValue... params) {
            ABSDynamicDelta delta = (ABSDynamicDelta) t;
            delta.apply();
            return ABSUnit.UNIT;
        }
    });
}
Also used : ABSDynamicObject(abs.backend.java.lib.runtime.ABSDynamicObject) ABSClosure(abs.backend.java.lib.runtime.ABSClosure) ABSDynamicDelta(abs.backend.java.lib.runtime.ABSDynamicDelta) ABSValue(abs.backend.java.lib.types.ABSValue) ABSString(abs.backend.java.lib.types.ABSString)

Aggregations

ABSClosure (abs.backend.java.lib.runtime.ABSClosure)1 ABSDynamicDelta (abs.backend.java.lib.runtime.ABSDynamicDelta)1 ABSDynamicObject (abs.backend.java.lib.runtime.ABSDynamicObject)1 ABSString (abs.backend.java.lib.types.ABSString)1 ABSValue (abs.backend.java.lib.types.ABSValue)1