Record Class DefaultTransformerRegistry.FilteringTransformer
java.lang.Object
java.lang.Record
eu.cloudnetservice.wrapper.transform.DefaultTransformerRegistry.FilteringTransformer
- All Implemented Interfaces:
ClassFileTransformer
- Enclosing class:
- DefaultTransformerRegistry
private static record DefaultTransformerRegistry.FilteringTransformer(@NonNull Predicate<String> predicate, @NonNull Transformer transformer, @NonNull Instrumentation inst)
extends Record
implements ClassFileTransformer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull InstrumentationThe field for theinstrecord component.The field for thepredicaterecord component.private final @NonNull TransformerThe field for thetransformerrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFilteringTransformer(@NonNull Predicate<String> predicate, @NonNull Transformer transformer, @NonNull Instrumentation inst) Creates an instance of aFilteringTransformerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inst()Returns the value of theinstrecord component.Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.byte[]transform(ClassLoader $, String className, Class<?> clazz, ProtectionDomain $1, byte[] file) Returns the value of thetransformerrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.instrument.ClassFileTransformer
transform
-
Field Details
-
predicate
The field for thepredicaterecord component. -
transformer
The field for thetransformerrecord component. -
inst
The field for theinstrecord component.
-
-
Constructor Details
-
FilteringTransformer
private FilteringTransformer(@NonNull @NonNull Predicate<String> predicate, @NonNull @NonNull Transformer transformer, @NonNull @NonNull Instrumentation inst) Creates an instance of aFilteringTransformerrecord class.- Parameters:
predicate- the value for thepredicaterecord componenttransformer- the value for thetransformerrecord componentinst- the value for theinstrecord component
-
-
Method Details
-
transform
public byte[] transform(ClassLoader $, String className, Class<?> clazz, ProtectionDomain $1, byte[] file) - Specified by:
transformin interfaceClassFileTransformer
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
transformer
Returns the value of thetransformerrecord component.- Returns:
- the value of the
transformerrecord component
-
inst
Returns the value of theinstrecord component.- Returns:
- the value of the
instrecord component
-