Package net.bytebuddy.agent
Class ByteBuddyAgent.AttachmentProvider.Compound
- java.lang.Object
-
- net.bytebuddy.agent.ByteBuddyAgent.AttachmentProvider.Compound
-
- All Implemented Interfaces:
ByteBuddyAgent.AttachmentProvider
- Enclosing interface:
- ByteBuddyAgent.AttachmentProvider
public static class ByteBuddyAgent.AttachmentProvider.Compound extends java.lang.Object implements ByteBuddyAgent.AttachmentProvider
A compound attachment provider that attempts the attachment by delegation to other providers. If none of the providers of this compound provider is capable of providing a valid accessor, an non-available accessor is returned.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.ByteBuddyAgent.AttachmentProvider
ByteBuddyAgent.AttachmentProvider.Accessor, ByteBuddyAgent.AttachmentProvider.Compound, ByteBuddyAgent.AttachmentProvider.ForEmulatedAttachment, ByteBuddyAgent.AttachmentProvider.ForJ9Vm, ByteBuddyAgent.AttachmentProvider.ForModularizedVm, ByteBuddyAgent.AttachmentProvider.ForStandardToolsJarVm, ByteBuddyAgent.AttachmentProvider.ForUserDefinedToolsJar
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ByteBuddyAgent.AttachmentProvider>
attachmentProviders
A list of attachment providers in the order of their application.-
Fields inherited from interface net.bytebuddy.agent.ByteBuddyAgent.AttachmentProvider
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description Compound(java.util.List<? extends ByteBuddyAgent.AttachmentProvider> attachmentProviders)
Creates a new compound attachment provider.Compound(ByteBuddyAgent.AttachmentProvider... attachmentProvider)
Creates a new compound attachment provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuddyAgent.AttachmentProvider.Accessor
attempt()
Attempts the creation of an accessor for a specific JVM's attachment API.
-
-
-
Field Detail
-
attachmentProviders
private final java.util.List<ByteBuddyAgent.AttachmentProvider> attachmentProviders
A list of attachment providers in the order of their application.
-
-
Constructor Detail
-
Compound
public Compound(ByteBuddyAgent.AttachmentProvider... attachmentProvider)
Creates a new compound attachment provider.- Parameters:
attachmentProvider
- A list of attachment providers in the order of their application.
-
Compound
public Compound(java.util.List<? extends ByteBuddyAgent.AttachmentProvider> attachmentProviders)
Creates a new compound attachment provider.- Parameters:
attachmentProviders
- A list of attachment providers in the order of their application.
-
-
Method Detail
-
attempt
public ByteBuddyAgent.AttachmentProvider.Accessor attempt()
Attempts the creation of an accessor for a specific JVM's attachment API.- Specified by:
attempt
in interfaceByteBuddyAgent.AttachmentProvider
- Returns:
- The accessor this attachment provider can supply for the currently running JVM.
-
-