Package com.google.errorprone.refaster
Class Inliner
- java.lang.Object
-
- com.google.errorprone.refaster.Inliner
-
public final class Inliner extends Object
A context representing all the dependencies necessary to reconstruct a pretty-printable source tree from aUTree
based on a set of substitutions.- Author:
- Louis Wasserman
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addImport(String qualifiedImport)
void
addStaticImport(String qualifiedImport)
com.sun.tools.javac.util.Name
asName(CharSequence str)
com.sun.tools.javac.comp.Enter
enter()
<V> V
getBinding(Bindings.Key<V> key)
com.sun.tools.javac.util.Context
getContext()
com.google.common.collect.ImmutableSet<String>
getImportsToAdd()
<V> com.google.common.base.Optional<V>
getOptionalBinding(Bindings.Key<V> key)
com.google.common.collect.ImmutableSet<String>
getStaticImportsToAdd()
ImportPolicy
importPolicy()
com.sun.tools.javac.comp.Infer
infer()
com.sun.tools.javac.tree.JCTree.JCExpression
inlineAsTree(com.sun.tools.javac.code.Type type)
Inlines the syntax tree representing the specified type.com.sun.tools.javac.code.Type.TypeVar
inlineAsVar(UTypeVar var)
<R> com.sun.tools.javac.util.List<R>
inlineList(Iterable<? extends com.google.errorprone.refaster.Inlineable<? extends R>> elements)
com.sun.tools.javac.tree.TreeMaker
maker()
com.sun.tools.javac.util.Names
names()
com.sun.tools.javac.code.Symbol.ClassSymbol
resolveClass(CharSequence qualifiedClass)
com.sun.tools.javac.code.Symtab
symtab()
com.sun.tools.javac.code.Types
types()
-
-
-
Field Detail
-
bindings
public final Bindings bindings
-
-
Constructor Detail
-
Inliner
public Inliner(com.sun.tools.javac.util.Context context, Bindings bindings)
-
-
Method Detail
-
addImport
public void addImport(String qualifiedImport)
-
addStaticImport
public void addStaticImport(String qualifiedImport)
-
resolveClass
public com.sun.tools.javac.code.Symbol.ClassSymbol resolveClass(CharSequence qualifiedClass) throws CouldNotResolveImportException
- Throws:
CouldNotResolveImportException
-
getContext
public com.sun.tools.javac.util.Context getContext()
-
types
public com.sun.tools.javac.code.Types types()
-
symtab
public com.sun.tools.javac.code.Symtab symtab()
-
enter
public com.sun.tools.javac.comp.Enter enter()
-
names
public com.sun.tools.javac.util.Names names()
-
maker
public com.sun.tools.javac.tree.TreeMaker maker()
-
infer
public com.sun.tools.javac.comp.Infer infer()
-
importPolicy
public ImportPolicy importPolicy()
-
asName
public com.sun.tools.javac.util.Name asName(CharSequence str)
-
inlineAsTree
public com.sun.tools.javac.tree.JCTree.JCExpression inlineAsTree(com.sun.tools.javac.code.Type type)
Inlines the syntax tree representing the specified type.
-
getBinding
public <V> V getBinding(Bindings.Key<V> key)
-
getOptionalBinding
public <V> com.google.common.base.Optional<V> getOptionalBinding(Bindings.Key<V> key)
-
inlineList
public <R> com.sun.tools.javac.util.List<R> inlineList(Iterable<? extends com.google.errorprone.refaster.Inlineable<? extends R>> elements) throws CouldNotResolveImportException
- Throws:
CouldNotResolveImportException
-
getImportsToAdd
public com.google.common.collect.ImmutableSet<String> getImportsToAdd()
-
getStaticImportsToAdd
public com.google.common.collect.ImmutableSet<String> getStaticImportsToAdd()
-
inlineAsVar
public com.sun.tools.javac.code.Type.TypeVar inlineAsVar(UTypeVar var) throws CouldNotResolveImportException
- Throws:
CouldNotResolveImportException
-
-