for (Class<?> c : paramTypes) {
// adjust locals length for long and double parameters
if (c == Double.TYPE || c == Long.TYPE) ++localsLength;
}
Class<?>returnType = method.getReturnType();
cfw.startMethod(methodName, getSignature(paramTypes, returnType), ACC_PUBLIC);
cfw.addLoadThis();
cfw.add(ByteCode.GETFIELD, cfw.getClassName(), "events", adapterSignature);
cfw.addLoadConstant(eventName); // event type
cfw.addLoadConstant(paramLength); // create args array
cfw.add(ByteCode.ANEWARRAY, "java/lang/Object");