in support/camel-k-apt/src/main/java/org/apache/camel/k/tooling/apt/CamelProcessor.java [78:98]
private Path output(String fmt, Object... args) {
try {
FileObject result;
try {
result = processingEnv.getFiler().getResource(StandardLocation.CLASS_OUTPUT, "", String.format(fmt, args));
} catch (IOException e) {
result = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", String.format(fmt, args));
}
Path answer = Paths.get(result.toUri());
if (!Files.exists(answer.getParent())) {
Files.createDirectories(answer.getParent());
}
return answer;
} catch (IOException e) {
throw new RuntimeException(e);
}
}