Package cn.wensiqun.info

Examples of cn.wensiqun.info.ClassInfo


  public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
        if (name.endsWith("package-info")) {
            //info = new PackageInfo(CommonUtils.javaName(name));
        } else {
            ClassInfo classInfo = new ClassInfo(CommonUtils.javaName(name), CommonUtils.javaName(superName));

            for (String interfce : interfaces) {
                classInfo.getInterfaces().add(CommonUtils.javaName(interfce));
            }
            info = classInfo;
            classGrep.putCacheClassInfo(classInfo.getName(), classInfo);

            /*if (grepClient.isExtractSuperInterfaces())*/
            extractSuperInterfaces(classInfo);
        }
  }
View Full Code Here


    private void extractSuperInterfaces(ClassInfo classInfo) {
        String superType = classInfo.getSuperType();

        if (superType != null) {
            ClassInfo base = classGrep.getCacheClassInfo(superType);

            if (base == null) {
                //try to load base
                String resource = superType.replace('.', '/') + ".class";
               
                grepClient.readClassDef(resource);
               
                base = classGrep.getCacheClassInfo(superType);
            }

            if (base != null) {
                List<String> interfaces = classInfo.getSuperInterfaces();
                interfaces.addAll(base.getSuperInterfaces());
                interfaces.addAll(base.getInterfaces());
            }
        }
    }
View Full Code Here

TOP

Related Classes of cn.wensiqun.info.ClassInfo

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.