Top Description Inners Methods
net.bytebuddy.build

public Interface Plugin

extends ElementMatcher<TypeDescription>, Closeable
Known Direct Subinterfaces
net.bytebuddy.build.Plugin.WithPreprocessor, net.bytebuddy.build.Plugin.WithInitialization
Known Direct Implementers
net.bytebuddy.build.Plugin.NoOp, net.bytebuddy.build.Plugin.ForElementMatcher, net.bytebuddy.build.RenamingPlugin, net.bytebuddy.build.ToStringPlugin, net.bytebuddy.build.HashCodeAndEqualsPlugin
Imports
edu.umd.cs.findbugs.annotations.SuppressFBWarnings, net.bytebuddy.ByteBuddy, .ClassFileVersion, net.bytebuddy.description.type.TypeDescription, net.bytebuddy.dynamic.ClassFileLocator, .DynamicType, .TypeResolutionStrategy, net.bytebuddy.dynamic.scaffold.inline.MethodNameTransformer, net.bytebuddy.implementation.LoadedTypeInitializer, net.bytebuddy.matcher.ElementMatcher, net.bytebuddy.pool.TypePool, net.bytebuddy.utility.CompoundList, .FileSystem, net.bytebuddy.utility.nullability.AlwaysNull, .MaybeNull, java.io.*, java.lang.annotation.*, java.lang.reflect.Constructor, .InvocationTargetException, .Method, .Modifier, java.net.URL, java.util.*, java.util.concurrent.*, java.util.jar.JarEntry, .JarFile, .JarOutputStream, .Manifest

A plugin that allows for the application of Byte Buddy transformations during a build process. This plugin's transformation is applied to any type matching this plugin's type matcher. Plugin types must be public, non-abstract and must declare a public default constructor to work.

A plugin is always used within the scope of a single plugin engine application and is disposed after closing. It might be used concurrently and must assure its own thread-safety if run outside of a Plugin.Engine or when using a parallel Plugin.Engine.Dispatcher.

For discoverability, plugin class names can be stored in a file named META-INF/net.bytebuddy/build.plugins with the fully qualified class name of the plugin per line.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Plugin.Engine

A plugin engine allows the application of one or more plugins on class files found at a Source which are then transferred and consumed by a Target.

public static interface
Plugin.Factory

A factory for providing a build plugin.

public abstract static class
Plugin.ForElementMatcher

An abstract base for a Plugin that matches types by a given ElementMatcher.

public static class
Plugin.NoOp

A non-operational plugin that does not instrument any type.

public static interface
Plugin.WithInitialization

Allows for the generation of types before a plugin is applied.

public static interface
Plugin.WithPreprocessor

A plugin that applies a preprocessor, i.e. causes a plugin engine's execution to defer all plugin applications until all types were discovered.

Method Summary

Modifier and TypeMethod and Description
public DynamicType.Builder<?>

Returns:

The supplied builder with additional transformations registered.
apply
(DynamicType.Builder<?>
The builder to use as a basis for the applied transformation.
builder
,
TypeDescription
The type being transformed.
typeDescription
,
ClassFileLocator
A class file locator that can locate other types in the scope of the project.
classFileLocator
)

Applies this plugin.

Inherited from java.io.Closeable:
close
Inherited from net.bytebuddy.matcher.ElementMatcher:
matches