Package kilim.mirrors

Examples of kilim.mirrors.ClassMirror


        if (methodName.endsWith("init>")) {
            return METHOD_NOT_PAUSABLE; // constructors are not pausable.
        }
        className = className.replace('/', '.');
        try {
            ClassMirror cl = mirrors.classForName(className);
            MethodMirror m = findMethod(cl, methodName, desc);
            if (m != null) {
                for (ClassMirror c: m.getExceptionTypes()) {
                    if (NOT_PAUSABLE.isAssignableFrom(c)) {
                        return METHOD_NOT_PAUSABLE;
View Full Code Here


  public String commonSuperType(String oa, String ob) throws ClassMirrorNotFoundException {
        String a = toClassName(oa);
        String b = toClassName(ob);
       
        try {
          ClassMirror ca = mirrors.classForName(a);
          ClassMirror cb = mirrors.classForName(b);
          if (ca.isAssignableFrom(cb)) return oa;
          if (cb.isAssignableFrom(ca)) return ob;
          if (ca.isInterface() && cb.isInterface()) {
              return D_OBJECT; // This is what the java bytecode verifier does
          }
        } catch (ClassMirrorNotFoundException e) {
          // try to see if the below works...
        }
View Full Code Here

        return toDesc(sca.get(lasta+1));   
  }
 

    public ArrayList<String> getSuperClasses(String cc) throws ClassMirrorNotFoundException {
      ClassMirror c = mirrors.classForName(cc);
        ArrayList<String> ret = new ArrayList<String>(3);
        while (c != null) {
            ret.add(c.getName());
            c = c.getSuperclass();
        }
        return ret;
       
    }
View Full Code Here

TOP

Related Classes of kilim.mirrors.ClassMirror

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.