@Override
    public int compareTo(ExtensionMetaData o) {
        if (o == null) {
            return -1;
        }
        if (this.equals(o)) {
            return 0;
        }
        int result;
        if (namespace != null && o.namespace != null) {
            result = namespace.compareTo(o.namespace);
        } else if (namespace == null && o.namespace == null) {
            result = 0;
        } else if (namespace == null) {
            return -1;
        } else {
            return 1;
        }
        if (result == 0) {
            if (name != null && o.name != null) {
                result = name.compareTo(o.name);
            } else if (name == null && o.name == null) {
                result = 0;
            } else if (name == null) {
                return -1;
            } else {
                return 1;
            }
            if (result == 0) {
                result = description.compareTo(o.description);
            }
        }
        return result;
    }
POJO for holding extension meta data
modules/siddhi-doc-gen/src/main/java/io/siddhi/doc/gen/metadata/ExtensionMetaData.java