Package net.bytebuddy.agent.builder
Enum AgentBuilder.RawMatcher.Trivial
- java.lang.Object
-
- java.lang.Enum<AgentBuilder.RawMatcher.Trivial>
-
- net.bytebuddy.agent.builder.AgentBuilder.RawMatcher.Trivial
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AgentBuilder.RawMatcher.Trivial>,AgentBuilder.RawMatcher
- Enclosing interface:
- AgentBuilder.RawMatcher
public static enum AgentBuilder.RawMatcher.Trivial extends java.lang.Enum<AgentBuilder.RawMatcher.Trivial> implements AgentBuilder.RawMatcher
A matcher that always or never matches a type.
-
-
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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MATCHINGAlways matches a type.NON_MATCHINGNever matches a type.
-
Field Summary
Fields Modifier and Type Field Description private booleanmatchestrueif this matcher always matches a type.
-
Constructor Summary
Constructors Modifier Constructor Description privateTrivial(boolean matches)Creates a new trivial raw matcher.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain)Decides if the giventypeDescriptionshould be instrumented with the entailedAgentBuilder.Transformers.static AgentBuilder.RawMatcher.TrivialvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AgentBuilder.RawMatcher.Trivial[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MATCHING
public static final AgentBuilder.RawMatcher.Trivial MATCHING
Always matches a type.
-
NON_MATCHING
public static final AgentBuilder.RawMatcher.Trivial NON_MATCHING
Never matches a type.
-
-
Method Detail
-
values
public static AgentBuilder.RawMatcher.Trivial[] 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.Trivial c : AgentBuilder.RawMatcher.Trivial.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.Trivial 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 giventypeDescriptionshould be instrumented with the entailedAgentBuilder.Transformers.- Specified by:
matchesin interfaceAgentBuilder.RawMatcher- Parameters:
typeDescription- A description of the type to be instrumented.classLoader- The class loader of the instrumented type. Might benullif this class loader represents the bootstrap class loader.module- The transformed type's module ornullif the current VM does not support modules.classBeingRedefined- The class being redefined which is only notnullif a retransformation is applied.protectionDomain- The protection domain of the type being transformed.- Returns:
trueif the entailedAgentBuilder.Transformers should be applied for the giventypeDescription.
-
-