本文整理匯總了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;
}