JMethod createMethod(SourceInfo info, MethodBinding b, String[] paramNames) {
JDeclaredType enclosingType = (JDeclaredType) get(b.declaringClass);
JMethod method =
new JMethod(info, intern(b.selector), enclosingType, get(b.returnType), b.isAbstract(), b
.isStatic(), b.isFinal(), AccessModifier.fromMethodBinding(b));
enclosingType.addMethod(method);
if (paramNames == null) {
mapParameters(info, method, b, 0);
} else {
mapParameters(info, method, b, paramNames);
}