public String of(HasAlias document) {
            switch (this) {
                case DATABASE_NAME:
                    return document.getName();
                case JAVA_NAME:
                    return document.getJavaName();
                default:
                    throw new UnsupportedOperationException(
                        "Unknown enum constant '" + name() + "'."
                    );
            }
        }
Returns the appropriate name of the specified document.

@param document the document
@return the name
runtime-parent/runtime-config/src/main/java/com/speedment/runtime/config/util/DocumentUtil.java