@HashCodeAndEqualsPlugin.Enhance public class SafeVarargsPlugin extends Plugin.ForElementMatcher implements Plugin.Factory
java.lang.SafeVarargs annotation even if compiled prior to Java 7
which introduces this annotation. As the annotation is not present on previous JVM versions, it is ignored
at runtime for older JVM versions what makes this approach feasible.| Modifier and Type | Class and Description |
|---|---|
static interface |
SafeVarargsPlugin.Enhance
Defines a safe-varargs annotation.
|
protected static class |
SafeVarargsPlugin.SafeVarargsAppender
Appends the varargs annotation.
|
Plugin.Factory.Simple, Plugin.Factory.UsingReflectionPlugin.Engine, Plugin.Factory, Plugin.ForElementMatcher, Plugin.NoOp, Plugin.WithInitialization, Plugin.WithPreprocessorElementMatcher.Junction<S>| Constructor and Description |
|---|
SafeVarargsPlugin()
Creates a new plugin for creating repeated annotations.
|
| Modifier and Type | Method and Description |
|---|---|
DynamicType.Builder<?> |
apply(DynamicType.Builder<?> builder,
TypeDescription typeDescription,
ClassFileLocator classFileLocator)
Applies this plugin.
|
void |
close() |
Plugin |
make()
Returns a plugin that can be used for a transformation and which is subsequently closed.
|
matchespublic SafeVarargsPlugin()
public Plugin make()
make in interface Plugin.Factorypublic DynamicType.Builder<?> apply(DynamicType.Builder<?> builder, TypeDescription typeDescription, ClassFileLocator classFileLocator)
apply in interface Pluginbuilder - The builder to use as a basis for the applied transformation.typeDescription - The type being transformed.classFileLocator - A class file locator that can locate other types in the scope of the project.public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2014–2025. All rights reserved.