@Override public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); mFiler = processingEnv.getFiler(); mElementUtils = processingEnv.getElementUtils(); mMessager = processingEnv.getMessager(); mIsFileCreated = false; }
@Override public Set<String> getSupportedOptions() { return instance.getSupportedOptions(); }
@Override public Set<String> getSupportedAnnotationTypes() { return instance.getSupportedAnnotationTypes(); }
@Override public void init(final ProcessingEnvironment processingEnv) { super.init(processingEnv); filer = processingEnv.getFiler(); }
@Override public Set<String> getSupportedAnnotationTypes() { @Nullable SupportedAnnotations annotations = getClass().getAnnotation(Generator.SupportedAnnotations.class); if (annotations != null) { Set<String> annotationNames = Sets.newHashSet(); for (Class<?> c : annotations.value()) { annotationNames.add(c.getCanonicalName()); } return ImmutableSet.copyOf(annotationNames); } return super.getSupportedAnnotationTypes(); }
@Override public Set<String> getSupportedOptions() { Set<String> supportedOptions = new HashSet<>(super.getSupportedOptions()); supportedOptions.add(DEBUG_OPTION); supportedOptions.add(GWTP_MODULE_OPTION); return supportedOptions; }
/** * Returns the annotation types supported by the super class, and adds * {@code "picocli.*"} if necessary. * Subclasses can omit the {@code @SupportedAnnotationTypes("picocli.*")} annotation, * but add other annotations if desired. * * @return the set of supported annotation types, with at least {@code "picocli.*"} */ @Override public Set<String> getSupportedAnnotationTypes() { Set<String> result = super.getSupportedAnnotationTypes(); if (!result.contains("picocli.*")) { result = new TreeSet<String>(result); result.add("picocli.*"); } return result; }
@Override public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); seenElements.clear(); }
@Override public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); mUtils = processingEnv.getElementUtils(); mFiler = processingEnv.getFiler(); }
@Override public synchronized void init(ProcessingEnvironment processingEnvironment) { super.init(processingEnvironment); mFileUtils = processingEnv.getFiler(); mElementUtils = processingEnv.getElementUtils(); mMessager = processingEnv.getMessager(); }
@Override public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); embeddedTypes = new LinkedHashMap<>(); generatedModelPackages = new LinkedHashSet<>(); graphs = new LinkedHashMap<>(); superTypes = new LinkedHashMap<>(); }
public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); String path = processingEnv.getOptions().get(GENERATE_PATH_KEY);// use javac complie options -AmotanGeneratePath=xxx if (path != null) { TARGET_DIR = path; } else { //use jvm option -DmotanGeneratePath=xxx TARGET_DIR = System.getProperty(GENERATE_PATH_KEY, "target/generated-sources/annotations/"); } }
@Override public synchronized void init(ProcessingEnvironment processingEnvironment) { super.init(processingEnvironment); filer = processingEnvironment.getFiler(); types = processingEnvironment.getTypeUtils(); elements = processingEnvironment.getElementUtils(); }
/** {@inheritDoc} */ @Override public void init(ProcessingEnvironment procEnv) { super.init(procEnv); if (System.getProperty("lombok.disable") != null) { return; } procEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "Wrong usage of 'lombok.javac.apt.Processor'. " + report(procEnv)); }
@Override public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); filer = processingEnv.getFiler(); messager = processingEnv.getMessager(); documentor = new Documentor(processingEnv); }
@Override public void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); Map<String, String> options = processingEnv.getOptions(); boolean isGeneratingAbi = Boolean.valueOf(options.getOrDefault("com.facebook.buck.java.generating_abi", "false")); if (isGeneratingAbi) { mRunMode.add(RunMode.ABI); } boolean generateBuckHotswapCode = Boolean.valueOf(options.getOrDefault("com.facebook.litho.hotswap", "false")); if (generateBuckHotswapCode) { mRunMode.add(RunMode.HOTSWAP); } }
@Override public synchronized void init(ProcessingEnvironment env) { super.init(env); Elements elementUtils = env.getElementUtils(); typeUtils = env.getTypeUtils(); filer = env.getFiler(); TYPE_FRAGMENT = elementUtils.getTypeElement("android.app.Fragment"); TYPE_SUPPORT_FRAGMENT = elementUtils.getTypeElement("android.support.v4.app.Fragment"); TYPE_ANDROIDX_FRAGMENT = elementUtils.getTypeElement("androidx.fragment.app.Fragment"); }
@Override public synchronized void init(ProcessingEnvironment env) { super.init(env); mElementUtils = env.getElementUtils(); mTypeUtils = env.getTypeUtils(); mFiler = env.getFiler(); mJsonObjectMap = new HashMap<>(); mProcessors = Processor.allProcessors(processingEnv); }
/** {@inheritDoc} */ @Override public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); try { FileObject manifest = processingEnv .getFiler() .createResource(StandardLocation.SOURCE_OUTPUT, "", "bugPatterns.txt"); pw = new PrintWriter(new OutputStreamWriter(manifest.openOutputStream(), UTF_8)); } catch (IOException e) { throw new RuntimeException(e); } }