本文整理汇总了Java中com.google.errorprone.annotations.ForOverride类的典型用法代码示例。如果您正苦于以下问题:Java ForOverride类的具体用法?Java ForOverride怎么用?Java ForOverride使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ForOverride类属于com.google.errorprone.annotations包,在下文中一共展示了ForOverride类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNumRepetitions
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/**
* Returns the number of times the pass should be run before results are
* verified.
*/
@ForOverride
protected int getNumRepetitions() {
// Since most compiler passes should be idempotent, we run each pass twice
// by default.
return 2;
}
示例2: getCode
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/**
* {@link #doFormatInitialStatements} and {@link CodeChunk.WithValue#doFormatOutputExpr} are the
* main methods subclasses should override to control their formatting. Subclasses should only
* override this method in the special case that a code chunk needs to control its formatting when
* it is the only chunk being serialized. TODO(brndn): only one override, can probably be declared
* final.
*
* @param startingIndent The indent level of the foreign code into which this code will be
* inserted. This doesn't affect the correctness of the composed code, only its readability.
*/
@ForOverride
String getCode(int startingIndent) {
FormattingContext initialStatements = new FormattingContext(startingIndent);
initialStatements.appendInitialStatements(this);
FormattingContext outputExprs = new FormattingContext(startingIndent);
if (this instanceof WithValue) {
outputExprs.appendOutputExpression((WithValue) this);
outputExprs.append(';').endLine();
}
return initialStatements.concat(outputExprs).toString();
}
示例3: doFallback
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually run the fallback. */
@ForOverride
@Nullable
abstract T doFallback(F fallback, X throwable) throws Exception;
示例4: setResult
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually set the result. */
@ForOverride
abstract void setResult(@Nullable T result);
示例5: doTransform
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually run the transform. */
@ForOverride
@Nullable
abstract T doTransform(F function, @Nullable I result) throws Exception;
示例6: doFallback
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually run the fallback. */
@ForOverride
abstract T doFallback(F fallback, X throwable) throws Exception;
示例7: setResult
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually set the result. */
@ForOverride
abstract void setResult(T result);
示例8: doTransform
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually run the transform. */
@ForOverride
abstract T doTransform(F function, I result) throws Exception;
示例9: convert
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
@ForOverride
protected abstract E convert(long e);
示例10: matchResult
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
@ForOverride
protected abstract Optional<B> matchResult(ExpressionTree item, A baseResult, VisitorState state);
示例11: iterator
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
@ForOverride
protected abstract Iterator<T> iterator();
示例12: doFallback
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually run the fallback. */
@ForOverride
@NullableDecl
abstract T doFallback(F fallback, X throwable) throws Exception;
示例13: setResult
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually set the result. */
@ForOverride
abstract void setResult(@NullableDecl T result);
示例14: doTransform
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
/** Template method for subtypes to actually run the transform. */
@ForOverride
@NullableDecl
abstract T doTransform(F function, @NullableDecl I result) throws Exception;
示例15: getCodingConvention
import com.google.errorprone.annotations.ForOverride; //导入依赖的package包/类
@ForOverride
protected CodingConvention getCodingConvention() {
return new GoogleCodingConvention();
}