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> @Nullable 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
(@Nullable U unifiable, @Nullable T target) unifications
(@Nullable List<U> toUnify, @Nullable List<? extends T> targets) unifications
(@Nullable List<U> toUnify, @Nullable List<? extends T> targets, boolean allowVarargs) Returns all successful unification paths from the specifiedUnifier
unifying the specified lists, disallowing varargs.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.unifyNullable
(Unifier unifier, @Nullable U unifiable, @Nullable 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
-
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.
-