Package net.bytebuddy.build.maven
Class ByteBuddyMojo.Transformer
java.lang.Object
net.bytebuddy.build.maven.ByteBuddyMojo.Transformer
- Direct Known Subclasses:
ByteBuddyMojo.Transformer.ForConfiguredPlugin
,ByteBuddyMojo.Transformer.ForDiscoveredPlugin
- Enclosing class:
- ByteBuddyMojo
A transformer that is applied during the plugin's execution.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A transformer for an explicitly configured plugin.protected static class
A transformer for a discovered plugin. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Returns the name of the plugin to apply.protected abstract List<? extends Plugin.Factory.UsingReflection.ArgumentResolver>
Returns the argument resolvers to use.protected abstract ClassLoader
toClassLoader
(ClassLoaderResolver classLoaderResolver, String groupId, String artifactId, String version, String packaging) Resolves the class loader to use for resolving the plugin.
-
Constructor Details
-
Transformer
protected Transformer()
-
-
Method Details
-
getPlugin
Returns the name of the plugin to apply.- Returns:
- The name of the plugin to apply.
- Throws:
org.apache.maven.plugin.MojoExecutionException
- If the plugin name was not set.
-
toArgumentResolvers
protected abstract List<? extends Plugin.Factory.UsingReflection.ArgumentResolver> toArgumentResolvers()Returns the argument resolvers to use.- Returns:
- The argument resolvers to use.
-
toClassLoader
protected abstract ClassLoader toClassLoader(ClassLoaderResolver classLoaderResolver, String groupId, String artifactId, String version, String packaging) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException Resolves the class loader to use for resolving the plugin.- Parameters:
classLoaderResolver
- The class loader resolver to use.groupId
- The group id of this project.artifactId
- The artifact id of this project.version
- The version of this project.packaging
- The packaging of this project.- Returns:
- The class loader to use.
- Throws:
org.apache.maven.plugin.MojoFailureException
- If the class loader resolution yields a failure.org.apache.maven.plugin.MojoExecutionException
- The the class loader resolution is incorrect.
-