當前位置: 首頁>>代碼示例>>Java>>正文


Java RoundEnvironment.errorRaised方法代碼示例

本文整理匯總了Java中javax.annotation.processing.RoundEnvironment.errorRaised方法的典型用法代碼示例。如果您正苦於以下問題:Java RoundEnvironment.errorRaised方法的具體用法?Java RoundEnvironment.errorRaised怎麽用?Java RoundEnvironment.errorRaised使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.annotation.processing.RoundEnvironment的用法示例。


在下文中一共展示了RoundEnvironment.errorRaised方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: process

import javax.annotation.processing.RoundEnvironment; //導入方法依賴的package包/類
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
    round++;

    if (round == 0) {
        RealmVersionChecker.getInstance(processingEnv).executeRealmVersionUpdate();
    }

    if (roundEnv.errorRaised()) { return true; }

    if (!hasProcessedModules) {
        Utils.initialize(processingEnv);

        if (!processAnnotations(roundEnv)) { return true; }

        hasProcessedModules = true;
        if (!processModules(roundEnv)) { return true; }
    }

    if (roundEnv.processingOver()) {
        if (!validateBacklinks()) { return true; }
    }

    return CONSUME_ANNOTATIONS;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:26,代碼來源:RealmProcessor.java

示例2: process

import javax.annotation.processing.RoundEnvironment; //導入方法依賴的package包/類
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
	if (!roundEnv.errorRaised() && !roundEnv.processingOver()) {
		processRound(annotations, roundEnv);
	}
	return false;
}
 
開發者ID:commsen,項目名稱:EM,代碼行數:8,代碼來源:ContractsAnnotationProcessor.java

示例3: process

import javax.annotation.processing.RoundEnvironment; //導入方法依賴的package包/類
@Override
public final boolean process(Set<? extends TypeElement> annotations, RoundEnvironment round) {
  try {
    StaticEnvironment.init(annotations, round, processingEnv);
    if (!round.processingOver() && !round.errorRaised()) {
      process();
    }
    StaticEnvironment.shutdown();
  } catch (Exception ex) {
    processingEnv.getMessager()
        .printMessage(Diagnostic.Kind.ERROR,
            getClass().getName() + " threw " + Throwables.getStackTraceAsString(ex));
  }
  return false;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:16,代碼來源:AbstractGenerator.java

示例4: process

import javax.annotation.processing.RoundEnvironment; //導入方法依賴的package包/類
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment round) {
  if (!round.processingOver() && !round.errorRaised()) {
    processTemplates(round.getElementsAnnotatedWith(Generator.Template.class));
  }
  return true;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:8,代碼來源:Processor.java

示例5: process

import javax.annotation.processing.RoundEnvironment; //導入方法依賴的package包/類
public @Override final boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
    if (roundEnv.errorRaised()) {
        return false;
    }
    if (roundEnv.processingOver()) {
        writeServices();
        outputFilesByProcessor.clear();
        originatingElementsByProcessor.clear();
        return true;
    } else {
        return handleProcess(annotations, roundEnv);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:14,代碼來源:AbstractServiceProviderProcessor.java

示例6: process

import javax.annotation.processing.RoundEnvironment; //導入方法依賴的package包/類
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
    try {
        LOG.log(INFO, () -> String.format("P: Processing Annotations %s (isOver=%b)", annotations, roundEnv.processingOver()));
        if (roundEnv.processingOver() && !roundEnv.errorRaised()) {
            LOG.info(() -> "P: processing over. Start rendering.");
            new TSRenderer(processingEnv, typeScriptModel).writeFiles();
        } else if (roundEnv.processingOver() && roundEnv.errorRaised()) {
            LOG.info(() -> "P: processing over. error raised. nothing to do");
        } else {
            PROCESSING_ORDER.forEach(
                    (x) -> {
                        final Optional<? extends TypeElement> annotation = annotations
                                .stream()
                                .filter((y) -> y.getSimpleName().contentEquals(x.getSimpleName()))
                                .findFirst();
                        LOG.finest(() -> String.format("P: Annotation %s member %s", x, annotation.isPresent()));
                        annotation.ifPresent(typeElement -> processElements(typeElement, roundEnv));
                    }
            );
        }
    } catch (Exception e) {
        this.processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "internal error in jtsgen " + e);
        System.err.println("FATAL error in jtsgen. Please file an issue with the following stack trace @ https://github.com/dzuvic/jtsgen/issues");
        e.printStackTrace();
    }

    return true;
}
 
開發者ID:dzuvic,項目名稱:jtsgen,代碼行數:29,代碼來源:TsGenProcessor.java


注:本文中的javax.annotation.processing.RoundEnvironment.errorRaised方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。