Package mug.runtime

Examples of mug.runtime.JSFunction


  }
 
  @Override
  public JSObject load(JSEnvironment env) throws Exception
  {
    final JSFunction _import = new JSFunction(env) {   
      @Override
      public Object invoke(Object ths, int argc, Object l0, Object l1, Object l2, Object l3, Object l4, Object l5, Object l6, Object l7, Object[] rest) throws Exception
      {
        return importMethod(env, JSUtils.asString(l0));
      }
    };
   
    final JSFunction _Proxy = new JSFunction(env) {
      @Override
      public Object invoke(Object ths, int argc, Object l0, Object l1, Object l2, Object l3, Object l4, Object l5, Object l6, Object l7, Object[] rest) throws Exception
      {
        // coerce path
        String qn = JSUtils.asString(l0);
View Full Code Here


   
    public Package(JSEnvironment env, final String qn) {
      super(env);
      this.qn = qn;
     
      defineProperty("toString", new JSFunction(env) {
        @Override
        public Object invoke(Object ths, int argc, Object l0,  Object l1, Object l2, Object l3, Object l4, Object l5, Object l6, Object l7, Object[] rest) throws Exception {
          return "[Package " + qn + "]";
        }
      });
View Full Code Here

        continue;
      this.defineProperty(c.getSimpleName(), new ReflectedJSJavaClass(env, c));
    }
   
    // toString method
    defineProperty("toString", new JSFunction(env) {
      @Override
      public Object invoke(Object ths, int argc, Object l0, Object l1, Object l2, Object l3, Object l4, Object l5, Object l6, Object l7, Object[] rest) throws Exception
      {
        return "[Class " + javaClass.getName() + "]";
      }
View Full Code Here

TOP

Related Classes of mug.runtime.JSFunction

Copyright © 2018 www.massapicom. 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.