@SupportedAnnotationTypes(value={"de.thomas_oster.lazysql.annotations.LazySQLSelect","de.thomas_oster.lazysql.annotations.LazySQLConfig","de.thomas_oster.lazysql.annotations.LazySQLUpdate","de.thomas_oster.lazysql.annotations.LazySQLExec","de.thomas_oster.lazysql.annotations.LazySQLUpsert","de.thomas_oster.lazysql.annotations.LazySQLInsert","de.thomas_oster.lazysql.annotations.LazySQLStoredProcedure","de.thomas_oster.layzsql.annotations.Returns"}) @AutoService(value=javax.annotation.processing.Processor.class) public class LazySQLProcessor extends AbstractProcessor
processingEnv| Constructor and Description |
|---|
LazySQLProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkIfAllArgumentsAreUsed(String sql,
List<Argument> arguments,
Element element)
Prüft ob alle Parameter in der SQL Query vorkommen und gibt sonst eine
Fehlermeldung an dem Element aus
|
static void |
debugLog(String text) |
Iterable<? extends Completion> |
getCompletions(Element element,
AnnotationMirror annotation,
ExecutableElement member,
String userText) |
SourceVersion |
getSupportedSourceVersion() |
void |
init(ProcessingEnvironment pe) |
boolean |
process(Set<? extends TypeElement> set,
RoundEnvironment roundEnvironment) |
String |
replaceArgumentsAndListOrder(String query,
List<Argument> parameters,
List<Argument> argumentsInQueryOrder)
Replaces all :Argument strings in the SQL query with ?
|
getSupportedAnnotationTypes, getSupportedOptions, isInitializedpublic String replaceArgumentsAndListOrder(String query, List<Argument> parameters, List<Argument> argumentsInQueryOrder) throws Argument.MismatchException
query - parameters - List with possible argumentsargumentsInQueryOrder - Result List with Arguemtns in query orderArgument.MismatchExceptionpublic Iterable<? extends Completion> getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText)
getCompletions in interface ProcessorgetCompletions in class AbstractProcessorpublic static void debugLog(String text)
public void checkIfAllArgumentsAreUsed(String sql, List<Argument> arguments, Element element) throws ElementException
sql - arguments - element - ElementExceptionpublic boolean process(Set<? extends TypeElement> set, RoundEnvironment roundEnvironment)
process in interface Processorprocess in class AbstractProcessorpublic void init(ProcessingEnvironment pe)
init in interface Processorinit in class AbstractProcessorpublic SourceVersion getSupportedSourceVersion()
getSupportedSourceVersion in interface ProcessorgetSupportedSourceVersion in class AbstractProcessorCopyright © 2019. All rights reserved.