Search in sources :

Example 1 with AndroidManifest

use of org.androidannotations.helper.AndroidManifest in project androidannotations by androidannotations.

the class AndroidAnnotationProcessor method processThrowing.

private void processThrowing(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) throws Exception {
    if (nothingToDo(annotations, roundEnv)) {
        return;
    }
    AnnotationElementsHolder extractedModel = extractAnnotations(annotations, roundEnv);
    AnnotationElementsHolder validatingHolder = extractedModel.validatingHolder();
    androidAnnotationsEnv.setValidatedElements(validatingHolder);
    try {
        AndroidManifest androidManifest = extractAndroidManifest();
        LOGGER.info("AndroidManifest.xml found: {}", androidManifest);
        IRClass rClass = findRClasses(androidManifest);
        androidAnnotationsEnv.setAndroidEnvironment(rClass, androidManifest);
    } catch (Exception e) {
        return;
    }
    AnnotationElements validatedModel = validateAnnotations(extractedModel, validatingHolder);
    ModelProcessor.ProcessResult processResult = processAnnotations(validatedModel);
    generateSources(processResult);
}
Also used : AnnotationElements(org.androidannotations.internal.model.AnnotationElements) AnnotationElementsHolder(org.androidannotations.internal.model.AnnotationElementsHolder) IRClass(org.androidannotations.rclass.IRClass) ModelProcessor(org.androidannotations.internal.process.ModelProcessor) AndroidManifest(org.androidannotations.helper.AndroidManifest) VersionNotFoundException(org.androidannotations.internal.exception.VersionNotFoundException) ValidationException(org.androidannotations.internal.exception.ValidationException) ProcessingException(org.androidannotations.internal.exception.ProcessingException) AndroidManifestNotFoundException(org.androidannotations.internal.exception.AndroidManifestNotFoundException) IOException(java.io.IOException) VersionMismatchException(org.androidannotations.internal.exception.VersionMismatchException) FileNotFoundException(java.io.FileNotFoundException) RClassNotFoundException(org.androidannotations.internal.exception.RClassNotFoundException)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 AndroidManifest (org.androidannotations.helper.AndroidManifest)1 AndroidManifestNotFoundException (org.androidannotations.internal.exception.AndroidManifestNotFoundException)1 ProcessingException (org.androidannotations.internal.exception.ProcessingException)1 RClassNotFoundException (org.androidannotations.internal.exception.RClassNotFoundException)1 ValidationException (org.androidannotations.internal.exception.ValidationException)1 VersionMismatchException (org.androidannotations.internal.exception.VersionMismatchException)1 VersionNotFoundException (org.androidannotations.internal.exception.VersionNotFoundException)1 AnnotationElements (org.androidannotations.internal.model.AnnotationElements)1 AnnotationElementsHolder (org.androidannotations.internal.model.AnnotationElementsHolder)1 ModelProcessor (org.androidannotations.internal.process.ModelProcessor)1 IRClass (org.androidannotations.rclass.IRClass)1