Package tech.picnic.errorprone.refaster
Class AnnotatedCompositeCodeTransformer
java.lang.Object
tech.picnic.errorprone.refaster.AnnotatedCompositeCodeTransformer
- All Implemented Interfaces:
com.google.errorprone.CodeTransformer,Serializable
public abstract class AnnotatedCompositeCodeTransformer
extends Object
implements com.google.errorprone.CodeTransformer, Serializable
A
CompositeCodeTransformer that augments the Description of Refaster rule
matches.
The content is augmented based on custom annotations available on the matching CodeTransformer or on this CompositeCodeTransformer as a fallback, if any.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionabstract com.google.common.collect.ImmutableClassToInstanceMap<Annotation> final voidapply(TreePath path, com.sun.tools.javac.util.Context context, com.google.errorprone.DescriptionListener listener) create(String packageName, com.google.common.collect.ImmutableList<com.google.errorprone.CodeTransformer> transformers, com.google.common.collect.ImmutableClassToInstanceMap<Annotation> annotations) Creates an instance of anAnnotatedCompositeCodeTransformer.
-
Method Details
-
annotations
- Specified by:
annotationsin interfacecom.google.errorprone.CodeTransformer
-
create
public static AnnotatedCompositeCodeTransformer create(String packageName, com.google.common.collect.ImmutableList<com.google.errorprone.CodeTransformer> transformers, com.google.common.collect.ImmutableClassToInstanceMap<Annotation> annotations) Creates an instance of anAnnotatedCompositeCodeTransformer.- Parameters:
packageName- The package in which the wrappedCodeTransformers reside.transformers- TheCodeTransformers to which to delegate.annotations- The annotations that are applicable to thisCodeTransformer.- Returns:
- A non-
nullAnnotatedCompositeCodeTransformer.
-
apply
public final void apply(TreePath path, com.sun.tools.javac.util.Context context, com.google.errorprone.DescriptionListener listener) - Specified by:
applyin interfacecom.google.errorprone.CodeTransformer
-