MethodNode methodNode = new MethodNode(runScriptMethod.getName(), runScriptMethod.getModifiers() & ~ACC_ABSTRACT
, runScriptMethod.getReturnType(), runScriptMethod.getParameters(), runScriptMethod.getExceptions()
, defaultMethod.getCode());
// The AST node metadata has the flag that indicates that this method is a script body.
// It may also be carrying data for other AST transforms.
methodNode.copyNodeMetaData(defaultMethod);
cNode.addMethod(methodNode);
}
}
// If the new script base class does not have a contextual constructor (g.l.Binding), then we won't either.