public CollectionDescriptor getCollectionDescriptorByName(String name, boolean ascend) { if (name == null) { throw new NullPointerException("Argument 'name' cannot be null"); } Map map = null; if (ascend) { map = allFieldDescriptors; } else { map = fieldDescriptors; } if (map.containsKey(name) && map.get(name) instanceof CollectionDescriptor) { return (CollectionDescriptor) map.get(name); } else { return null; }
public CollectionDescriptor getCollectionDescriptorByName(String name) { return getCollectionDescriptorByName(name, false);
    public CollectionDescriptor getCollectionDescriptorByName(String name, boolean ascend) {        if (name == null) {            throw new NullPointerException("Argument 'name' cannot be null");        }        Map map = null;        if (ascend) {            map = allFieldDescriptors;        } else {            map = fieldDescriptors;        }        if (map.containsKey(name)            && map.get(name) instanceof CollectionDescriptor) {            return (CollectionDescriptor) map.get(name);        } else {            return null;        }    }