public boolean isArtifact(@Nonnull BasiliskClass clazz) { requireNonNull(clazz, ERROR_CLASS_NULL); for (BasiliskClass basiliskClass : basiliskClasses) { if (basiliskClass.equals(clazz)) return true; } return false; }
@Nullable public BasiliskClass findClassFor(@Nonnull String propertyName) { requireNonBlank(propertyName, "Argument 'propertyName' must not be blank"); String simpleName = propertyName; int lastDot = propertyName.lastIndexOf("."); if (lastDot > -1) { simpleName = simpleName.substring(lastDot + 1); } if (simpleName.length() == 1) { simpleName = simpleName.toUpperCase(); } else { simpleName = simpleName.substring(0, 1).toUpperCase() + simpleName.substring(1); } if (!simpleName.endsWith(trailing)) { simpleName += trailing; } for (BasiliskClass basiliskClass : basiliskClasses) { if (basiliskClass.getClazz().getSimpleName().equals(simpleName)) { return basiliskClass; } } return null; }