class MimicProcessor extends ClassTransformer {

    @Override
    protected void applyTransformations(final CtClass classToTransform) throws ClassNotFoundException, NotFoundException,
            CannotCompileException, MimicException {
        // Actually you must test if it exists, but it's just an example...
        getLogger().debug("Analysing " + classToTransform);

        Mimic mimicAnnnotation = (Mimic) classToTransform
                .getAnnotation(Mimic.class);
        Class<?> srcClass = mimicAnnnotation.sourceClass();
        MimicMode defaultMimicMode = mimicAnnnotation.defaultMimicMode();

        MimicMethod[] mimicMethods = mimicAnnnotation.mimicMethods();

        CtClass src = ClassPool.getDefault().get(srcClass.getName());
        if (mimicAnnnotation.isMimicingInterfaces()
                && mimicAnnnotation.isMimicingFields()
                && mimicAnnnotation.isMimicingConstructors()
                && mimicAnnnotation.isMimicingMethods()) {
            mimic.mimicClass(src, classToTransform, defaultMimicMode, mimicMethods);
        } else {
            if (mimicAnnnotation.isMimicingInterfaces()) {
                mimic.mimicInterfaces(src, classToTransform);
            }
            if (mimicAnnnotation.isMimicingFields()) {
                mimic.mimicFields(src, classToTransform);
            }
            if (mimicAnnnotation.isMimicingConstructors()) {
                mimic.mimicConstructors(src, classToTransform);
            }
            if (mimicAnnnotation.isMimicingMethods()) {
                mimic.mimicMethods(src, classToTransform, defaultMimicMode, mimicMethods);
            }
        }
        getLogger().debug(
                "Class " + classToTransform.getName() + " now mimics "
                        + src.getName());
    }

    public  MimicProcessor();

}