com.mageddo.rawstringliterals.MultilineProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rsl-compiler Show documentation
Show all versions of rsl-compiler Show documentation
String multiline support for Java without all concatenation and stuff
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 extends TypeElement> annotations, final RoundEnvironment roundEnv) {
if (this.delegate == null) {
return true;
}
return delegate.process(annotations, roundEnv);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy