Package net.bytebuddy.agent.builder
Enum Class AgentBuilder.RawMatcher.Trivial
java.lang.Object
java.lang.Enum<AgentBuilder.RawMatcher.Trivial>
net.bytebuddy.agent.builder.AgentBuilder.RawMatcher.Trivial
- All Implemented Interfaces:
Serializable
,Comparable<AgentBuilder.RawMatcher.Trivial>
,Constable
,AgentBuilder.RawMatcher
- Enclosing interface:
- AgentBuilder.RawMatcher
public static enum AgentBuilder.RawMatcher.Trivial
extends Enum<AgentBuilder.RawMatcher.Trivial>
implements AgentBuilder.RawMatcher
A matcher that always or never matches a type.
-
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 this matcher always matches a type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Trivial
(boolean matches) Creates a new trivial raw 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.Trivial[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MATCHING
Always matches a type. -
NON_MATCHING
Never matches a type.
-
-
Field Details
-
matches
private final boolean matchestrue
if this matcher always matches a type.
-
-
Constructor Details
-
Trivial
private Trivial(boolean matches) Creates a new trivial raw matcher.- Parameters:
matches
-true
if this matcher always matches a type.
-
-
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
.
-