本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}