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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearBinding(Bindings.Key<?> key) fork()Returns aUnifiercontaining all the bindings from thisUnifier, but which can succeed or fail independently of thisUnifier.<V> @Nullable VgetBinding(Bindings.Key<V> key) com.sun.tools.javac.util.Context<V> VputBinding(Bindings.Key<V> key, V value) <V> VreplaceBinding(Bindings.Key<V> key, V value) com.sun.tools.javac.tree.JCTree.JCExpressionthisExpression(com.sun.tools.javac.code.Type type) toString()com.sun.tools.javac.code.Typestypes()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 specifiedUnifierunifying 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 specifiedUnifierunifying the specified lists, allowing varargs if and only ifallowVarargsis 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 aUnifiercontaining 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 specifiedUnifierunifying the specified lists, allowing varargs if and only ifallowVarargsis true.
-