Populates a field based on baseline and actual values.

@param container field container
@param target target field
@param types fields to test for not-null values
772579
private void populateField(FieldContainer container, FieldType target, FieldType... types)
   {
      for (FieldType type : types)
      {
         Object value = container.getCachedValue(type);
         if (value != null)
         {
            container.set(target, value);
            break;
         }
      }
   }
889468
public <S, D> void put(Class<S> sourceType, Class<D> destinationType, TypeMap<S, ? extends D> typeMap) {
    TypePair<S, D> typePair = TypePair.of(sourceType, destinationType,
        typeMap.getName());
    synchronized (lock) {
      if (typeMaps.containsKey(typePair))
        throw new IllegalArgumentException("TypeMap exists in the store: " + typePair.toString());
      typeMaps.put(typePair, typeMap);
    }
  }
1031073
public void lazilyInject(Object target, Field field) {        
        field.setAccessible(true);
        
        /**
         * We don't need to check for an 
         * {@link com.github.msoliter.iroh.container.annotations.Autowired}
         * annotation because only those fields are capable of having a 
         * reference to one of our local "null" references to begin with. 
         * Directly checking if the object in the field and the null point to
         * the same location is sufficient for determining whether or not to
         * inject the field.
         */
        if (isNullified(target, field)) {
            inject(target, field);            
        }
    }
490742
private void writeFields(String objectName, FieldContainer container, FieldType[] fields) throws IOException
   {
      m_writer.writeStartObject(objectName);
      for (FieldType field : fields)
      {
         Object value = container.getCurrentValue(field);
         if (value != null)
         {
            writeField(field, value);
         }
      }
      m_writer.writeEndObject();
   }
1160532
public void populateTotalTargets(final Long totalTargets) {
        if (totalTargets == null) {
            totalTargetsLabel.setVisible(false);
        } else {
            totalTargetsLabel.setVisible(true);
            totalTargetsLabel.setValue(getTotalTargetMessage(totalTargets));
        }
    }
1348144
@Override
    public void set(IQueryAtomContainer source, IAtomContainer target) {
        queryMol = source;
        mol2 = target;
    }
268051
public void assignManagedTypes(Map<Class<?>, EntityType<?>> managedTypes)
    {
        if (this.entityTypes == null)
        {
            this.entityTypes = managedTypes;
        }
        else
        {
            this.entityTypes.putAll(managedTypes);
        }
    }
109665
private void populateContainer(FieldType field, List<Pair<String, String>> items)
   {
      CustomField config = m_container.getCustomField(field);
      CustomFieldLookupTable table = config.getLookupTable();

      for (Pair<String, String> pair : items)
      {
         CustomFieldValueItem item = new CustomFieldValueItem(Integer.valueOf(0));
         item.setValue(pair.getFirst());
         item.setDescription(pair.getSecond());
         table.add(item);
      }
   }
485690
public void setContainers(java.util.Collection<Container> containers) {
        if (containers == null) {
            this.containers = null;
            return;
        }

        this.containers = new java.util.ArrayList<Container>(containers);
    }
773334
@SuppressWarnings({ "unchecked", "rawtypes" })
    @Override
    public Object readArray(Type target) {
        int count = readInteger();
        log.debug("Count: {} and {} ref {}", new Object[] { count, (count & 1), (count >> 1) });
        if ((count & 1) == 0) {
            //Reference
            Object ref = getReference(count >> 1);
            if (ref != null) {
                return ref;
            }
        }
        count = (count >> 1);
        String key = readString();
        amf3_mode += 1;
        Object result;
        if (key.equals("")) {
            Class<?> nested = Object.class;
            Class<?> collection = Collection.class;
            Collection resultCollection;
            if (target instanceof ParameterizedType) {
                ParameterizedType t = (ParameterizedType) target;
                Type[] actualTypeArguments = t.getActualTypeArguments();
                if (actualTypeArguments.length == 1) {
                    nested = (Class<?>) actualTypeArguments[0];
                }
                target = t.getRawType();
            }
            if (target instanceof Class) {
                collection = (Class) target;
            }
            if (collection.isArray()) {
                nested = ArrayUtils.getGenericType(collection.getComponentType());
                result = Array.newInstance(nested, count);
                storeReference(result);
                for (int i = 0; i < count; i++) {
                    final Object value = Deserializer.deserialize(this, nested);
                    Array.set(result, i, value);
                }
            } else {
                if (SortedSet.class.isAssignableFrom(collection)) {
                    resultCollection = new TreeSet();
                } else if (Set.class.isAssignableFrom(collection)) {
                    resultCollection = new HashSet(count);
                } else {
                    resultCollection = new ArrayList(count);
                }
                result = resultCollection;
                storeReference(result);
                for (int i = 0; i < count; i++) {
                    final Object value = Deserializer.deserialize(this, nested);
                    resultCollection.add(value);
                }
            }
        } else {
            Class<?> v = Object.class;
            Class<?> collection = Collection.class;
            if (target instanceof ParameterizedType) {
                ParameterizedType t = (ParameterizedType) target;
                Type[] actualTypeArguments = t.getActualTypeArguments();
                if (actualTypeArguments.length == 2) {
                    //k = (Class<?>) actualTypeArguments[0];
                    v = (Class<?>) actualTypeArguments[1];
                }
                target = t.getRawType();
            }
            if (target instanceof Class) {
                collection = (Class) target;
            }
            if (SortedMap.class.isAssignableFrom(collection)) {
                collection = TreeMap.class;
            } else {
                collection = HashMap.class;
            }
            Map resultMap;
            try {
                resultMap = (Map) collection.newInstance();
            } catch (Exception e) {
                resultMap = new HashMap(count);
            }
            // associative array
            storeReference(resultMap);
            while (!key.equals("")) {
                final Object value = Deserializer.deserialize(this, v);
                resultMap.put(key, value);
                key = readString();
            }
            for (int i = 0; i < count; i++) {
                final Object value = Deserializer.deserialize(this, v);
                resultMap.put(i, value);
            }
            result = resultMap;
        }
        amf3_mode -= 1;
        return result;
    }
510211
public void setContainers(java.util.Collection<ModelPackageContainerDefinition> containers) {
        if (containers == null) {
            this.containers = null;
            return;
        }

        this.containers = new java.util.ArrayList<ModelPackageContainerDefinition>(containers);
    }
509928
@Override
    public Map<Field, GenContainer> scan(final Class t) {
        final Map<Field, GenContainer> populateAnnotationMap = new LinkedHashMap<>();

        // Check if class is auto generative
        final boolean isAutoGen = Arrays.stream(t.getDeclaredAnnotations())
                .anyMatch(a -> a.annotationType().equals(GenAuto.class));

        for (final Field field : t.getDeclaredFields()) {
            GenContainer genContainer = findGenAnnotation(field);

            // Create auto gen container class is auto generative
            if (genContainer == null && isAutoGen) {
                Class<? extends IGenerator> generator = getAutoGenerator(field.getType());
                if (generator.equals(NullGenerator.class)) {
                    // Try to treat field as embedded object, when no suitable generator
                    generator = EmbeddedGenerator.class;
                }

                genContainer = GenContainer.asAuto(generator, isComplex(field));
            }

            if (genContainer != null) {
                populateAnnotationMap.put(field, genContainer);
            }
        }

        return populateAnnotationMap;
    }
141250
private void setResourceTypes(Map<String, String[]> types) {

        if ((types == null) || (types.size() == 0)) {
            setValidConfiguration(false);
            LOG.error(Messages.get().getBundle().key(Messages.LOG_NO_RESOURCE_TYPES_0));
        }
        m_resTypes = types;
    }
105501
private static void populateSuperTypeArgs(final Type[] types, final Map<TypeVariable<?>, Type> map,
      boolean depthFirst) {
    for (Type type : types) {
      if (type instanceof ParameterizedType) {
        ParameterizedType parameterizedType = (ParameterizedType) type;
        if (!depthFirst)
          populateTypeArgs(parameterizedType, map, depthFirst);
        Type rawType = parameterizedType.getRawType();
        if (rawType instanceof Class)
          populateSuperTypeArgs(((Class<?>) rawType).getGenericInterfaces(), map, depthFirst);
        if (depthFirst)
          populateTypeArgs(parameterizedType, map, depthFirst);
      } else if (type instanceof Class) {
        populateSuperTypeArgs(((Class<?>) type).getGenericInterfaces(), map, depthFirst);
      }
    }
  }
154459
public void collectEntries(Collection<V> target) {

        if (m_value != null) {
            target.add(m_value);
        }
        for (CmsPathTree<P, V> child : m_children.values()) {
            child.collectEntries(target);
        }
    }
848943
public void updateContent(List<CmsResourceTypeBean> types, List<String> selectedTypes) {

        clearList();
        fillContent(types, selectedTypes);
    }
847886
public <V> void sget(FieldId<?, ? extends V> fieldId, Local<V> target) {
        addInstruction(new ThrowingCstInsn(Rops.opGetStatic(target.type.ropType), sourcePosition,
                RegisterSpecList.EMPTY, catches, fieldId.constant));
        moveResult(target, true);
    }