
net.bytebuddy.dynamic.Transformer Maven / Gradle / Ivy
package net.bytebuddy.dynamic;
import net.bytebuddy.description.annotation.AnnotationList;
import net.bytebuddy.description.field.FieldDescription;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.method.ParameterDescription;
import net.bytebuddy.description.method.ParameterList;
import net.bytebuddy.description.modifier.ModifierContributor;
import net.bytebuddy.description.type.TypeDefinition;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.description.type.TypeList;
import java.util.Arrays;
import java.util.List;
import static net.bytebuddy.matcher.ElementMatchers.is;
/**
* A transformer is responsible for transforming an object into a compatible instance of the same type.
*
* @param The type of the instance being transformed.
*/
public interface Transformer {
/**
* Transforms the supplied target.
*
* @param instrumentedType The instrumented type that declares the target being transformed.
* @param target The target entity that is being transformed.
* @return The transformed instance.
*/
T transform(TypeDescription instrumentedType, T target);
/**
* A non-operational transformer that returns the received instance.
*/
enum NoOp implements Transformer
© 2015 - 2025 Weber Informatics LLC | Privacy Policy