
com.asayama.gwt.angular.rebind.PublicInterfaceCreatorGenerator Maven / Gradle / Ivy
package com.asayama.gwt.angular.rebind;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.google.gwt.core.ext.typeinfo.JClassType;
public class PublicInterfaceCreatorGenerator extends DefaultInstantiableCreatorGenerator {
private static final String CLASS = PublicInterfaceCreatorGenerator.class.getName();
private static final Logger LOG = Logger.getLogger(CLASS);
protected List getSupportedClassTypes(JClassType supportedRootClassType) {
final String METHOD = "getSupportedSubClassTypes(JClassType)";
JClassType[] supportedSubClassTypes = supportedRootClassType.getSubtypes();
List supportedClassTypes = new ArrayList();
if (supportedSubClassTypes != null) {
for (JClassType returnClassType : supportedSubClassTypes) {
if (returnClassType.isAbstract() && returnClassType.isPublic()) {
supportedClassTypes.add(returnClassType);
}
}
}
if (supportedClassTypes.size() == 0) {
String m = "Unable to find supportedClassTypes for " + supportedRootClassType;
LOG.logp(Level.WARNING, CLASS, METHOD, m);
}
return supportedClassTypes;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy