Populates the {@code map} with with variable/argument pairs for the given {@code types}.
970704
static void buildTypeVariableMap(final Type[] types, final Map<TypeVariable<?>, Type> map) {
        for (Type type : types) {
            if (type instanceof ParameterizedType) {
                ParameterizedType parameterizedType = (ParameterizedType) type;
                buildTypeVariableMap(parameterizedType, map);
                Type rawType = parameterizedType.getRawType();
                if (rawType instanceof Class)
                    buildTypeVariableMap(((Class<?>) rawType).getGenericInterfaces(), map);
            } else if (type instanceof Class) {
                buildTypeVariableMap(((Class<?>) type).getGenericInterfaces(), map);
            }
        }
    }
1182627
public void putAll(final Map<String, String> map) {
        for (final Map.Entry<String, ?> entry : map.entrySet()) {
            data.putValue(entry.getKey(), entry.getValue());
        }
    }
622141
public static void populate(Object target, Map properties) throws BeanMappingException {
        BeanMap map = BeanMap.create(target.getClass());
        map.populate(target, properties);
    }
659755
private static Multimap<Variable, Type> getInstanceVarTypeMap(
            Set<Fragment> allFragments, Map<Variable, Type> labelVarTypeMap) {
        Multimap<Variable, Type> instanceVarTypeMap = HashMultimap.create();
        int oldSize;
        do {
            oldSize = instanceVarTypeMap.size();
            allFragments.stream()
                    .filter(fragment -> labelVarTypeMap.containsKey(fragment.start())) // restrict to types
                    .filter(fragment -> fragment instanceof InIsaFragment || fragment instanceof InSubFragment) //
                    .forEach(fragment -> instanceVarTypeMap.put(fragment.end(), labelVarTypeMap.get(fragment.start())));
        } while (oldSize != instanceVarTypeMap.size());
        return instanceVarTypeMap;
    }
296889
@NotNull
    protected  Map<String, Map<String, Object>>  toTypeArguments(ParameterElement... parameters) {
        final LinkedHashMap<String, Map<String, Object>>  map = new LinkedHashMap<>(parameters.length);
        for (ParameterElement ce : parameters) {
            final ClassElement type = ce.getType();
            if (type == null) {
                continue;
            }
            final Map<String, ClassElement> subArgs = type.getTypeArguments();
            if (CollectionUtils.isNotEmpty(subArgs)) {
                map.put(ce.getName(), toTypeArguments(subArgs));
            }
        }
        return map;
    }
507252
public static StringValueMap fromMaps(Map<?, ?>... maps) {
		StringValueMap result = new StringValueMap();
		if (maps != null && maps.length > 0) {
			for (Map<?, ?> map : maps)
				result.append(map);
		}
		return result;
	}
1264537
public void setTypes(java.util.Collection<Type> types) {
        if (types == null) {
            this.types = null;
            return;
        }

        this.types = new java.util.ArrayList<Type>(types);
    }
806136
@SuppressWarnings("PMD.AvoidProtectedMethodInFinalClassNotExtending")
    protected static Type[] resolveTypeVariables(final Type[] types,
                                                 final Map<String, Type> generics,
                                                 final boolean countPreservedVariables) {
        if (types.length == 0) {
            return NO_TYPES;
        }
        final Type[] resolved = new Type[types.length];
        for (int i = 0; i < types.length; i++) {
            resolved[i] = resolveTypeVariables(types[i], generics, countPreservedVariables);
        }
        return resolved;
    }
1248104
@SuppressWarnings({"unchecked", "rawtypes"})
    private void populateMap(Map map, Node node) {
        Map.Entry entry = getMapEntry(node);
        if (entry != null) {
            map.put(entry.getKey(), entry.getValue());
        }
    }
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;
    }
161978
@SuppressWarnings("PMD.LooseCoupling")
    public static LinkedHashMap<String, Type> createGenericsMap(final Class<?> type,
                                                                final List<? extends Type> generics) {
        final TypeVariable<? extends Class<?>>[] params = type.getTypeParameters();
        if (params.length != generics.size()) {
            throw new IllegalArgumentException(String.format(
                    "Can't build generics map for %s with %s because of incorrect generics count",
                    type.getSimpleName(), Arrays.toString(generics.toArray())));
        }
        final LinkedHashMap<String, Type> res = new LinkedHashMap<String, Type>();
        int i = 0;
        for (TypeVariable var : params) {
            res.put(var.getName(), generics.get(i++));
        }
        // add possible outer class generics to avoid unknown generics
        return GenericsResolutionUtils.fillOuterGenerics(type, res, null);
    }
1007025
private static Map<TypeVariable<?>, Type> mergeMaps(TypeDiscoverer<?> parent, Map<TypeVariable<?>, Type> map) {

        Map<TypeVariable<?>, Type> typeVariableMap = new HashMap<TypeVariable<?>, Type>();
        typeVariableMap.putAll(map);
        typeVariableMap.putAll(parent.getTypeVariableMap());

        return typeVariableMap;
    }
22694
public void putAll(Map<String, Object> map) {
        for (Map.Entry<String, Object> entry : map.entrySet())
            objectMap.put(entry.getKey(), entry.getValue());
    }
617786
public void putAll(Map<String, ? extends Object> map) {
        if (map.size() > 0) {
            for (String key : map.keySet()) {
                if (VALID_KEY.matcher(key).matches() == false) {
                    throw new IllegalArgumentException("Invalid key for FlexiBean: " + key);
                }
            }
            if (data == Collections.EMPTY_MAP) {
                data = new LinkedHashMap<>(map);
            } else {
                data.putAll(map);
            }
        }
    }
49816
private TypeVarToTypeMap mapTypes( TypeVarToTypeMap actualParamByVarName, IType... types )
  {
    for( int i = 0; i < types.length; i++ )
    {
      IType type = types[i];
      if( type instanceof ITypeVariableType )
      {
        actualParamByVarName.put( (ITypeVariableType)types[i], types[i] );
      }
      if( type instanceof ITypeVariableArrayType )
      {
        mapTypes( actualParamByVarName, type.getComponentType() );
      }
      if( type.isParameterizedType() )
      {
        IType[] parameters = type.getTypeParameters();
        mapTypes( actualParamByVarName, parameters );
      }
      if( type instanceof IFunctionType )
      {
        IFunctionType funType = (IFunctionType)type;
        mapTypes( actualParamByVarName, funType.getReturnType() );
        IType[] paramTypes = funType.getParameterTypes();
        for( IType paramType : paramTypes )
        {
          mapTypes( actualParamByVarName, paramType );
        }
      }
    }
    return actualParamByVarName;
  }
135966
private static Map<TypeVariable<?>, Type> getAllAssignments(final Type t) {
        return spider(new TypeVariableMap(), new HashSet<>(), t);
    }
900419
public static Type unrollVariables(Map<TypeVariable<?>, Type> typeArguments, final Type type) {
        if (typeArguments == null) {
            typeArguments = Collections.emptyMap();
        }
        if (containsTypeVariables(type)) {
            if (type instanceof TypeVariable<?>) {
                return unrollVariables(typeArguments, typeArguments.get(type));
            }
            if (type instanceof ParameterizedType) {
                final ParameterizedType p = (ParameterizedType) type;
                final Map<TypeVariable<?>, Type> parameterizedTypeArguments;
                if (p.getOwnerType() == null) {
                    parameterizedTypeArguments = typeArguments;
                } else {
                    parameterizedTypeArguments = new HashMap<>(typeArguments);
                    parameterizedTypeArguments.putAll(TypeUtils.getTypeArguments(p));
                }
                final Type[] args = p.getActualTypeArguments();
                for (int i = 0; i < args.length; i++) {
                    final Type unrolled = unrollVariables(parameterizedTypeArguments, args[i]);
                    if (unrolled != null) {
                        args[i] = unrolled;
                    }
                }
                return parameterizeWithOwner(p.getOwnerType(), (Class<?>) p.getRawType(), args);
            }
            if (type instanceof WildcardType) {
                final WildcardType wild = (WildcardType) type;
                return wildcardType().withUpperBounds(unrollBounds(typeArguments, wild.getUpperBounds()))
                    .withLowerBounds(unrollBounds(typeArguments, wild.getLowerBounds())).build();
            }
        }
        return type;
    }