private void generateSources()
throws IOException {
int implementedCount = 0;
JCodeModel codeModel = new JCodeModel();
List<Entry> entries = Primitives.getEntries();
for(Entry entry : entries) {
if(singleFunction == null || singleFunction.equals(entry.name)) {
List<JvmMethod> overloads = JvmMethod.findOverloads(entry.functionClass, entry.name, entry.methodName);
if(overloads.isEmpty() && entry.functionClass != null) {
System.err.println("WARNING: Can't find " + entry.functionClass.getName() + "." +
(entry.methodName == null ? entry.name : entry.methodName));
}
if(!overloads.isEmpty()) {
generate(codeModel, new PrimitiveModel(entry, overloads));
implementedCount ++;
}
for(JvmMethod method : overloads) {
if(implicitIntCasting(method)) {
System.out.println("IMPLICIT INT CASTING: " + method);
}
}
}
}
codeModel.build(new CodeWriter() {
@Override
public Writer openSource(JPackage pkg, String fileName) throws IOException {
File pkgDir = new File(sourcesDir, pkg.name().replace('.', '/'));
pkgDir.mkdirs();