Replies the merged list with the extended and implemented types.

@param extension the extended type.
@param implemented the implemented types.
@return the super types.
334304
protected static List<JvmTypeReference> getSuperTypes(JvmTypeReference extension, List<? extends JvmTypeReference> implemented) {
		final List<JvmTypeReference> list = new ArrayList<>();
		if (extension != null) {
			list.add(extension);
		}
		if (implemented != null) {
			list.addAll(implemented);
		}
		return list;
	}
15867
public String add(String extension, String mimeType) {
		Mapping previous = this.map.put(extension, new Mapping(extension, mimeType));
		return (previous != null) ? previous.getMimeType() : null;
	}
1124420
private List<TypeMetadata> getSuperTypeMetadata(AnnotatedType annotatedType) {
        List<TypeMetadata> superTypes = new ArrayList<>();
        for (Class<?> i : annotatedType.getAnnotatedElement().getInterfaces()) {
            superTypes.add(getOrCreateTypeMetadata(i));
        }
        return superTypes;
    }
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;
    }
  }
19656
private function initTypeExtensions()
    {
        $this->typeExtensions = [];

        foreach ($this->loadTypeExtensions() as $extension) {
            if (!$extension instanceof FormTypeExtensionInterface) {
                throw new UnexpectedTypeException($extension, 'Symfony\Component\Form\FormTypeExtensionInterface');
            }

            if (method_exists($extension, 'getExtendedTypes')) {
                $extendedTypes = [];

                foreach ($extension::getExtendedTypes() as $extendedType) {
                    $extendedTypes[] = $extendedType;
                }
            } else {
                @trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', \get_class($extension), FormTypeExtensionInterface::class), E_USER_DEPRECATED);

                $extendedTypes = [$extension->getExtendedType()];
            }

            foreach ($extendedTypes as $extendedType) {
                $this->typeExtensions[$extendedType][] = $extension;
            }
        }
    }
417237
final Collection<JcrNodeType> subtypesFor( JcrNodeType nodeType ) {
        List<JcrNodeType> subtypes = new LinkedList<JcrNodeType>();
        for (JcrNodeType type : this.nodeTypes.values()) {
            if (type.supertypes().contains(nodeType)) {
                subtypes.add(type);
            }
        }
        return subtypes;
    }
240828
public static void checkAmendExtensionsCompatibility(
            final Class<? extends RepositoryMethodDescriptor> descriptorType,
            final List<Annotation> extensions) {
        final List<Class<? extends AmendMethodExtension>> exts =
                Lists.transform(extensions, new Function<Annotation, Class<? extends AmendMethodExtension>>() {
                    @Nonnull
                    @Override
                    public Class<? extends AmendMethodExtension> apply(@Nonnull final Annotation input) {
                        return input.annotationType().getAnnotation(AmendMethod.class).value();
                    }
                });
        for (Class<? extends AmendMethodExtension> ext : exts) {
            check(isCompatible(ext, AmendMethodExtension.class, descriptorType),
                    "Amend extension %s is incompatible with descriptor %s", ext.getSimpleName(),
                    descriptorType.getSimpleName());
        }
    }
1325883
protected List<String> extensionPattern(List<String> extensions) {
        List<String> extensionsPatternStr = new LinkedList<>();
        for (String extension : extensions) {
            extensionsPatternStr.add(Constants.PATTERN + extension);
        }
        return extensionsPatternStr;
    }
342960
public static boolean hasExtension(String extension) {
        if (extension == null || extension.isEmpty()) {
            return false;
        }
        return extensionToMimeTypeMap.containsKey(extension);
    }
24510
public void registerExtensions(final Class<?>... extensions) {
        for (Class<?> extension : extensions) {
            register(ConfigItem.Extension, extension);
        }
    }
1330128
public FileFilterBuilder addExtensions(Iterable<String> extensions) {
        for (String extension : extensions) {
            // Ultimately, SuffixFileFilter will be used, and the "." needs to be explicit.
            this.extensions.add(extension.startsWith(".") ? extension : "." + extension);
        }
        return this;
    }
245260
public static List<LanguageExtension> findAll(Collection<? extends Extension> extensions)
    {
        List<LanguageExtension> result = new ArrayList<LanguageExtension>();
        for (Extension extension : extensions)
        {
            if (LANGUAGE_EXTENSION_ID == extension.getId())
                result.add((LanguageExtension)extension);
        }
        return result;
    }
1275447
public Collection<XAttribute> getAttributesForExtension(XExtension extension) {
		if(extension == null) {
			return getAttributesWithoutExtension();
		} else {
			Set<XAttribute> extensionSet = extensionMap.get(extension);
			if(extensionSet == null) {
				extensionSet = new HashSet<XAttribute>(0);
			}
			return Collections.unmodifiableCollection(extensionSet);
		}
	}
434891
private void addDirectSubTypes(XClass type, ArrayList subTypes)
    {
        if (type.isInterface())
        {
            if (type.getExtendingInterfaces() != null)
            {
                subTypes.addAll(type.getExtendingInterfaces());
            }
            // we have to traverse the implementing classes as these array contains all classes that
            // implement the interface, not only those who have an "implement" declaration
            // note that for whatever reason the declared interfaces are not exported via the XClass interface
            // so we have to get them via the underlying class which is hopefully a subclass of AbstractClass
            if (type.getImplementingClasses() != null)
            {
                Collection declaredInterfaces = null;
                XClass     subType;

                for (Iterator it = type.getImplementingClasses().iterator(); it.hasNext(); )
                {
                    subType = (XClass)it.next();
                    if (subType instanceof AbstractClass)
                    {
                        declaredInterfaces = ((AbstractClass)subType).getDeclaredInterfaces();
                        if ((declaredInterfaces != null) && declaredInterfaces.contains(type))
                        {
                            subTypes.add(subType);
                        }
                    }
                    else
                    {
                        // Otherwise we have to live with the bug
                        subTypes.add(subType);
                    }
                }
            }
        }
        else
        {
            subTypes.addAll(type.getDirectSubclasses());
        }
    }
560201
static boolean canBeLoaded(Map<Class<? extends Extension>, Extension> extensions, Extension extension) {
        return canBeLoaded(extensions, extension, new ArrayList<>());
    }
548784
public <U extends T> List<U> getAll(Class<U> type) {
        List<U> r = new ArrayList<>();
        for (T t : data)
            if(type.isInstance(t))
                r.add(type.cast(t));
        return r;
    }
33394
@FFDCIgnore(IOException.class)
    public static Map<String, Object> parseExtensions(Extension[] extensions) {
        final Map<String, Object> map = new HashMap<String, Object>();
        for (Extension extension : extensions) {
            final String name = extension.name();
            final String key = name.length() > 0 ? StringUtils.prependIfMissing(name, "x-") : name;
            Object value = null;
            try {
                value = Json.mapper().readTree(extension.value());
            } catch (IOException e) {
                value = extension.value();
            }           
            map.put(key, value);
        }

        return map;
    }