public static void main (String... args) throws Exception { Analyzer a = new Analyzer(); ClassPool pool = ClassPool.getDefault(); CtClass cc = pool.get("test.Foo"); for (CtMethod cm : cc.getDeclaredMethods()) { Frame[] frames = a.analyze(cm); for (Frame f : frames) { System.out.println(f); } } }
static Element getAPI(Analyzer analyzer) throws Exception { analyzer.analyze(); JavaElement te = new JavaElement(analyzer); return te.getLocalAPI(); }
static Element getAPI(Analyzer analyzer) throws Exception { analyzer.analyze(); JavaElement te = new JavaElement(analyzer); return te.getLocalAPI(); }
static Element getAPI(Analyzer analyzer) throws Exception { analyzer.analyze(); JavaElement te = new JavaElement(analyzer); return te.getLocalAPI(); }
static Element getAPI(Analyzer analyzer) throws Exception { analyzer.analyze(); JavaElement te = new JavaElement(analyzer); return te.getLocalAPI(); }
static Element getAPI(Analyzer analyzer) throws Exception { analyzer.analyze(); JavaElement te = new JavaElement(analyzer); return te.getLocalAPI(); }
/** * Report the details of this analyzer */ @Override public void report(Map<String, Object> table) throws Exception { super.report(table); analyze(); table.put("Contained", getContained().entrySet()); table.put("Imported", getImports().entrySet()); table.put("Exported", getExports().entrySet()); table.put("Referred", getReferred().entrySet()); table.put("Bundle Symbolic Name", getBsn()); table.put("Execution Environments", ees); }
/** * Report the details of this analyzer */ @Override public void report(Map<String, Object> table) throws Exception { super.report(table); analyze(); table.put("Contained", getContained().entrySet()); table.put("Imported", getImports().entrySet()); table.put("Exported", getExports().entrySet()); table.put("Referred", getReferred().entrySet()); table.put("Bundle Symbolic Name", getBsn()); table.put("Execution Environments", ees); }
/** * Report the details of this analyzer */ public void report(Map<String,Object> table) throws Exception { super.report(table); analyze(); table.put("Contained", getContained().entrySet()); table.put("Imported", getImports().entrySet()); table.put("Exported", getExports().entrySet()); table.put("Referred", getReferred().entrySet()); table.put("Referred", getReferred().entrySet()); table.put("Bundle Symbolic Name", getBsn()); table.put("Execution Environments", ees); }
/** * Report the details of this analyzer */ public void report(Map<String,Object> table) throws Exception { super.report(table); analyze(); table.put("Contained", getContained().entrySet()); table.put("Imported", getImports().entrySet()); table.put("Exported", getExports().entrySet()); table.put("Referred", getReferred().entrySet()); table.put("Referred", getReferred().entrySet()); table.put("Bundle Symbolic Name", getBsn()); table.put("Execution Environments", ees); }
analyze(); Manifest manifest = new Manifest(); Attributes main = manifest.getMainAttributes();
/** * Intercept the call to analyze and cleanup versions after we have analyzed * the setup. We do not want to cleanup if we are going to verify. */ @Override public void analyze() throws Exception { super.analyze(); cleanupVersion(getImports(), null); cleanupVersion(getExports(), getVersion()); String version = getProperty(BUNDLE_VERSION); if (version != null) { version = cleanupVersion(version); if (version.endsWith(".SNAPSHOT")) { version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT")); } setProperty(BUNDLE_VERSION, version); } }
/** * Intercept the call to analyze and cleanup versions after we have analyzed * the setup. We do not want to cleanup if we are going to verify. */ @Override public void analyze() throws Exception { super.analyze(); cleanupVersion(getImports(), null); cleanupVersion(getExports(), getVersion()); String version = getProperty(BUNDLE_VERSION); if (version != null) { version = cleanupVersion(version); if (version.endsWith(".SNAPSHOT")) { version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT")); } setProperty(BUNDLE_VERSION, version); } }
/** * Intercept the call to analyze and cleanup versions after we have analyzed * the setup. We do not want to cleanup if we are going to verify. */ @Override public void analyze() throws Exception { super.analyze(); cleanupVersion(getImports(), null); cleanupVersion(getExports(), getVersion()); String version = getProperty(BUNDLE_VERSION); if (version != null) { version = cleanupVersion(version); if (version.endsWith(".SNAPSHOT")) { version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT")); } setProperty(BUNDLE_VERSION, version); } }
@Description("Show the Execution Environments of a JAR") public void _ees(EEOptions options) throws Exception { for (String path : options._()) { File f = getFile(path); if (!f.isFile()) { error("Not a file"); } else { Jar jar = new Jar(f); Analyzer a = new Analyzer(this); try { a.setJar(jar); a.analyze(); out.printf("%s %s%n", jar.getName(), a.getEEs()); } finally { a.close(); } } } }
analyze(); Manifest manifest = new Manifest(); Attributes main = manifest.getMainAttributes();
analyze(); Manifest manifest = new Manifest(); Attributes main = manifest.getMainAttributes();
analyzer.setExportPackage(s); analyzer.analyze();
/** * Intercept the call to analyze and cleanup versions after we have analyzed * the setup. We do not want to cleanup if we are going to verify. */ @Override public void analyze() throws Exception { super.analyze(); cleanupVersion(getImports(), null); cleanupVersion(getExports(), getVersion()); String version = getProperty(BUNDLE_VERSION); if (version != null) { version = cleanupVersion(version); version = doSnapshot(version); setProperty(BUNDLE_VERSION, version); } }
/** * Intercept the call to analyze and cleanup versions after we have analyzed * the setup. We do not want to cleanup if we are going to verify. */ @Override public void analyze() throws Exception { super.analyze(); cleanupVersion(getImports(), null); cleanupVersion(getExports(), getVersion()); String version = getProperty(BUNDLE_VERSION); if (version != null) { version = cleanupVersion(version); version = doSnapshot(version); setProperty(BUNDLE_VERSION, version); } }