Examples of invoke()


Examples of weasel.interpreter.WeaselNativeMethod.invoke()

        WeaselMethodBody methodBody = interpreter.baseTypes.getlObjectEqualMethod().getMethod(o1);
        if(methodBody.isNative()){
          WeaselNativeMethod nativeMethod = interpreter.getNativeMethod(methodBody.getNameAndDesk());
          Object[] params = new Object[1];
          params[0] = o2;
          Object ret = nativeMethod.invoke(interpreter, thread, method, methodBody.getNameAndDesk(), o1, params);
          thread.pushValue((Boolean)ret);
        }else{
          thread.pushObject(obj1);
          thread.pushObject(obj2);
          thread.call(methodBody);
View Full Code Here

Examples of webit.script.Function.invoke()

        //plus
        Function plus = context.exportFunction("plus");

        assertNotNull(plus);

        assertEquals(1, plus.invoke(0, 1));
        assertEquals(5, plus.invoke(2, 3));
        assertEquals(1, plus.invoke(-2, 3));

        //counter
        Function counter = context.exportFunction("counter");
View Full Code Here

Examples of webit.script.lang.MethodDeclare.invoke()

        assertEquals(currentTimeMillis.invoke(null, new Object[]{1, 2, 3}).getClass(), Long.class);

        int[] array1 = new int[]{1, 2, 3, 4, 6};
        int[] array2 = new int[array1.length];

        assertEquals(arraycopy.invoke(null, new Object[]{array1, 0, array2, 0, array1.length}), Context.VOID);
        assertArrayEquals(array2, array2);

        List list = (List) newList.invoke(null, null);

        List list2 = (List) newListWithInitSize.invoke(null, new Object[]{2});
View Full Code Here

Examples of weka.core.scripting.Jython.invoke()

      argv   += "]";
     
      jython  = new Jython();
     
      // set commandline parameters
      jython.invoke("exec", new Class[]{String.class}, new Object[]{"import sys"});
      jython.invoke("exec", new Class[]{String.class}, new Object[]{argv});
     
      jython.invoke("execfile", classes, params);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.