@SupportedSourceVersion(value=RELEASE_6) public class JapkitProcessor extends AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
protected Elements |
elementUtils |
protected Types |
typeUtils |
| Constructor and Description |
|---|
JapkitProcessor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cleanupServices() |
HashSet<TypeElement> |
filterLayer(Iterable<TypeElement> elements,
int l) |
Iterable<Set<TypeElement>> |
findCyclesInAnnotatedClasses(Set<TypeElement> annotatedClasses)
Finds cycles in annotated classes.
|
Integer |
getLayer(TypeElement annotatedClass) |
Integer |
getMinLayer(Set<TypeElement> annotatedClasses) |
Set<String> |
getSupportedAnnotationTypes() |
Set<String> |
getSupportedOptions() |
List<org.eclipse.xtext.xbase.lib.Pair<AnnotationMirror,Boolean>> |
getTriggerAnnotationsAndShadowFlag(TypeElement annotatedClass) |
void |
init(ProcessingEnvironment processingEnv) |
boolean |
initServices() |
void |
printAllErrors() |
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) |
Map<GenTypeElement,TypeElement> |
processAnnotatedClass(TypeElement annotatedClass) |
void |
processClassesAndWriteTypeElements(Set<TypeElement> classesToProcess,
boolean isCycle,
Map<TypeElement,Set<GenTypeElement>> generatedTypeElementsInCurrentRound,
Set<TypeElement> annotatedClassesToDefer,
Set<GenTypeElement> writtenTypeElementsInCurrentRound) |
void |
processClassesWithCycles(Set<TypeElement> classesToProcess,
Map<TypeElement,Set<GenTypeElement>> generatedTypeElementsInCurrentRound,
Set<TypeElement> annotatedClassesToDefer,
HashSet<GenTypeElement> writtenTypeElementsInCurrentRound) |
boolean |
processLayerAsFarAsPossible(HashSet<TypeElement> annotatedClassesToDefer,
HashSet<TypeElement> classesInCurrentRound,
int layer,
HashSet<GenTypeElement> writtenTypeElementsInCurrentRound) |
void |
writeClassesWithPermanentTypeErrors(Set<TypeElement> classesToProcess,
Map<TypeElement,Set<GenTypeElement>> generatedTypeElementsInCurrentRound,
HashSet<TypeElement> annotatedClassesToDefer,
HashSet<GenTypeElement> writtenTypeElementsInCurrentRound,
boolean alsoWriteClassesThatDependOnUnknownTypes) |
boolean |
writeSourceFile(TypeElement typeElement,
TypeElement orgClass) |
Object |
writeSourceFileAndCommitTypeElement(GenTypeElement genTypeElement,
TypeElement original,
Set<GenTypeElement> writtenTypeElementsInCurrentRound) |
getCompletions, getSupportedSourceVersion, isInitializedpublic void init(ProcessingEnvironment processingEnv)
init in interface Processorinit in class AbstractProcessorpublic boolean initServices()
public boolean cleanupServices()
public Set<String> getSupportedAnnotationTypes()
getSupportedAnnotationTypes in interface ProcessorgetSupportedAnnotationTypes in class AbstractProcessorpublic Set<String> getSupportedOptions()
getSupportedOptions in interface ProcessorgetSupportedOptions in class AbstractProcessorpublic boolean process(Set<? extends TypeElement> annotations, @Extension RoundEnvironment roundEnv)
process in interface Processorprocess in class AbstractProcessorpublic Integer getMinLayer(Set<TypeElement> annotatedClasses)
public Integer getLayer(TypeElement annotatedClass)
public HashSet<TypeElement> filterLayer(Iterable<TypeElement> elements, int l)
public boolean processLayerAsFarAsPossible(HashSet<TypeElement> annotatedClassesToDefer, HashSet<TypeElement> classesInCurrentRound, int layer, HashSet<GenTypeElement> writtenTypeElementsInCurrentRound)
public void writeClassesWithPermanentTypeErrors(Set<TypeElement> classesToProcess, Map<TypeElement,Set<GenTypeElement>> generatedTypeElementsInCurrentRound, HashSet<TypeElement> annotatedClassesToDefer, HashSet<GenTypeElement> writtenTypeElementsInCurrentRound, boolean alsoWriteClassesThatDependOnUnknownTypes)
public void processClassesWithCycles(Set<TypeElement> classesToProcess, Map<TypeElement,Set<GenTypeElement>> generatedTypeElementsInCurrentRound, Set<TypeElement> annotatedClassesToDefer, HashSet<GenTypeElement> writtenTypeElementsInCurrentRound)
public Iterable<Set<TypeElement>> findCyclesInAnnotatedClasses(Set<TypeElement> annotatedClasses)
public void processClassesAndWriteTypeElements(Set<TypeElement> classesToProcess, boolean isCycle, Map<TypeElement,Set<GenTypeElement>> generatedTypeElementsInCurrentRound, Set<TypeElement> annotatedClassesToDefer, Set<GenTypeElement> writtenTypeElementsInCurrentRound)
public void printAllErrors()
public Object writeSourceFileAndCommitTypeElement(GenTypeElement genTypeElement, TypeElement original, Set<GenTypeElement> writtenTypeElementsInCurrentRound)
public Map<GenTypeElement,TypeElement> processAnnotatedClass(TypeElement annotatedClass)
public List<org.eclipse.xtext.xbase.lib.Pair<AnnotationMirror,Boolean>> getTriggerAnnotationsAndShadowFlag(TypeElement annotatedClass)
public boolean writeSourceFile(TypeElement typeElement, TypeElement orgClass)
Copyright © 2018. All rights reserved.