Class StronglyType.Builder
java.lang.Object
com.google.errorprone.bugpatterns.StronglyType.Builder
- Enclosing class:
StronglyType
Builder for
StronglyType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal StronglyType.Builder
addType
(com.sun.tools.javac.code.Type type) Add a type that can be replaced with a stronger type.abstract StronglyType
build()
abstract StronglyType.Builder
setFactoryMatcher
(Matcher<com.sun.source.tree.ExpressionTree> matcher) Set the matcher used to check if an expression is a factory creating a stronger type.abstract StronglyType.Builder
setRenameFunction
(Function<String, String> renameFn) Set a mapping function that maps from the original name to a new name more befitting the strong type.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setRenameFunction
Set a mapping function that maps from the original name to a new name more befitting the strong type. -
setFactoryMatcher
public abstract StronglyType.Builder setFactoryMatcher(Matcher<com.sun.source.tree.ExpressionTree> matcher) Set the matcher used to check if an expression is a factory creating a stronger type. -
addType
Add a type that can be replaced with a stronger type. -
build
-