if (!shouldGenerate(metadata)) {
return null;
}
JavaMethod method;
JavaClass retVal = createDynamicJavaClass(getDestinationClassname(metadata), getDestinationPackage(metadata), null, getMetadataProvider());
retVal.setInterface(true);
retVal.setModifiers(new String[]{"public"});
String[] extendz = getExtends(metadata);
Type[] extendzTypes = new Type[extendz.length];
for (int j = 0; j < extendz.length; j++) {
extendzTypes[j] = new Type(extendz[j]);
}
retVal.setImplementz(extendzTypes);
Collection methods = getInterfaceMethods(metadata);
for (Iterator iter = methods.iterator(); iter.hasNext();) {
method = new DuplicatedJavaMethod((JavaMethod)iter.next());
method.setModifiers(new String[0]);
retVal.addMethod(method);
}
return new JavaClass[]{retVal};
}