Package net.bytebuddy.agent.builder
Enum AgentBuilder.RawMatcher.ForLoadState
- java.lang.Object
-
- java.lang.Enum<AgentBuilder.RawMatcher.ForLoadState>
-
- net.bytebuddy.agent.builder.AgentBuilder.RawMatcher.ForLoadState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AgentBuilder.RawMatcher.ForLoadState>
,AgentBuilder.RawMatcher
- Enclosing interface:
- AgentBuilder.RawMatcher
public static enum AgentBuilder.RawMatcher.ForLoadState extends java.lang.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 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
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
unloaded
true
if a type is expected to be unloaded..
-
Constructor Summary
Constructors Modifier Constructor Description private
ForLoadState(boolean unloaded)
Creates a new load state matcher.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain)
Decides if the giventypeDescription
should be instrumented with the entailedAgentBuilder.Transformer
s.static AgentBuilder.RawMatcher.ForLoadState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AgentBuilder.RawMatcher.ForLoadState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOADED
public static final AgentBuilder.RawMatcher.ForLoadState LOADED
Indicates that a type was already loaded.
-
UNLOADED
public static final AgentBuilder.RawMatcher.ForLoadState UNLOADED
Indicates that a type was not yet loaded.
-
-
Method Detail
-
values
public static AgentBuilder.RawMatcher.ForLoadState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AgentBuilder.RawMatcher.ForLoadState c : AgentBuilder.RawMatcher.ForLoadState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AgentBuilder.RawMatcher.ForLoadState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
matches
public boolean matches(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, java.lang.Class<?> classBeingRedefined, java.security.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
.
-
-