Package net.bytebuddy.agent.builder
Enum Class AgentBuilder.RawMatcher.ForLoadState
java.lang.Object
java.lang.Enum<AgentBuilder.RawMatcher.ForLoadState>
net.bytebuddy.agent.builder.AgentBuilder.RawMatcher.ForLoadState
- All Implemented Interfaces:
Serializable
,Comparable<AgentBuilder.RawMatcher.ForLoadState>
,Constable
,AgentBuilder.RawMatcher
- Enclosing interface:
AgentBuilder.RawMatcher
public static enum AgentBuilder.RawMatcher.ForLoadState
extends Enum<AgentBuilder.RawMatcher.ForLoadState>
implements AgentBuilder.RawMatcher
A raw matcher indicating the state of a type's class loading.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.RawMatcher
AgentBuilder.RawMatcher.Conjunction, AgentBuilder.RawMatcher.Disjunction, AgentBuilder.RawMatcher.ForElementMatchers, AgentBuilder.RawMatcher.ForLoadState, AgentBuilder.RawMatcher.ForResolvableTypes, AgentBuilder.RawMatcher.Inversion, AgentBuilder.RawMatcher.Trivial
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
true
if a type is expected to be unloaded.. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ForLoadState
(boolean unloaded) Creates a new load state matcher. -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(TypeDescription typeDescription, ClassLoader classLoader, JavaModule module, Class<?> classBeingRedefined, ProtectionDomain protectionDomain) Decides if the giventypeDescription
should be instrumented with the entailedAgentBuilder.Transformer
s.Returns the enum constant of this class with the specified name.static AgentBuilder.RawMatcher.ForLoadState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LOADED
Indicates that a type was already loaded. -
UNLOADED
Indicates that a type was not yet loaded.
-
-
Field Details
-
unloaded
private final boolean unloadedtrue
if a type is expected to be unloaded..
-
-
Constructor Details
-
ForLoadState
private ForLoadState(boolean unloaded) Creates a new load state matcher.- Parameters:
unloaded
-true
if a type is expected to be unloaded..
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
matches
public boolean matches(TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull Class<?> classBeingRedefined, ProtectionDomain protectionDomain) Decides if the giventypeDescription
should be instrumented with the entailedAgentBuilder.Transformer
s.- Specified by:
matches
in interfaceAgentBuilder.RawMatcher
- Parameters:
typeDescription
- A description of the type to be instrumented.classLoader
- The class loader of the instrumented type. Might benull
if this class loader represents the bootstrap class loader.module
- The transformed type's module ornull
if the current VM does not support modules.classBeingRedefined
- The class being redefined which is only notnull
if a retransformation is applied.protectionDomain
- The protection domain of the type being transformed.- Returns:
true
if the entailedAgentBuilder.Transformer
s should be applied for the giventypeDescription
.
-