Class SokletProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
com.soklet.SokletProcessor
- All Implemented Interfaces:
Processor
Soklet's standard Annotation Processor which is used to generate lookup tables of Resource Method definitions at compile time as well as prevent usage errors that are detectable by static analysis.
This Annotation Processor ensures Resource Methods annotated with ServerSentEventSource are declared as returning an instance of HandshakeResult.
Your build system should ensure this Annotation Processor is available at compile time. Follow the instructions below to make your application conformant:
Using javac directly:
javac -parameters -processor com.soklet.SokletProcessor ...[rest of javac command elided]Using Maven:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>...</version>
<configuration>
<release>...</release>
<compilerArgs>
<!-- Rest of args elided -->
<arg>-parameters</arg>
<arg>-processor</arg>
<arg>com.soklet.SokletProcessor</arg>
</compilerArgs>
</configuration>
</plugin>
Using Gradle:
def sokletVersion = "2.0.0" // (use your actual version)
dependencies {
// Soklet used by your code at compile/run time
implementation "com.soklet:soklet:${sokletVersion}"
// Same artifact also provides the annotation processor
annotationProcessor "com.soklet:soklet:${sokletVersion}"
// If tests also need processing (optional)
testAnnotationProcessor "com.soklet:soklet:${sokletVersion}"
}- Author:
- Mark Allen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(ProcessingEnvironment processingEnv) booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Methods inherited from class AbstractProcessor
getCompletions, getSupportedOptions
-
Constructor Details
-
SokletProcessor
public SokletProcessor()
-
-
Method Details
-
init
- Specified by:
initin interfaceProcessor- Overrides:
initin classAbstractProcessor
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypesin interfaceProcessor- Overrides:
getSupportedAnnotationTypesin classAbstractProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersionin interfaceProcessor- Overrides:
getSupportedSourceVersionin classAbstractProcessor
-
process
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-