Returns the cardinalities associated with this class or a superclass.

@param sourceClass Class whose relation is sought.
@return The cardinalities, or null if none found.
352177
public Cardinalities getCardinalities(Class<? extends ElementBase> sourceClass) {
        Class<?> clazz = sourceClass;
        Cardinalities cardinalities = null;
        
        while (cardinalities == null && clazz != null) {
            cardinalities = map.get(clazz);
            clazz = clazz == ElementBase.class ? null : clazz.getSuperclass();
        }
        
        return cardinalities;
    }
640524
private function getSourcePropertyValues(array $sourcePropertyPaths, $entity, $entityClass)
    {
        $sourcePropertyValues = [];

        foreach ($sourcePropertyPaths as $sourcePropertyPath) {
            if (!$this->propertyAccessor->isReadable($entity, $sourcePropertyPath)) {
                throw $this->createPropertyNotReadableException($entityClass, $sourcePropertyPath);
            }

            $sourcePropertyValues[$sourcePropertyPath] = $this->propertyAccessor->getValue($entity, $sourcePropertyPath);
        }

        return $sourcePropertyValues;
    }
1323224
private static List<Map<String, Object>> getEntityAnnos(Object targetClass, String annotationName) {
		Annotation[] anno = null;
		if (targetClass instanceof Field)
			anno = ((Field) targetClass).getAnnotations();
		else
			anno = ((Class<?>) targetClass).getAnnotations();
		List<Map<String, Object>> l = new ArrayList<Map<String, Object>>();
		for (Annotation annotation : anno) {
			Class<? extends Annotation> type = annotation.annotationType();
			String cName = type.getName();
			if (matchNameCheck(annotationName, cName)) {
				l.add(changeAnnotationValuesToMap(annotation, type));
			}
		}
		return l;
	}
1324777
private static List<Field> getAllDeclaredFields(final Class<?> sourceEntity) {
        List<Field> fields = new ArrayList<Field>();
        Class<?> clazz = sourceEntity;
        while (clazz != null) {
            Field[] f = clazz.getDeclaredFields();
            fields.addAll(Arrays.asList(f));
            clazz = clazz.getSuperclass();
        }
        return fields;
    }
208087
public int cardinality() {
		int sum = 0;
		for (int i = 0; i < wordsInUse; i++)
			sum += Long.bitCount(words[i]);
		return sum;
	}
407849
public void addCardinality(Class<? extends ElementBase> sourceClass, Class<? extends ElementBase> targetClass,
                               int maxOccurrences) {
        Cardinality cardinality = new Cardinality(sourceClass, targetClass, maxOccurrences);
        getOrCreateCardinalities(sourceClass).addCardinality(cardinality);
    }
133062
public int cardinality() {
		int answer = 0;
		for (int k = 0; k < this.buffer.size(); k += 2) {
			answer += Integer.bitCount(this.buffer.get(k + 1));
		}
		return answer;
	}
124152
public static Class<?>[] getTypes(Object[] objects) {
        if (!Checker.isNull(objects)) {
            Class<?>[] classes = new Class<?>[objects.length];
            int i = 0;
            for (Object object : objects) {
                classes[i++] = Checker.isNull(object) ? null : object.getClass();
            }
            return classes;
        }
        return null;
    }
1083369
public Class[] getClasses(String superclass) {
    List<Class>	list;

    list = m_ListClasses.get(superclass);
    if (list == null)
      return new Class[0];
    else
      return list.toArray(new Class[list.size()]);
  }
284243
@DefinedBy(Api.COMPILER)
    public long getColumnNumber() {
        if (sourcePosition == null) {
            sourcePosition = new SourcePosition();
        }
        return sourcePosition.getColumnNumber();
    }
347198
static <E> List<E> toEntities(Class<E> entityClass, Entity[] nativeEntities) {
    if (nativeEntities == null || nativeEntities.length == 0) {
      return new ArrayList<>();
    }
    return toEntities(entityClass, Arrays.asList(nativeEntities));
  }
38724
public List<MappedSuperclass<EntityMappings<T>>> getAllMappedSuperclass()
   {
      List<MappedSuperclass<EntityMappings<T>>> list = new ArrayList<MappedSuperclass<EntityMappings<T>>>();
      List<Node> nodeList = childNode.get("mapped-superclass");
      for(Node node: nodeList)
      {
         MappedSuperclass<EntityMappings<T>>  type = new MappedSuperclassImpl<EntityMappings<T>>(this, "mapped-superclass", childNode, node);
         list.add(type);
      }
      return list;
   }
1020597
public static String enumValues(Class<?> enumClass) {
    Preconditions.checkNotNull(enumClass, "enumClass cannot be null");
    Preconditions.checkState(enumClass.isEnum(), "enumClass must be an enum.");
    return Joiner.on(", ").join(enumClass.getEnumConstants());
  }
192159
private String getSourceMultiplicity(final Cardinality cardinality) {

		switch (cardinality) {

			case OneToOne:
			case OneToMany:
				return "1";

			case ManyToOne:
			case ManyToMany:
				return "*";
		}

		return null;
	}
50697
public static <T> IRelationalJMapper<T> getRelationalMapper(final Class<T> configuredClass){
		return getRelationalMapper(configuredClass, undefinedXML());
	}
404722
public List<MappedClass> getSubTypes(final MappedClass mc) {
        List<MappedClass> subtypes = new ArrayList<MappedClass>();
        for (MappedClass mappedClass : getMappedClasses()) {
            if (mappedClass.isSubType(mc)) {
                subtypes.add(mappedClass);
            }
        }

        return subtypes;
    }
653997
public EntityType getEntityType(Class<?> entityClass) {
    String className = entityClass.getName();
    EntityType type = entityTypes.get(className);
    if (null != type) { return type; }

    type = classEntityTypes.get(className);
    if (null == type) {
      List<EntityType> matched = CollectUtils.newArrayList();
      for (EntityType entityType : entityTypes.values()) {
        if (className.equals(entityType.getEntityName())
            || className.equals(entityType.getEntityClass().getName())) {
          matched.add(entityType);
        }
      }
      if (matched.size() > 1) { throw new RuntimeException("multi-entityName for class:" + className); }
      if (matched.isEmpty()) {
        EntityType tmp = new EntityType(entityClass);
        classEntityTypes.put(className, tmp);
        return tmp;
      } else {
        classEntityTypes.put(className, matched.get(0));
        type = (EntityType) matched.get(0);
      }
    }
    return type;
  }