@Test public void canFindJDKData(){ InheritanceTree it = InheritanceTreeGenerator.readJDKData(); Assert.assertNotNull(it); }
public static InheritanceTree readJDKData() { XStream xstream = new XStream(); XStream.setupDefaultSecurity(xstream); xstream.allowTypesByWildcard(new String[] {"org.evosuite.**", "org.jgrapht.**"}); String fileName; if(! PackageInfo.isCurrentlyShaded()) { fileName = "/" + jdkFile; } else { fileName = "/" + shadedJdkFile; } InputStream inheritance = InheritanceTreeGenerator.class.getResourceAsStream(fileName); if (inheritance != null) { return (InheritanceTree) xstream.fromXML(inheritance); } else { logger.warn("Found no JDK inheritance tree in the resource path: "+fileName); return null; } }
InheritanceTreeGenerator { public static InheritanceTree readJDKData() { XStream xstream = new XStream(); XStream.setupDefaultSecurity(xstream); xstream.allowTypesByWildcard(new String[] {"org.evosuite.**", "org.jgrapht.**"}); String fileName; if(! PackageInfo.isCurrentlyShaded()) { fileName = "/" + jdkFile; } else { fileName = "/" + shadedJdkFile; } InputStream inheritance = InheritanceTreeGenerator.class.getResourceAsStream(fileName); if (inheritance != null) { return (InheritanceTree) xstream.fromXML(inheritance); } else { logger.warn("Found no JDK inheritance tree in the resource path: "+fileName); return null; } } }
InheritanceTreeGenerator { public static InheritanceTree readJDKData() { XStream xstream = new XStream(); XStream.setupDefaultSecurity(xstream); xstream.allowTypesByWildcard(new String[] {"org.evosuite.**", "org.jgrapht.**"}); String fileName; if(! PackageInfo.isCurrentlyShaded()) { fileName = "/" + jdkFile; } else { fileName = "/" + shadedJdkFile; } InputStream inheritance = InheritanceTreeGenerator.class.getResourceAsStream(fileName); if (inheritance != null) { return (InheritanceTree) xstream.fromXML(inheritance); } else { logger.warn("Found no JDK inheritance tree in the resource path: "+fileName); return null; } }  }
InheritanceTreeGenerator { public static InheritanceTree readJDKData() { XStream xstream = new XStream(); XStream.setupDefaultSecurity(xstream); xstream.allowTypesByWildcard(new String[] {"org.evosuite.**", "org.jgrapht.**"}); String fileName; if(! PackageInfo.isCurrentlyShaded()) { fileName = "/" + jdkFile; } else { fileName = "/" + shadedJdkFile; } InputStream inheritance = InheritanceTreeGenerator.class.getResourceAsStream(fileName); if (inheritance != null) { return (InheritanceTree) xstream.fromXML(inheritance); } else { logger.warn("Found no JDK inheritance tree in the resource path: "+fileName); return null; } }  static InheritanceTree createFromClassPath(List<String> classPath); static InheritanceTree createFromClassList(Collection<String> classNames); static void gatherStatistics(InheritanceTree inheritanceTree); static boolean canUse(ClassNode cn); static void generateJDKCluster(String... filters); static InheritanceTree readJDKData(); static InheritanceTree readInheritanceTree(String fileName); static InheritanceTree readUncompressedInheritanceTree(String fileName); static void writeInheritanceTree(InheritanceTree tree, File file); static Collection<String> getAllResources(); static void main(String[] args); }
InheritanceTreeGenerator { public static InheritanceTree readJDKData() { XStream xstream = new XStream(); XStream.setupDefaultSecurity(xstream); xstream.allowTypesByWildcard(new String[] {"org.evosuite.**", "org.jgrapht.**"}); String fileName; if(! PackageInfo.isCurrentlyShaded()) { fileName = "/" + jdkFile; } else { fileName = "/" + shadedJdkFile; } InputStream inheritance = InheritanceTreeGenerator.class.getResourceAsStream(fileName); if (inheritance != null) { return (InheritanceTree) xstream.fromXML(inheritance); } else { logger.warn("Found no JDK inheritance tree in the resource path: "+fileName); return null; } }  static InheritanceTree createFromClassPath(List<String> classPath); static InheritanceTree createFromClassList(Collection<String> classNames); static void gatherStatistics(InheritanceTree inheritanceTree); static boolean canUse(ClassNode cn); static void generateJDKCluster(String... filters); static InheritanceTree readJDKData(); static InheritanceTree readInheritanceTree(String fileName); static InheritanceTree readUncompressedInheritanceTree(String fileName); static void writeInheritanceTree(InheritanceTree tree, File file); static Collection<String> getAllResources(); static void main(String[] args);  }