All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mageddo.rawstringliterals.MultilineProcessor Maven / Gradle / Ivy

The newest version!
package com.mageddo.rawstringliterals;

import com.mageddo.rawstringliterals.javac.ClassScannerJava;

import javax.annotation.processing.*;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.TypeElement;
import java.util.Set;

@SupportedAnnotationTypes(References.RAW_STRING_REF)
public final class MultilineProcessor extends AbstractProcessor {

	private Processor delegate;

	@Override
	public void init(final ProcessingEnvironment procEnv) {
		super.init(procEnv);
		delegate = new JavacMultilineProcessor(new ClassScannerJava());
		delegate.init(procEnv);
	}

	@Override
	public SourceVersion getSupportedSourceVersion() {
		return SourceVersion.latest();
	}

	@Override
	public boolean process(final Set annotations, final RoundEnvironment roundEnv) {
		if (this.delegate == null) {
			return true;
		}
		return delegate.process(annotations, roundEnv);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy