List of usage examples for javax.annotation.processing Filer getResource
FileObject getResource(JavaFileManager.Location location, CharSequence moduleAndPkg, CharSequence relativeName)
throws IOException;
From source file:cop.raml.processor.RestProcessor.java
@NotNull private static Config getConfig() { Filer filter = ThreadLocalContext.getProcessingEnv().getFiler(); if (filter == null) return Config.NULL; try (InputStream in = filter.getResource(StandardLocation.CLASS_OUTPUT, "", Config.YAML) .openInputStream()) {//from ww w . j av a 2s. c o m return Config.builder().parse(IOUtils.toString(in, StandardCharsets.UTF_8)).build(); } catch (Exception e) { ThreadLocalContext.getMessager().printMessage(ERROR, String.format("Cannot read YAML config: '%s'", e.getMessage())); return Config.NULL; } }