@HashCodeAndEqualsPlugin.Enhance public static class Plugin.Engine.Default extends Plugin.Engine.AbstractBase
Plugin.Engine.AbstractBase, Plugin.Engine.Default, Plugin.Engine.Dispatcher, Plugin.Engine.ErrorHandler, Plugin.Engine.Listener, Plugin.Engine.PoolStrategy, Plugin.Engine.Source, Plugin.Engine.Summary, Plugin.Engine.Target, Plugin.Engine.TypeStrategy
CLASS_FILE_EXTENSION
Modifier | Constructor and Description |
---|---|
|
Default()
Creates a new default plugin engine that rebases types and fails fast and on unresolved types and on live initializers.
|
|
Default(ByteBuddy byteBuddy)
Creates a new default plugin engine that rebases types and fails fast and on unresolved types and on live initializers.
|
protected |
Default(ByteBuddy byteBuddy,
Plugin.Engine.TypeStrategy typeStrategy)
Creates a new default plugin engine.
|
protected |
Default(ByteBuddy byteBuddy,
Plugin.Engine.TypeStrategy typeStrategy,
Plugin.Engine.PoolStrategy poolStrategy,
ClassFileLocator classFileLocator,
Plugin.Engine.Listener listener,
Plugin.Engine.ErrorHandler errorHandler,
Plugin.Engine.Dispatcher.Factory dispatcherFactory,
ElementMatcher.Junction<? super TypeDescription> ignoredTypeMatcher)
Creates a new default plugin engine.
|
Modifier and Type | Method and Description |
---|---|
Plugin.Engine.Summary |
apply(Plugin.Engine.Source source,
Plugin.Engine.Target target,
List<? extends Plugin.Factory> factories)
Applies this plugin engine onto a given source and target.
|
Plugin.Engine |
ignore(ElementMatcher<? super TypeDescription> matcher)
Ignores all types that are matched by this matcher or any previously registered ignore matcher.
|
static void |
main(String... argument)
Runs a plugin engine using the first and second argument as source and target file location and any additional argument as
the fully qualified name of any plugin to apply.
|
static Plugin.Engine |
of(EntryPoint entryPoint,
ClassFileVersion classFileVersion,
MethodNameTransformer methodNameTransformer)
Creates a plugin engine from an
EntryPoint . |
Plugin.Engine |
with(ByteBuddy byteBuddy)
Defines a new Byte Buddy instance for usage for type creation.
|
Plugin.Engine |
with(ClassFileLocator classFileLocator)
Appends the supplied class file locator to be queried for class files additionally to any previously registered
class file locators.
|
Plugin.Engine |
with(Plugin.Engine.Dispatcher.Factory dispatcherFactory)
Replaces the dispatcher factory of this plugin engine with the supplied dispatcher factory.
|
Plugin.Engine |
with(Plugin.Engine.Listener listener)
Appends the supplied listener to this engine.
|
Plugin.Engine |
with(Plugin.Engine.PoolStrategy poolStrategy)
Defines a new pool strategy that determines how types are being described.
|
Plugin.Engine |
with(Plugin.Engine.TypeStrategy typeStrategy)
Defines a new type strategy which determines the transformation mode for any instrumented type.
|
Plugin.Engine |
withErrorHandlers(List<? extends Plugin.Engine.ErrorHandler> errorHandlers)
Replaces the error handlers of this plugin engine with the supplied error handlers.
|
Plugin.Engine |
withoutErrorHandlers()
Replaces the error handlers of this plugin engine without applying any error handlers.
|
apply, apply, apply, withErrorHandlers, withParallelTransformation
public Default()
public Default(ByteBuddy byteBuddy)
byteBuddy
- The Byte Buddy instance to use.protected Default(ByteBuddy byteBuddy, Plugin.Engine.TypeStrategy typeStrategy)
byteBuddy
- The Byte Buddy instance to use.typeStrategy
- The type strategy to use.protected Default(ByteBuddy byteBuddy, Plugin.Engine.TypeStrategy typeStrategy, Plugin.Engine.PoolStrategy poolStrategy, ClassFileLocator classFileLocator, Plugin.Engine.Listener listener, Plugin.Engine.ErrorHandler errorHandler, Plugin.Engine.Dispatcher.Factory dispatcherFactory, ElementMatcher.Junction<? super TypeDescription> ignoredTypeMatcher)
byteBuddy
- The Byte Buddy instance to use.typeStrategy
- The type strategy to use.poolStrategy
- The pool strategy to use.classFileLocator
- The class file locator to use.listener
- The listener to use.errorHandler
- The error handler to use.dispatcherFactory
- The dispatcher factory to use.ignoredTypeMatcher
- A matcher for types to exclude from transformation.public static Plugin.Engine of(EntryPoint entryPoint, ClassFileVersion classFileVersion, MethodNameTransformer methodNameTransformer)
EntryPoint
.entryPoint
- The entry point to resolve into a plugin engine.classFileVersion
- The class file version to assume.methodNameTransformer
- The method name transformer to use.public static void main(String... argument) throws ClassNotFoundException, IOException
argument
- The arguments for running the plugin engine.ClassNotFoundException
- If a plugin class cannot be found on the system class loader.IOException
- If an I/O exception occurs.public Plugin.Engine with(ByteBuddy byteBuddy)
byteBuddy
- The Byte Buddy instance to use.public Plugin.Engine with(Plugin.Engine.TypeStrategy typeStrategy)
typeStrategy
- The type stategy to use.public Plugin.Engine with(Plugin.Engine.PoolStrategy poolStrategy)
poolStrategy
- The pool strategy to use.public Plugin.Engine with(ClassFileLocator classFileLocator)
classFileLocator
- The class file locator to append.public Plugin.Engine with(Plugin.Engine.Listener listener)
listener
- The listener to append.public Plugin.Engine withoutErrorHandlers()
public Plugin.Engine withErrorHandlers(List<? extends Plugin.Engine.ErrorHandler> errorHandlers)
errorHandlers
- The error handlers to apply.public Plugin.Engine with(Plugin.Engine.Dispatcher.Factory dispatcherFactory)
dispatcherFactory
- The dispatcher factory to use.public Plugin.Engine ignore(ElementMatcher<? super TypeDescription> matcher)
matcher
- The ignore matcher to append.public Plugin.Engine.Summary apply(Plugin.Engine.Source source, Plugin.Engine.Target target, List<? extends Plugin.Factory> factories) throws IOException
source
- The source to use.target
- The target to use.factories
- A list of plugin factories to a apply.IOException
- If an I/O error occurs.Copyright © 2014–2020. All rights reserved.