Sets one {@link io.sundr.codegen.model.TypeDef} as a super class of an other.

@param base       The base type.
@param superClass The super type.
@return           The updated type definition.
974367
public static TypeDef typeExtends(TypeDef base, ClassRef superClass) {
        return new TypeDefBuilder(base)
                .withExtendsList(superClass)
                .build();
    }
427084
public NominalTypeBuilder superClass() {
    FunctionType ctor = instance.getSuperClassConstructor();
    if (ctor == null) {
      return null;
    }
    return new NominalTypeBuilder(ctor, ctor.getInstanceType());
  }
1193934
public <T> boolean map(Class<? super T> baseClass, Class<T> typeClass)
    {
        assert baseClass != null && typeClass != null;

        if (typeClass.isInterface()
                || Modifier.isAbstract(typeClass.getModifiers()))
        {
            throw new IllegalArgumentException(typeClass
                    + " cannot be an interface/abstract class.");
        }

        final HasSchema<?> last = pojoMapping.putIfAbsent(baseClass.getName(),
                new Mapped<T>(baseClass, typeClass, this));

        return last == null
                || (last instanceof Mapped<?> && ((Mapped<?>) last).typeClass == typeClass);
    }
180861
@Override
  public BaseType extendGenericType()
  {
    BaseType []oldParams = getParameters();    
    BaseType []newParams = new BaseType[oldParams.length];
    boolean isExtend = false;
    
    for (int i = 0; i < newParams.length; i++) {
      BaseType param = oldParams[i];
      
      if (param instanceof ClassType
          || param instanceof ParamType) {
        BaseType []upperBounds = new BaseType[] { param };
        BaseType []lowerBounds = new BaseType[] { };//ObjectType.OBJECT_TYPE };
        
        BaseType extParam = new WildcardTypeImpl(lowerBounds, upperBounds);
        
        newParams[i] = extParam;
        isExtend = true;
      }
      else {
        newParams[i] = param;
      }
    }
    
    if (isExtend) {
      ParamType extendsType = new ParamType(_type, newParams, _paramMap);

      return extendsType;
    }
    else {
      return this;
    }
  }
410310
@SuppressWarnings("unchecked")
    public static List<Class<?>> getSupertypes(Class<?> type) {
        List<Class<?>> supertypes = new LinkedList<>();
        supertypes.add(type.getSuperclass());
        Collections.addAll(supertypes, type.getInterfaces());
        return supertypes;
    }
1125567
public static <F extends Filter<C>, C extends Enum<C>> FilterDescriptor<F, C> ofFilter(final Class<F> filterClass) {
        return new AnnotationBasedFilterComponentDescriptor<>(filterClass);
    }
299613
private SupertypeQueryResults computeSupertypes(ClassDescriptor classDescriptor) // throws
    // ClassNotFoundException
    {
        if (DEBUG_QUERIES) {
            System.out.println("Computing supertypes for " + classDescriptor.toDottedClassName());
        }

        // Try to fully resolve the class and its superclasses/superinterfaces.
        ClassVertex typeVertex = optionallyResolveClassVertex(classDescriptor);

        // Create new empty SupertypeQueryResults.
        SupertypeQueryResults supertypeSet = new SupertypeQueryResults();

        // Add all known superclasses/superinterfaces.
        // The ClassVertexes for all of them should be in the
        // InheritanceGraph by now.
        LinkedList<ClassVertex> workList = new LinkedList<>();
        workList.addLast(typeVertex);
        while (!workList.isEmpty()) {
            ClassVertex vertex = workList.removeFirst();
            supertypeSet.addSupertype(vertex.getClassDescriptor());
            if (vertex.isResolved()) {
                if (DEBUG_QUERIES) {
                    System.out.println("  Adding supertype " + vertex.getClassDescriptor().toDottedClassName());
                }
            } else {
                if (DEBUG_QUERIES) {
                    System.out.println("  Encountered unresolved class " + vertex.getClassDescriptor().toDottedClassName()
                            + " in supertype query");
                }
                supertypeSet.setEncounteredMissingClasses(true);
            }

            Iterator<InheritanceEdge> i = graph.outgoingEdgeIterator(vertex);
            while (i.hasNext()) {
                InheritanceEdge edge = i.next();
                workList.addLast(edge.getTarget());
            }
        }

        return supertypeSet;
    }
821673
public <T> Set<Class<? extends T>> getSubTypesOf(final Class<T> type) {
        return Sets.newHashSet(ReflectionUtils.<T>forNames(
                store.getAll(index(SubTypesScanner.class), Arrays.asList(type.getName())), loaders()));
    }
717776
@Override
    public InheritanceEdge createEdge(ClassVertex source, ClassVertex target) {
        if (!target.isInterface()) {
            source.setDirectSuperclass(target);
        }
        return super.createEdge(source, target);
    }
192866
@Nullable
  private static Node getSubclassForEs6Superclass(Node superclass) {
    Node classNode = superclass.getParent();
    checkArgument(classNode.isClass(), classNode);
    if (NodeUtil.isNameDeclaration(classNode.getGrandparent())) {
      // const Clazz = class extends Super {
      return classNode.getParent();
    } else if (superclass.getGrandparent().isAssign()) {
      // ns.foo.Clazz = class extends Super {
      return classNode.getPrevious();
    } else if (NodeUtil.isClassDeclaration(classNode)) {
      // class Clazz extends Super {
      return classNode.getFirstChild();
    }
    return null;
  }
424154
public final void setContext(Kind c) {
        //NOTE:  Put context specific link code here.
        switch (c) {
            case ALL_CLASSES_FRAME:
            case PACKAGE_FRAME:
            case IMPLEMENTED_CLASSES:
            case SUBCLASSES:
            case EXECUTABLE_ELEMENT_COPY:
            case VARIABLE_ELEMENT_COPY:
            case PROPERTY_COPY:
            case CLASS_USE_HEADER:
                includeTypeInClassLinkLabel = false;
                break;

            case ANNOTATION:
                excludeTypeParameterLinks = true;
                excludeTypeBounds = true;
                break;

            case IMPLEMENTED_INTERFACES:
            case SUPER_INTERFACES:
            case SUBINTERFACES:
            case CLASS_TREE_PARENT:
            case TREE:
            case CLASS_SIGNATURE_PARENT_NAME:
                excludeTypeParameterLinks = true;
                excludeTypeBounds = true;
                includeTypeInClassLinkLabel = false;
                includeTypeAsSepLink = true;
                break;

            case PACKAGE:
            case CLASS_USE:
            case CLASS_HEADER:
            case CLASS_SIGNATURE:
            case RECEIVER_TYPE:
                excludeTypeParameterLinks = true;
                includeTypeAsSepLink = true;
                includeTypeInClassLinkLabel = false;
                break;

            case MEMBER_TYPE_PARAMS:
                includeTypeAsSepLink = true;
                includeTypeInClassLinkLabel = false;
                break;

            case RETURN_TYPE:
            case SUMMARY_RETURN_TYPE:
                excludeTypeBounds = true;
                break;
            case EXECUTABLE_MEMBER_PARAM:
                excludeTypeBounds = true;
                break;
        }
        context = c;
        if (type != null &&
            utils.isTypeVariable(type) &&
            utils.isExecutableElement(utils.asTypeElement(type).getEnclosingElement())) {
                excludeTypeParameterLinks = true;
        }
    }
809445
public static <K, V, M extends Map<K, V>> JavaType createMapType(Class<M> m, Class<K> k,
                                                                     Class<V> v) {
        BaseType mapType = new BaseType();
        BaseType keyType = new BaseType();
        BaseType valueType = new BaseType();
        keyType.setType(k);
        valueType.setType(v);
        JavaType[] generics = { keyType, valueType };
        mapType.setType(m);
        mapType.setGenerics(generics);
        return mapType;
    }
759968
private MutableSecondaryTypeDefinition getSecondaryTypeDefinition(final String typeId, final boolean includePropertyDefinitions, final boolean baseType) {

		final TypeDefinitionFactory factory      = TypeDefinitionFactory.newInstance();
		final MutableSecondaryTypeDefinition def = factory.createSecondaryTypeDefinition(CmisVersion.CMIS_1_1, baseType ? null : BaseTypeId.CMIS_SECONDARY.value());

		def.setIsCreatable(false);

		initializeExtendedType(def, typeId);

		if (!includePropertyDefinitions) {
			def.removeAllPropertyDefinitions();
		}

		return def;
	}
1032888
public void setBasisType(com.google.api.ads.admanager.axis.v201902.BasisType basisType) {
        this.basisType = basisType;
    }
48351
public Datatype.Builder setType(TypeClass type) {
    this.type = Objects.requireNonNull(type);
    _unsetProperties.remove(Property.TYPE);
    return (Datatype.Builder) this;
  }
819644
public List<Class<?>> directSuperclasses(Class<?> c)
    {
        if(c.isPrimitive()) {
            return primitiveSuperclasses(c);
        }
        else if(c.isArray()) {
            return arrayDirectSuperclasses(0, c);
        }
        else {
            Class<?> [] interfaces = c.getInterfaces();
            Class<?> superclass = c.getSuperclass();

            List<Class<?>> classes = new LinkedList<Class<?>>();
            classes.addAll(Arrays.asList(interfaces));
            if(superclass == null) {
                if(interfaces.length == 0 &&
                   c != Object.class)
                    classes.add(Object.class);
            }
            else {
                classes.add(superclass);
            }

            return classes;
        }
    }
938266
@Nonnull
    public static <T> List<T> filter( @Nonnull Iterable<?> base, @Nonnull Class<T> type ) {
        List<T> r = new ArrayList<>();
        for (Object i : base) {
            if(type.isInstance(i))
                r.add(type.cast(i));
        }
        return r;
    }