Uses of Class
com.google.errorprone.refaster.Choice
-
Uses of Choice in com.google.errorprone.refaster
Modifier and TypeClassDescriptionclass
UTree<T extends com.sun.tools.javac.tree.JCTree>
A serializable representation of a template syntax tree which can be unified with a target AST and inlined based on a set of substitutions.class
A serializable representation of a type template, used for enforcing type constraints on target ASTs.Modifier and TypeMethodDescriptionstatic <T> Choice
<T> Choice.any
(Collection<Choice<T>> choices) Returns a choice between any of the options from any of the specified choices.Choice.condition
(boolean condition) Returns this choice ifcondition
, otherwise the empty choice.static <T> Choice
<T> Choice.condition
(boolean condition, T t) Returns aChoice
witht
as an option ifcondition
, and no options otherwise.Filters the choices to those that satisfy the providedPredicate
.UAnyOf.defaultAction
(com.sun.source.tree.Tree tree, Unifier unifier) UFreeIdent.defaultAction
(com.sun.source.tree.Tree target, Unifier unifier) UMethodIdent.defaultAction
(com.sun.source.tree.Tree node, Unifier unifier) UPlaceholderExpression.defaultAction
(com.sun.source.tree.Tree node, Unifier unifier) UStaticIdent.defaultAction
(com.sun.source.tree.Tree node, Unifier unifier) UTree.defaultAction
(com.sun.source.tree.Tree node, Unifier unifier) static <T> Choice
<T> Choice.from
(Collection<T> choices) static <T> Choice
<T> Choice.fromOptional
(com.google.common.base.Optional<T> optional) Returns a choice of the optional value, if it is present, or the empty choice if it is absent.static <T> Choice
<T> Choice.none()
The emptyChoice
.static <T> Choice
<T> Choice.of
(T t) Returns aChoice
with only one option,t
.Returns a choice of the options from thisChoice
or fromother
.<R> Choice
<R> Choice.thenChoose
(com.google.common.base.Function<? super T, Choice<R>> function) Returns all the choices obtained by choosing from thisChoice
and then choosing from theChoice
yielded by this function on the result.<R> Choice
<R> Choice.thenOption
(com.google.common.base.Function<? super T, com.google.common.base.Optional<R>> function) Returns all the choices obtained by choosing from thisChoice
and yielding a presentOptional
.<R> Choice
<R> Maps the choices with the specified function.Returns all valid unification paths (if any) from thisUnifier
that unify this withtarget
.Returns all successful unification paths from the specifiedUnifier
unifying the specified lists, disallowing varargs.Unifier.unifyList
(Unifier unifier, @Nullable List<U> toUnify, @Nullable List<? extends T> targets, boolean allowVarargs) Returns all successful unification paths from the specifiedUnifier
unifying the specified lists, allowing varargs if and only ifallowVarargs
is true.Unifier.unifyNullable
(Unifier unifier, @Nullable U unifiable, @Nullable T target) UClassType.visitClassType
(com.sun.tools.javac.code.Type.ClassType classType, Unifier unifier) UIntersectionClassType.visitClassType
(com.sun.tools.javac.code.Type.ClassType t, Unifier unifier) UForAll.visitForAll
(com.sun.tools.javac.code.Type.ForAll target, Unifier unifier) UFreeIdent.visitIdentifier
(com.sun.source.tree.IdentifierTree node, Unifier unifier) UMemberSelect.visitIdentifier
(com.sun.source.tree.IdentifierTree ident, Unifier unifier) ULiteral.visitLiteral
(com.sun.source.tree.LiteralTree literal, Unifier unifier) UMemberSelect.visitMemberSelect
(com.sun.source.tree.MemberSelectTree fieldAccess, Unifier unifier) UMethodInvocation.visitMethodInvocation
(com.sun.source.tree.MethodInvocationTree methodInvocation, @Nullable Unifier unifier) UMethodType.visitMethodType
(com.sun.tools.javac.code.Type.MethodType methodTy, @Nullable Unifier unifier) UReturn.visitReturn
(com.sun.source.tree.ReturnTree ret, @Nullable Unifier unifier) UVariableDecl.visitVariable
(com.sun.source.tree.VariableTree decl, Unifier unifier) Modifier and TypeMethodDescriptionUnifier.unifications
(@Nullable U unifiable, @Nullable T target) Unifier.unifications
(@Nullable List<U> toUnify, @Nullable List<? extends T> targets) Unifier.unifications
(@Nullable List<U> toUnify, @Nullable List<? extends T> targets, boolean allowVarargs) Modifier and TypeMethodDescriptionReturns a choice of the options from thisChoice
or fromother
.Modifier and TypeMethodDescriptionstatic <T> Choice
<T> Choice.any
(Collection<Choice<T>> choices) Returns a choice between any of the options from any of the specified choices.<R> Choice
<R> Choice.thenChoose
(com.google.common.base.Function<? super T, Choice<R>> function) Returns all the choices obtained by choosing from thisChoice
and then choosing from theChoice
yielded by this function on the result.