Recursively add indirect subclasses to a class record.

@param directSuperClass
the superclass to add (together with its own superclasses)
@param subClassRecord
the subclass to add to
160280
private void addSuperClasses(Integer directSuperClass,
			ClassRecord subClassRecord) {
		if (subClassRecord.superClasses.contains(directSuperClass)) {
			return;
		}
		subClassRecord.superClasses.add(directSuperClass);
		ClassRecord superClassRecord = getClassRecord(directSuperClass);
		if (superClassRecord == null) {
			return;
		}

		for (Integer superClass : superClassRecord.directSuperClasses) {
			addSuperClasses(superClass, subClassRecord);
		}
	}
75738
public void addHierarchy(String superclass, String[] packages) {
    List<String> 	names;
    List<Class>		classes;
    String[]		patterns;
    int			i;
    Pattern		p;
    ClassLocator	locator;

    locator    = getClassLocator();
    names      = locator.findNames(superclass, packages);
    classes    = locator.findClasses(superclass, packages);
    // remove blacklisted classes
    if (m_Blacklist.containsKey(superclass)) {
      try {
        patterns = m_Blacklist.getProperty(superclass).replaceAll(" ", "").split(",");
        for (String pattern: patterns) {
          p = Pattern.compile(pattern);
          // names
          i = 0;
          while (i < names.size()) {
            if (p.matcher(names.get(i)).matches())
              names.remove(i);
            else
              i++;
          }
          // classes
          i = 0;
          while (i < classes.size()) {
            if (p.matcher(classes.get(i).getName()).matches())
              classes.remove(i);
            else
              i++;
          }
        }
      }
      catch (Exception ex) {
        getLogger().log(Level.SEVERE, "Failed to blacklist classes for superclass '" +  superclass + "':", ex);
      }
    }
    // create class list
    updateClassnames(m_CacheNames, superclass, new HashSet<>(names));
    updateClassnames(m_ListNames, superclass, new ArrayList<>(names));
    updateClasses(m_CacheClasses, superclass, new HashSet<>(classes));
    updateClasses(m_ListClasses, superclass, new ArrayList<>(classes));
  }
1077022
public Avro recordClass(Class<? extends SpecificRecord> recordClass) {
		Preconditions.checkNotNull(recordClass);
		this.recordClass = recordClass;
		return this;
	}
73386
private static void configureCredentialDetailTypeMapping(ObjectMapper objectMapper) {
		List<NamedType> subtypes = new ArrayList<>();
		for (CredentialType type : CredentialType.values()) {
			subtypes.add(new NamedType(type.getModelClass(), type.getValueType()));
		}

		registerSubtypes(objectMapper, subtypes);
	}
160967
private void appendSuperClassJoin(ClassDescriptor cld, ClassDescriptor cldSuper, StringBuffer stmt, StringBuffer where)
    {
        stmt.append(",");
        appendTable(cldSuper, stmt);

        if (where != null)
        {
            if (where.length() > 0)
            {
                where.append(" AND ");
            }

            // get reference field in super class
            // TODO: do not use the superclassfield anymore, just assume that the id is the same in both tables - @see PBroker.storeToDb
            int superFieldRef = cld.getSuperClassFieldRef();
            FieldDescriptor refField = cld.getFieldDescriptorByIndex(superFieldRef);

            appendTable(cldSuper, where);
            where.append(".");
            appendField(cldSuper.getAutoIncrementFields()[0], where);
            where.append(" = ");
            appendTable(cld, where);
            where.append(".");
            appendField(refField, where);
        }
    }
823717
private function addInheritedAttributes(ClassMetadata $subClass, ClassMetadata $parentClass)
    {
        $propertyFactory = new PropertyMetadataFactory($subClass);

        foreach ($parentClass->propertyMetadata as $attributeName => $parentMapping) {
            //in case of inheritance from superclass, otherwise this would be caught by the mapping driver:
            if ($subClass->isEmbeddedDocument && $parentMapping->strategy === PropertyMetadata::STORAGE_STRATEGY_ADD_TO_SET) {
                throw MappingException::addToSetOnEmbeddedDocument($subClass->name, $parentMapping->name);
            }

            $mapping = $propertyFactory->createInherited($parentClass, $parentMapping);

            $subClass->addAttributeMapping($mapping);
        }
    }
1175306
public void addSubtype(String subtype) {
    if(!StringUtils.isBlank(subtype) && !subtypes.contains(subtype.trim())) {
      subtypes.add(subtype.trim());
    }
  }
688325
private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass)
    {
        if (! $parentClass->isMappedSuperclass) {
            return;
        }

        foreach (array('uniqueConstraints', 'indexes') as $indexType) {
            if (isset($parentClass->table[$indexType])) {
                foreach ($parentClass->table[$indexType] as $indexName => $index) {
                    if (isset($subClass->table[$indexType][$indexName])) {
                        continue; // Let the inheriting table override indices
                    }

                    $subClass->table[$indexType][$indexName] = $index;
                }
            }
        }
    }
300076
@Override
    public void setSubProtocols(String... protocols) {
        subProtocols.clear();
        Collections.addAll(subProtocols, protocols);
    }
1286008
private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass)
    {
        if ($subClass->isEmbeddedDocument) {
            return;
        }

        $indexFactory = new IndexFactory($subClass);
        $parentIndex  = $parentClass->getIndex();

        if ($parentIndex !== null) {
            $index = $indexFactory->createInherited($parentIndex);
            $subClass->setIndex($index);
        }

        foreach ($parentClass->getSecondaryIndexes() as $parentIndex) {
            $index = $indexFactory->createInherited($parentIndex);
            $subClass->addSecondaryIndex($index);
        }
    }
776010
private function addInheritedRelations(ClassMetadata $subClass, ClassMetadata $parentClass) : void
    {
        foreach ($parentClass->associationMappings as $field => $mapping) {
            if ($parentClass->isMappedSuperclass) {
                $mapping['sourceDocument'] = $subClass->name;
            }

            if (! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) {
                $mapping['inherited'] = $parentClass->name;
            }
            if (! isset($mapping['declared'])) {
                $mapping['declared'] = $parentClass->name;
            }
            $subClass->addInheritedAssociationMapping($mapping);
        }
    }
372184
private void addDirectoryClasses(final Path location, final Path subPath) {
        for (final File file : location.toFile().listFiles()) {
            if (file.isDirectory())
                addDirectoryClasses(location.resolve(file.getName()), subPath.resolve(file.getName()));
            else if (file.isFile() && file.getName().endsWith(".class")) {
                final String classFileName = subPath.resolve(file.getName()).toString();
                classes.add(toQualifiedClassName(classFileName));
            }
        }
    }
619120
@Override
    public List<? extends TypeMirror> directSupertypes(TypeMirror t)
    {
        switch (t.getKind())
        {
            case DECLARED:
                DeclaredType dt = (DeclaredType) t;
                TypeElement te = (TypeElement) dt.asElement();
                List<TypeMirror> list = new ArrayList<>();
                TypeElement superclass = (TypeElement) asElement(te.getSuperclass());
                if (superclass != null)
                {
                    list.add(0, superclass.asType());
                }
                list.addAll(te.getInterfaces());
                return list;
            case EXECUTABLE:
            case PACKAGE:
                throw new IllegalArgumentException(t.getKind().name());
            default:
                throw new UnsupportedOperationException(t.getKind().name()+" not supported yet");
        }
    }
715251
private Set<ClassDescriptor> computeKnownSubtypes(ClassDescriptor classDescriptor) throws ClassNotFoundException {
        LinkedList<ClassVertex> workList = new LinkedList<>();

        ClassVertex startVertex = resolveClassVertex(classDescriptor);
        workList.addLast(startVertex);

        Set<ClassDescriptor> result = new HashSet<>();

        while (!workList.isEmpty()) {
            ClassVertex current = workList.removeFirst();

            if (result.contains(current.getClassDescriptor())) {
                // Already added this class
                continue;
            }

            // Add class to the result
            result.add(current.getClassDescriptor());

            // Add all known subtype vertices to the work list
            Iterator<InheritanceEdge> i = graph.incomingEdgeIterator(current);
            while (i.hasNext()) {
                InheritanceEdge edge = i.next();
                workList.addLast(edge.getSource());
            }
        }

        return new HashSet<>(result);
    }
1040935
public void addClass (ClassRecord record)
    {
        // validate the class id
        if (record.classId > 255) {
            log.warning("Refusing to add class; classId > 255 " + record + ".");
        } else {
            _classes.put(record.classId, record);
        }
    }
1078907
private Collection<ClassDoc> subinterfaces(ClassDoc cd) {
        Collection<ClassDoc> ret = classToSubinterface.get(cd.qualifiedName());
        if (ret == null) {
            ret = new TreeSet<>(utils.makeComparatorForClassUse());
            SortedSet<ClassDoc> subs = classtree.subinterfaces(cd);
            if (subs != null) {
                ret.addAll(subs);
                for (ClassDoc sub : subs) {
                    ret.addAll(subinterfaces(sub));
                }
            }
            addAll(classToSubinterface, cd, ret);
        }
        return ret;
    }
29788
public void getSuperClass(Class<?> objClass) {
		Class<?> clazz = objClass.getSuperclass();
		if(clazz != null) {
			exceptionHierarchy.add(clazz);
			getSuperClass(clazz);
		}
	}