public String getQualifiedName() { return classContext.getQualifiedName() + "." + JavaClassInit.NAME; }
/** * Reads the bytecode of the given {@link CtClass} and writes it to a temporary file. * @param _cid * @param _class * @return the temporary file to which the byte code has been written * @throws IOException */ private Path writeBytesToTmpFile(JavaClassId _cid, CtClass _class) throws IOException { final Path class_file = Files.createTempFile(VulasConfiguration.getGlobal().getTmpDir(), _cid.getQualifiedName(), ".class", new FileAttribute[] {}); FileUtil.writeToFile(class_file.toFile(), this.readBytes(_class)); return class_file; }
final CtClass ctclass = cp.get(class_id.getQualifiedName()); class_file = this.writeBytesToTmpFile(class_id, ctclass); signature = this.createSignature(_cid, class_file.toFile()); } catch (NotFoundException nfe) { throw new IllegalStateException("Error while searching class [" + class_id.getQualifiedName() + "]: " + nfe.getMessage()); } catch (IOException ioe) { throw new IllegalStateException("Error while writing temp file for construct [" + _cid.getQname() + "]: " + ioe.getMessage());