before.setModifiers(Modifier.PUBLIC);
before.setBody("{" + setUpSrc() + "}");
before.setExceptionTypes(new CtClass[]{exceptionClass});
AnnotationsAttribute attr = new AnnotationsAttribute(constPool, AnnotationsAttribute.visibleTag);
String beforeClassName = Before.class.getName();
constPool.addUtf8Info(beforeClassName);
Annotation annotation = new Annotation(beforeClassName, constPool);
attr.addAnnotation(annotation);
before.getMethodInfo().addAttribute(attr);
clazz.addMethod(before);