methods = scanMethods(declaration);
validate();
}
private void validate() {
DeclaredType factory = ProcessorUtil.findFactory(declaration);
if (factory == null) {
success = false;
messager.printMessage(ERROR, "Interface must extend com.artemis.EntityFactory", declaration);
return;
}
// if empty, we're probably extending an existing factory
if (factory.getTypeArguments().size() > 0) {
DeclaredType argument = ((DeclaredType) factory.getTypeArguments().get(0));
TypeElement factoryType = (TypeElement) argument.asElement();
if (!factoryType.getQualifiedName().equals(declaration.getQualifiedName())) {
success = false;
messager.printMessage(ERROR,
format("Expected EntityFactory<%s>, but found EntityFactory<%s>",
declaration.getSimpleName(),