public byte[] generate(final String className, final byte[] originalCode,
final int off, final int len) {
final EnumTransformationType transformationTypeFromProperties = transformAttribute(className);
final ClassReader classReader = new ClassReader(originalCode, off, len);
final IMethodMap methodMap = new MethodMap();
final Set<String> syntheticFieldSet = new TreeSet<String>();
final ClassVisitorForStorable classVisitorForStorable = new ClassVisitorForStorable();
classVisitorForStorable.setMethodMap(methodMap, syntheticFieldSet);
// must not skip code to compute max locals
classReader.accept(classVisitorForStorable, /* ClassReader.SKIP_CODE | */
ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
// annotation override instrumentation properties
transformationAttribute = classVisitorForStorable
.getTransformationType();
if (transformationAttribute == null) {
transformationAttribute = transformationTypeFromProperties;
}
final String[] splitedClassName = className.split(POINT_REGEX);
final PackageNode node = packageMgr.addPackage(splitedClassName, 0,
splitedClassName.length, transformationAttribute);
byte[] code = null;
if (EnumTransformationType.NONE.equals(transformationAttribute)
&& !methodMap.hasMethodToTransform()) {
transformed = false;
} else {
transformed = true;
}