public boolean hasJARConstructs() { return this.getConstructIds().size()>0; }
@Override public Map<ConstructId, Construct> getConstructs() throws FileAnalysisException { if(this.constructBodies==null) { this.constructBodies = new TreeMap<ConstructId,Construct>(); for(ConstructId c: this.getConstructIds()) { this.constructBodies.put(c, new Construct(c, "")); } } return this.constructBodies; }
/** * Returns true if the construct is part of the archive, false otherwise. * @return */ private boolean isConstructInArchive() { return this.ja.getConstructIds().contains(JavaId.toCoreType(this.constructId)); }
/** * Returns true if the class of the construct is part of the archive, false otherwise. * @return */ private boolean isConstructClassInArchive() { return this.ja.getConstructIds().contains(JavaId.toCoreType(this.constructId).getDefinitionContext()); }
public List<com.sap.psr.vulas.shared.json.model.ConstructId> getSharedConstructs() throws FileAnalysisException { List<com.sap.psr.vulas.shared.json.model.ConstructId> l= new ArrayList<com.sap.psr.vulas.shared.json.model.ConstructId>(); for(ConstructId c: this.getConstructIds()) { l.add(new com.sap.psr.vulas.shared.json.model.ConstructId(ProgrammingLanguage.JAVA, c.getSharedType(),c.getQualifiedName())); } return l; }
/** * This method is called by {@link JarAnalysisManager}. */ public void run() { try { this.getSHA1(); this.getConstructIds(); this.getChilds(true); if(this.instrument) { try { this.createInstrumentedArchive(); } catch(JarAnalysisException jae) { JarAnalyzer.log.error(this.toString() + ": " + jae.getMessage()); } } } catch(Exception e) { JarAnalyzer.log.error(this.toString() + ": Error during analysis: " + e.getMessage()); // for(StackTraceElement el: e.getStackTrace()) // JarAnalyzer.log.error(" " + el.toString()); } }