Package kilim.analysis

Examples of kilim.analysis.ClassInfo


public class TestClassInfo extends TestCase {
  public void testContains() throws Exception {
    List<ClassInfo> classInfoList = new LinkedList<ClassInfo>();
   
    ClassInfo classOne = new ClassInfo("kilim/S_01.class", "whocares".getBytes("UTF-8"));
    classInfoList.add(classOne);
   
    ClassInfo classTwo = new ClassInfo("kilim/S_01.class", "whocares".getBytes("UTF-8"));
    assertTrue(classInfoList.contains(classTwo));
  }
View Full Code Here


            try {
                String classFileName = name.replace('.', File.separatorChar) + ".class";
                FileLister.Entry fe = container.open(classFileName);
                if (fe == null) continue;
                byte[] code = readFully(fe);
                List<ClassInfo> cis = weaver.weave(new ClassInfo(name, code));

                for (ClassInfo ci : cis) {
                    if (findLoadedClass(ci.className) != null)
                        continue;
                    Class<?> c = super.defineClass(ci.className, ci.bytes, 0, ci.bytes.length);
View Full Code Here

            if (f.isDirectory()) {
                String qname = pkgName + fname + ".";
                addClasses(ret, qname, f);
            } else if (fname.endsWith(".class")) {
                String qname = pkgName + fname.substring(0, fname.length() - 6);
                ret.add(new ClassInfo(qname, readFile(f)));
            } else {
                System.err.println("Unexpected file : " + f.getAbsolutePath());
            }
        }
    }
View Full Code Here

TOP

Related Classes of kilim.analysis.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.