/** * Returns the current phase of the {@link JavaSource}. * @return {@link JavaSource.Phase} the state which was reached by the {@link JavaSource}. */ public @NonNull JavaSource.Phase getPhase() { checkConfinement(); return this.impl.getPhase(); }
JavaSource.Phase currentPhase = getPhase(); if (currentPhase.compareTo(phase)<0) { setPhase(phase);
JavaSource.Phase parserError = currentInfo.parserCrashed; assert parserError != null; Phase currentPhase = currentInfo.getPhase(); try { if (currentPhase.compareTo(Phase.PARSED)<0 && phase.compareTo(Phase.PARSED)>=0 && phase.compareTo(parserError)<=0) {
final Phase currentPhase = ci.getPhase(); if (Phase.PARSED.compareTo(currentPhase) > 0) { return false;
/** * Returns tree which was reparsed by an incremental reparse. * When the source file wasn't parsed yet or the parse was a full parse * this method returns null. * <p class="nonnormative"> * Currently the leaf tree is a MethodTree but this may change in the future. * Client of this method is responsible to check the corresponding TreeKind * to find out if it may perform on the changed subtree or it needs to * reprocess the whole tree. * </p> * @return {@link TreePath} or null * @since 0.31 */ public @CheckForNull @CheckReturnValue TreePath getChangedTree () { checkConfinement(); if (JavaSource.Phase.PARSED.compareTo (impl.getPhase())>0) { return null; } final Pair<DocPositionRegion,MethodTree> changedTree = impl.getChangedTree(); if (changedTree == null) { return null; } final CompilationUnitTree cu = impl.getCompilationUnit(); if (cu == null) { return null; } return TreePath.getPath(cu, changedTree.second()); }
JavacParserResult result = null; if (isParserResultTask) { final JavaSource.Phase currentPhase = ciImpl.getPhase(); JavaSource.Phase requiredPhase; if (isJavaParserResultTask) {