return collected;
}
private boolean validateClassModifiers(Element element) {
assert element != null;
TypeElement type = (TypeElement) element;
DeclaredType superType = environment.getDeclaredType(FlowDescription.class);
if (environment.getTypeUtils().isSubtype(type.asType(), superType) == false) {
raiseInvalidClass(type, MessageFormat.format(
"フロー部品クラス{0}は{1}のサブクラスとして宣言する必要があります",
"{0}",
FlowDescription.class.getName()));
}
if (type.getEnclosingElement().getKind() != ElementKind.PACKAGE) {
raiseInvalidClass(type, "フロー部品クラス{0}はパッケージ直下のトップレベルクラスとして宣言する必要があります");
}
if (type.getModifiers().contains(Modifier.PUBLIC) == false) {
raiseInvalidClass(type, "フロー部品クラス{0}はpublicとして宣言する必要があります");
}
if (type.getModifiers().contains(Modifier.ABSTRACT)) {
raiseInvalidClass(type, "フロー部品クラス{0}はabstractとして宣言できません");
}
return true;
}