visibility = Visibility.PRIVATE;
}
Method oldMethod = (Method) klass.getMethod(name);
Method newMethod = new DefaultMethod(cbase, name, bodyNode, argsNode, visibility, SourceLocation.of(node));
klass.addMethod(name, newMethod);
if (moduleFunction) {
Method singletonMethod = new DefaultMethod(cbase, name, bodyNode, argsNode, visibility, SourceLocation.of(node));
singletonMethod.setVisibility(Visibility.PUBLIC);
klass.getSingletonClass().addMethod(name, singletonMethod);