Package xscript.runtime.method

Examples of xscript.runtime.method.XMethod


    return nativeMethods.remove(name);
  }

  public void addNativeMethod(String classname, String name, XNativeMethod nativeMethod){
    XClass xClass = virtualMachine.getClassProvider().getLoadedXClass(classname);
    XMethod method = xClass==null?null:xClass.getMethod(name);
    if(method==null){
      if(nativeMethod==null){
        nativeMethods.remove(classname+"."+name);
      }else{
        nativeMethods.put(classname+"."+name, nativeMethod);
      }
    }else{
      method.setNativeMethod(nativeMethod);
    }
  }
View Full Code Here


        XChecks.checkCast(obj.getXClass(), paramTypes[i-1]);
      }
    }
    params[0] = methodExecutor.oPop();
    XObject _this = vm.getObjectProvider().getObject(params[0]);
    XMethod xMethod = method.getMethod(_this);
    thread.call(xMethod, solvedGenerics, params);
  }
View Full Code Here

        for(int i=0; i<fields.length; i++){
          super.addChild(fields[i] = new XField(this, inputStream));
        }
        methods = new XMethod[inputStream.readUnsignedShort()];
        for(int i=0; i<methods.length; i++){
          super.addChild(methods[i] = new XMethod(this, inputStream));
          if(methods[i].isConstructor() && !XModifier.isStatic(methods[i].getModifier())){
            XClass[] superClasses = methods[i].getExplizitSuperInvokes();
            for(int j=0; j<superClasses.length; j++){
              for(int k=0; k<this.superClasses.length; k++){
                if(superClasses[j] == this.superClasses[k].getXClassNonNull(virtualMachine)){
View Full Code Here

            throw new XRuntimeException("Class %s isn't inited correctly, so %s can't inited", xClass, this);
          }
        }
       
        state = STATE_RUNNABLE;
        XMethod xMethod = getMethod("<staticInit>", new String[0], "void");
        virtualMachine.getThreadProvider().importantInterrupt("Static "+getName(), xMethod, new XGenericClass[0], new long[0]);
      }catch(Throwable e){
        state = STATE_ERRORED;
        if(!(e instanceof XRuntimeException)){
          e = new XRuntimeException(e, "Error while post loading class %s", getName());
View Full Code Here

TOP

Related Classes of xscript.runtime.method.XMethod

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.