Package com.google.errorprone.refaster
Class RefasterRule<M extends TemplateMatch,T extends Template<M>>
java.lang.Object
com.google.errorprone.refaster.RefasterRule<M,T>
- Type Parameters:
M
- The type of a match.T
- The type of the template used to find matches and generate replacements.
- All Implemented Interfaces:
CodeTransformer
,Serializable
public abstract class RefasterRule<M extends TemplateMatch,T extends Template<M>>
extends Object
implements CodeTransformer, Serializable
A representation of an entire Refaster rule, corresponding to a class with @BeforeTemplates
and @AfterTemplates.
- Author:
- [email protected] (Louis Wasserman)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionabstract com.google.common.collect.ImmutableClassToInstanceMap<Annotation>
void
apply
(com.sun.source.util.TreePath path, com.sun.tools.javac.util.Context context, DescriptionListener listener) static RefasterRule<?,
?> create
(String qualifiedTemplateClass, Iterable<UTypeVar> typeVariables, Collection<? extends Template<?>> beforeTemplates, Collection<? extends Template<?>> afterTemplates, com.google.common.collect.ImmutableClassToInstanceMap<Annotation> annotations) static RefasterRule<?,
?> create
(String qualifiedTemplateClass, Collection<? extends Template<?>> beforeTemplates, Collection<? extends Template<?>> afterTemplates) final String
toString()
-
Method Details
-
create
public static RefasterRule<?,?> create(String qualifiedTemplateClass, Collection<? extends Template<?>> beforeTemplates, Collection<? extends Template<?>> afterTemplates) -
create
public static RefasterRule<?,?> create(String qualifiedTemplateClass, Iterable<UTypeVar> typeVariables, Collection<? extends Template<?>> beforeTemplates, Collection<? extends Template<?>> afterTemplates, com.google.common.collect.ImmutableClassToInstanceMap<Annotation> annotations) -
annotations
- Specified by:
annotations
in interfaceCodeTransformer
-
apply
public void apply(com.sun.source.util.TreePath path, com.sun.tools.javac.util.Context context, DescriptionListener listener) - Specified by:
apply
in interfaceCodeTransformer
-
toString
-