Package com.google.errorprone.refaster
Class Unifier
java.lang.Object
com.google.errorprone.refaster.Unifier
A mutable representation of an attempt to match a template source tree against a target source
tree.
- Author:
- Louis Wasserman
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearBinding
(Bindings.Key<?> key) fork()
Returns aUnifier
containing all the bindings from thisUnifier
, but which can succeed or fail independently of thisUnifier
.<V> V
getBinding
(Bindings.Key<V> key) com.sun.tools.javac.util.Context
<V> V
putBinding
(Bindings.Key<V> key, V value) <V> V
replaceBinding
(Bindings.Key<V> key, V value) com.sun.tools.javac.tree.JCTree.JCExpression
thisExpression
(com.sun.tools.javac.code.Type type) toString()
com.sun.tools.javac.code.Types
types()
unifications
(List<U> toUnify, List<? extends T> targets) unifications
(List<U> toUnify, List<? extends T> targets, boolean allowVarargs) unifications
(U unifiable, T target) Returns all successful unification paths from the specifiedUnifier
unifying the specified lists, disallowing varargs.Returns all successful unification paths from the specifiedUnifier
unifying the specified lists, allowing varargs if and only ifallowVarargs
is true.unifyNullable
(Unifier unifier, U unifiable, T target)
-
Constructor Details
-
Unifier
public Unifier(com.sun.tools.javac.util.Context context)
-
-
Method Details
-
fork
Returns aUnifier
containing all the bindings from thisUnifier
, but which can succeed or fail independently of thisUnifier
. -
types
public com.sun.tools.javac.code.Types types() -
thisExpression
public com.sun.tools.javac.tree.JCTree.JCExpression thisExpression(com.sun.tools.javac.code.Type type) -
createInliner
-
getBinding
-
putBinding
-
replaceBinding
-
clearBinding
-
getBindings
-
getContext
public com.sun.tools.javac.util.Context getContext() -
toString
-
unifications
-
unifyNullable
-
unifications
-
unifications
-
unifyList
public static <T,U extends Unifiable<? super T>> Choice<Unifier> unifyList(Unifier unifier, @Nullable List<U> toUnify, @Nullable List<? extends T> targets) Returns all successful unification paths from the specifiedUnifier
unifying the specified lists, disallowing varargs. -
unifyList
public static <T,U extends Unifiable<? super T>> Choice<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.
-