@HashCodeAndEqualsPlugin.Enhance public class ModuleVersionPlugin extends Object implements Plugin, Plugin.Factory
Plugin.Engine, Plugin.Factory, Plugin.ForElementMatcher, Plugin.NoOp, Plugin.WithInitialization, Plugin.WithPreprocessorElementMatcher.Junction<S>Plugin.Factory.Simple, Plugin.Factory.UsingReflection| Constructor and Description |
|---|
ModuleVersionPlugin(String version)
Creates a new module version plugin.
|
| Modifier and Type | Method and Description |
|---|---|
DynamicType.Builder<?> |
apply(DynamicType.Builder<?> builder,
TypeDescription typeDescription,
ClassFileLocator classFileLocator)
Applies this plugin.
|
void |
close() |
Plugin |
make()
Returns a plugin that can be used for a transformation and which is subsequently closed.
|
boolean |
matches(TypeDescription target)
Matches a target against this element matcher.
|
public ModuleVersionPlugin(@MaybeNull String version)
version - The version to include or null to not include a version.public Plugin make()
make in interface Plugin.Factorypublic DynamicType.Builder<?> apply(DynamicType.Builder<?> builder, TypeDescription typeDescription, ClassFileLocator classFileLocator)
apply in interface Pluginbuilder - 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.public boolean matches(@MaybeNull TypeDescription target)
matches in interface ElementMatcher<TypeDescription>target - The instance to be matched or null.true if the given element is matched by this matcher or false otherwise.public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2014–2025. All rights reserved.