@SupportedSourceVersion(value=RELEASE_8) @SupportedAnnotationTypes(value="Obfuscate") @SupportedOptions(value={"net.truelicense.obfuscate.verbose","net.truelicense.obfuscate.processor.verbose"}) public class ObfuscateProcessor extends AbstractProcessor
@Obfuscate annotation.
Use this processor to enable compile time checking of annotated fields or if
you want (or need to) manually obfuscate their constant string values.
For every field which is annotated with @Obfuscate, this processor
asserts that it is not a member of an interface and has a constant string
value.
Otherwise, an error message is emitted.
If any of the processing options
net.truelicense.obfuscate.verbose or
net.truelicense.obfuscate.processor.verbose
is set to true (whereby case is ignored), then
for every field which is annotated with @Obfuscate, this processor
emits a note with an obfuscated Java source code expression which computes
the constant string value again.
You could copy-paste this note into the source code for manual substitution
if you don't want to (or cannot) use an automated build tool for this task.
processingEnv| Constructor and Description |
|---|
ObfuscateProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(ProcessingEnvironment processingEnv) |
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) |
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitializedpublic void init(ProcessingEnvironment processingEnv)
init in interface Processorinit in class AbstractProcessorpublic boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
process in interface Processorprocess in class AbstractProcessorCopyright © 2005–2018 Schlichtherle IT Services. All rights reserved.