Package net.bytebuddy.build
Class Plugin.Compound
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Compound
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Plugin
,ElementMatcher<TypeDescription>
- Enclosing interface:
- Plugin
@Enhance public static class Plugin.Compound extends java.lang.Object implements Plugin
A compound plugin that applies several plugins in a row.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin
Plugin.Compound, Plugin.Engine, Plugin.Factory, Plugin.ForElementMatcher, Plugin.NoOp
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicType.Builder<?>
apply(DynamicType.Builder<?> builder, TypeDescription typeDescription, ClassFileLocator classFileLocator)
Applies this plugin.void
close()
boolean
matches(TypeDescription target)
Matches a target against this element matcher.
-
-
-
Field Detail
-
plugins
private final java.util.List<Plugin> plugins
The plugins to apply.
-
-
Method Detail
-
matches
public boolean matches(TypeDescription target)
Matches a target against this element matcher.- Specified by:
matches
in interfaceElementMatcher<TypeDescription>
- Parameters:
target
- The instance to be matched.- Returns:
true
if the given element is matched by this matcher orfalse
otherwise.
-
apply
public DynamicType.Builder<?> apply(DynamicType.Builder<?> builder, TypeDescription typeDescription, ClassFileLocator classFileLocator)
Applies this plugin.- Specified by:
apply
in interfacePlugin
- Parameters:
builder
- 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.- Returns:
- The supplied builder with additional transformations registered.
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-