Package xscript.runtime.genericclass

Examples of xscript.runtime.genericclass.XGenericMethodProviderImp


    if(!XModifier.isStatic(method.getModifier())){
      _this = virtualMachine.getObjectProvider().getObject(params[0]);
      i=1;
    }
    Object[] oParam = new Object[params.length-i];
    XGenericClass[] genericClasses = method.getParams(_this==null?null:_this.getXClass(), new XGenericMethodProviderImp(method, generics));
    if(oParam.length!=genericClasses.length)
      throw new XRuntimeException("An native call error happened");
    for(int j=0; j<oParam.length; j++){
      long value = params[j+i];
      XGenericClass genericClass = genericClasses[j];
      oParam[j] = XWrapper.getJavaObject(virtualMachine.getObjectProvider(), genericClass, value);
    }
   
    Object ret = invokeNative(nativeMethod, thread, methodExecutor, generics, _this, oParam);
    XGenericClass genericClass  = method.getReturnType(_this==null?null:_this.getXClass(), new XGenericMethodProviderImp(method, generics));
    if(XPrimitive.getPrimitiveID(genericClass.getXClass())!=XPrimitive.VOID){
      long l = XWrapper.getXObject(virtualMachine.getObjectProvider(), genericClass, ret);
      methodExecutor.push(l, XPrimitive.getPrimitiveID(genericClass.getXClass()));
    }
  }
View Full Code Here


    resolve(vm, methodExecutor);
    final XGenericClass[] solvedGenerics = new XGenericClass[generics.length];
    for(int i=0; i<solvedGenerics.length; i++){
      solvedGenerics[i] = generics[i].getXClass(vm, methodExecutor.getDeclaringClass(), methodExecutor);
    }
    XGenericClass[] paramTypes = method.getParams(null, new XGenericMethodProviderImp(method, solvedGenerics));
    long[] params = new long[paramTypes.length+1];
    for(int i=params.length-1; i>0; i++){
      int pID = XPrimitive.getPrimitiveID(paramTypes[i-1].getXClass());
      params[i] = methodExecutor.pop(pID);
      if(pID==XPrimitive.OBJECT){
View Full Code Here

    resolve(vm, methodExecutor);
    final XGenericClass[] solvedGenerics = new XGenericClass[generics.length];
    for(int i=0; i<solvedGenerics.length; i++){
      solvedGenerics[i] = generics[i].getXClass(vm, methodExecutor.getDeclaringClass(), methodExecutor);
    }
    XGenericClass[] paramTypes = method.getParams(null, new XGenericMethodProviderImp(method, solvedGenerics));
    long[] params = new long[paramTypes.length];
    for(int i=params.length-1; i>=0; i++){
      int pID = XPrimitive.getPrimitiveID(paramTypes[i].getXClass());
      params[i] = methodExecutor.pop(pID);
      if(pID==XPrimitive.OBJECT){
View Full Code Here

    resolve(vm, methodExecutor);
    final XGenericClass[] solvedGenerics = new XGenericClass[generics.length];
    for(int i=0; i<solvedGenerics.length; i++){
      solvedGenerics[i] = generics[i].getXClass(vm, methodExecutor.getDeclaringClass(), methodExecutor);
    }
    XGenericClass[] paramTypes = method.getParams(null, new XGenericMethodProviderImp(method, solvedGenerics));
    long[] params = new long[paramTypes.length+1];
    for(int i=params.length-1; i>0; i++){
      int pID = XPrimitive.getPrimitiveID(paramTypes[i-1].getXClass());
      params[i] = methodExecutor.pop(pID);
      if(pID==XPrimitive.OBJECT){
View Full Code Here

TOP

Related Classes of xscript.runtime.genericclass.XGenericMethodProviderImp

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.