Package net.bytebuddy.build
Class Plugin.Factory.UsingReflection
java.lang.Object
net.bytebuddy.build.Plugin.Factory.UsingReflection
- All Implemented Interfaces:
Plugin.Factory
- Enclosing interface:
Plugin.Factory
@Enhance
public static class Plugin.Factory.UsingReflection
extends Object
implements Plugin.Factory
A plugin factory that uses reflection for instantiating a plugin.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Allows to resolve arguments for aPlugin
constructor.protected static interface
An instantiator is responsible for invoking a plugin constructor reflectively.static @interface
Indicates that a constructor should be treated with a given priority if several constructors can be resolved.Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Factory
Plugin.Factory.Simple, Plugin.Factory.UsingReflection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<Plugin.Factory.UsingReflection.ArgumentResolver> A list of argument providers that can be used for instantiating the plugin.The plugin type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionUsingReflection
(Class<? extends Plugin> type) Creates a plugin factory that uses reflection for creating a plugin.protected
UsingReflection
(Class<? extends Plugin> type, List<Plugin.Factory.UsingReflection.ArgumentResolver> argumentResolvers) Creates a plugin factory that uses reflection for creating a plugin. -
Method Summary
Modifier and TypeMethodDescriptionmake()
Returns a plugin that can be used for a transformation and which is subsequently closed.with
(List<? extends Plugin.Factory.UsingReflection.ArgumentResolver> argumentResolvers) Appends the supplied argument resolvers.with
(Plugin.Factory.UsingReflection.ArgumentResolver... argumentResolver) Appends the supplied argument resolvers.
-
Field Details
-
type
The plugin type. -
argumentResolvers
A list of argument providers that can be used for instantiating the plugin.
-
-
Constructor Details
-
UsingReflection
Creates a plugin factory that uses reflection for creating a plugin.- Parameters:
type
- The plugin type.
-
UsingReflection
protected UsingReflection(Class<? extends Plugin> type, List<Plugin.Factory.UsingReflection.ArgumentResolver> argumentResolvers) Creates a plugin factory that uses reflection for creating a plugin.- Parameters:
type
- The plugin type.argumentResolvers
- A list of argument providers that can be used for instantiating the plugin.
-
-
Method Details
-
with
public Plugin.Factory.UsingReflection with(Plugin.Factory.UsingReflection.ArgumentResolver... argumentResolver) Appends the supplied argument resolvers.- Parameters:
argumentResolver
- A list of argument providers that can be used for instantiating the plugin.- Returns:
- A new plugin factory that uses reflection for creating a plugin that also uses the supplied argument resolvers.
-
with
public Plugin.Factory.UsingReflection with(List<? extends Plugin.Factory.UsingReflection.ArgumentResolver> argumentResolvers) Appends the supplied argument resolvers.- Parameters:
argumentResolvers
- A list of argument providers that can be used for instantiating the plugin.- Returns:
- A new plugin factory that uses reflection for creating a plugin that also uses the supplied argument resolvers.
-
make
Returns a plugin that can be used for a transformation and which is subsequently closed.- Specified by:
make
in interfacePlugin.Factory
- Returns:
- The plugin to use for type transformations.
-