Examples of XClassTable


Examples of xscript.runtime.clazz.XClassTable

  public XMethod getMethod(XObject object){
    if(XModifier.isStatic(modifier)){
      return this;
    }
    XClass xClass = object.getXClass().getXClass();
    XClassTable classTable = getDeclaringClass().getClassTable(xClass);
    if(classTable==null){
      throw new XRuntimeException("Can't cast %s to %s", xClass, getDeclaringClass());
    }
    int i = classTable.getMethodID(index);
    return xClass.getVirtualMethod(i);
  }
View Full Code Here

Examples of xscript.runtime.clazz.XClassTable

    XClass oClass = to.getXClass();
    if(!xClass.canCastTo(oClass))
      return false;
    if(to.generics==null)
      return true;
    XClassTable classTable = oClass.getClassTable(xClass);
    for(int i=0; i<to.generics.length; i++){
      if(!classTable.getGenericPtr(i).getXClass(xClass.getVirtualMachine(), generics[i], null).equals(to.generics[i])){
        return false;
      }
    }
    return true;
  }
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.