All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.criteo.hadoop.garmadon.agent.tracers.ConstructorTracer Maven / Gradle / Ivy

package com.criteo.hadoop.garmadon.agent.tracers;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.implementation.Implementation;
import net.bytebuddy.matcher.ElementMatcher;

public abstract class ConstructorTracer extends Tracer {

    protected ConstructorTracer() {
        agentBuilder = agentBuilder
                .type(typeMatcher())
                .transform((builder, type, classLoader, module) ->
                        builder
                                .constructor(constructorMatcher())
                                .intercept(newImplementation()));
    }


    protected abstract ElementMatcher typeMatcher();

    protected abstract ElementMatcher constructorMatcher();

    protected abstract Implementation newImplementation();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy