当前位置: 首页>>代码示例>>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;未经允许,请勿转载。