Class ClassName
java.lang.Object
com.google.errorprone.ClassName
Encapsulates a qualified class name and caches its resolved javac
Symbol.ClassSymbol, Type, and Name across a compilation.-
Method Summary
Modifier and TypeMethodDescriptionSupplier<@Nullable com.sun.tools.javac.code.Type> Returns aSupplierview oftype(VisitorState).com.sun.tools.javac.util.NamebinaryName(VisitorState state) Returns the cached javacNamefor the binary name.booleaninthashCode()static ClassNameConstructs aClassNamefrom a qualified canonical or binary class name (e.g.@Nullable com.sun.tools.javac.code.Symbol.ClassSymbolsymbol(VisitorState state) Resolves and caches theSymbol.ClassSymbolfor this class in the current compilation, or returnsnullif the symbol is not available.toString()@Nullable com.sun.tools.javac.code.Typetype(VisitorState state) Resolves and caches theTypefor this class in the current compilation, or returnsnullif the symbol is not available.
-
Method Details
-
of
Constructs aClassNamefrom a qualified canonical or binary class name (e.g."java.util.List","java.util.Map.Entry", or"java.util.Map$Entry").- Throws:
IllegalArgumentException- ifnameis empty, ends with'.', is primitive/void, is an array type ("[...]"), or is parameterized ("<...>")
-
binaryName
Returns the cached javacNamefor the binary name. -
symbol
Resolves and caches theSymbol.ClassSymbolfor this class in the current compilation, or returnsnullif the symbol is not available. -
type
Resolves and caches theTypefor this class in the current compilation, or returnsnullif the symbol is not available. -
asTypeSupplier
Returns aSupplierview oftype(VisitorState). -
equals
-
hashCode
-
toString
-