public static final String app(@NotNull Application _app) { final StringBuilder b = new StringBuilder(); b.append(apps()).append("/"); b.append(_app.getMvnGroup()).append("/").append(_app.getArtifact()).append("/").append(_app.getVersion()); return b.toString(); }
@Override public int compareTo(Object _other) { if(_other==null || !(_other instanceof Application)) throw new IllegalArgumentException(); int v = this.getMvnGroup().compareTo(((Application)_other).getMvnGroup()); if(v==0) v = this.getArtifact().compareTo(((Application)_other).getArtifact()); if(v==0) v = this.getVersion().compareTo(((Application)_other).getVersion()); return v; }
public String toString(boolean _deep) { final StringBuilder builder = new StringBuilder(); if(_deep) { builder.append("Application ").append(this.toString(false)).append(System.getProperty("line.separator")); if(this.getConstructs()!=null) for(ConstructId cid: this.getConstructs()) builder.append(" ConstructId ").append(cid).append(System.getProperty("line.separator")); } else { builder.append("[").append(this.getMvnGroup()).append(":").append(this.getArtifact()).append(":").append(this.getVersion()).append("]"); } return builder.toString(); } }
/** * vulas-cia:/constructs()/{group}/{artifact}/{version}/{type}/{qname}/ast * @return */ public static final String constructSignature(@NotNull Application _lib, @NotNull com.sap.psr.vulas.shared.json.model.ConstructId _cid) { final StringBuilder b = new StringBuilder(); b.append(constructs()); b.append("/").append(_lib.getMvnGroup()); b.append("/").append(_lib.getArtifact()); b.append("/").append(_lib.getVersion()); b.append("/").append(_cid.getType().toString()); b.append("/").append(_cid.getQname()); b.append("/ast"); return b.toString(); }
private boolean isAmongAggregatedModules(LibraryId _libid) { for(Application prj: this.modules) { if(prj.getMvnGroup().equals(_libid.getMvnGroup()) && prj.getArtifact().equals(_libid.getArtifact()) && prj.getVersion().equals(_libid.getVersion())) return true; } return false; }
_code.append("\"").append(_cv.getAppContext().getMvnGroup()).append("\","); _code.append("\"").append(_cv.getAppContext().getArtifact()).append("\","); _code.append("\"").append(_cv.getAppContext().getVersion()).append("\",");
_code.append("\"").append(_cv.getAppContext().getMvnGroup()).append("\","); _code.append("\"").append(_cv.getAppContext().getArtifact()).append("\","); _code.append("\"").append(_cv.getAppContext().getVersion()).append("\",");
cfg.setProperty(CoreConfiguration.APP_CTX_GROUP, JarAnalyzer.getAppContext().getMvnGroup()); cfg.setProperty(CoreConfiguration.APP_CTX_ARTIF, JarAnalyzer.getAppContext().getArtifact()); cfg.setProperty(CoreConfiguration.APP_CTX_VERSI, JarAnalyzer.getAppContext().getVersion()); tmp_file = Files.createTempFile("vulas-core-", ".properties"); cfg.save(tmp_file.toFile());
_code.append("\"").append(_cv.getAppContext().getMvnGroup()).append("\","); _code.append("\"").append(_cv.getAppContext().getArtifact()).append("\","); _code.append("\"").append(_cv.getAppContext().getVersion()).append("\",");
_code.append("\"").append(_cv.getAppContext().getMvnGroup()).append("\","); _code.append("\"").append(_cv.getAppContext().getArtifact()).append("\","); _code.append("\"").append(_cv.getAppContext().getVersion()).append("\",");
this.jarWriter.addManifestEntry("VULAS-appContext", JarAnalyzer.getAppContext().getMvnGroup() + ":" + JarAnalyzer.getAppContext().getArtifact() + ":" + JarAnalyzer.getAppContext().getVersion());
/** * See here: http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html * @throws JarAnalysisException */ protected void createInstrumentedArchive() throws JarAnalysisException { // Additional manifest file entries this.jarWriter.addManifestEntry("VULAS-classInstrStats", "[" + this.classCount + " total, " + this.instrControl.countClassesInstrumentedAlready() + " existed, " + this.instrControl.countClassesInstrumentedSuccess() + " ok, " + this.instrControl.countClassesInstrumentedFailure() + " err]"); this.jarWriter.addManifestEntry("VULAS-constructStats", "[" + constructs.size() + " constructs]"); if(JarAnalyzer.getAppContext()!=null) this.jarWriter.addManifestEntry("VULAS-appContext", JarAnalyzer.getAppContext().getMvnGroup() + ":" + JarAnalyzer.getAppContext().getArtifact() + ":" + JarAnalyzer.getAppContext().getVersion()); // Register this JarAnalyzer for callbacks this.jarWriter.register(".*.class$", this); // Rename if(this.rename) this.jarWriter.setClassifier("vulas-instr"); // Rewrite this.jarWriter.rewrite(this.workDir); // Stats this.instrControl.logStatistics(); }