Adds all direct subtypes to the given list.

@param type     The type for which to determine the direct subtypes
@param subTypes The list to receive the subtypes
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());
        }
    }
1040692
public void addExtends(String superType) {
		if (!Strings.isEmpty(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.container, superType);
			this.sarlInterface.getExtends().add(superTypeRef);
			return;
		}
	}
444815
public void setType(int type) {
        this.type = type;
        if (level == LEVEL_UNDEFINED) {
            switch (type) {
                case TYPE_INT:
                case TYPE_LONG:
                case TYPE_DOUBLE:
                    level = LEVEL_LOW;
                    break;
                case TYPE_STAT:
                    level = LEVEL_MEDIUM;
                    unit = "unit.ms";
                    break;
                case TYPE_LOAD:
                    level = LEVEL_HIGH;
                    break;
                case TYPE_SUBMODULE:
                    level = LEVEL_MAX;
                    break;
                default:
                    break;
            }
        }
    }
1267307
private static Set<TypeMirror> nonPrivateDeclaredTypes(Types typeUtils, TypeMirror type) {
    if (type == null) {
      return new TypeMirrorSet();
    } else {
      Set<TypeMirror> declared = new TypeMirrorSet();
      declared.add(type);
      List<TypeElement> nestedTypes =
          ElementFilter.typesIn(typeUtils.asElement(type).getEnclosedElements());
      for (TypeElement nestedType : nestedTypes) {
        if (!nestedType.getModifiers().contains(PRIVATE)) {
          declared.add(nestedType.asType());
        }
      }
      for (TypeMirror supertype : typeUtils.directSupertypes(type)) {
        declared.addAll(nonPrivateDeclaredTypes(typeUtils, supertype));
      }
      return declared;
    }
  }
922480
public void setSubResources(java.util.Collection<SubResourceSummary> subResources) {
        if (subResources == null) {
            this.subResources = null;
            return;
        }

        this.subResources = new java.util.ArrayList<SubResourceSummary>(subResources);
    }
458061
private void addTypeInternal(AbstractTypeDefinition type) {

        if (type == null) {
            return;
        }

        if (m_types.containsKey(type.getId())) {
            // can't overwrite a type
            return;
        }

        TypeDefinitionContainerImpl tc = new TypeDefinitionContainerImpl();
        tc.setTypeDefinition(type);

        // add to parent
        if (type.getParentTypeId() != null) {
            TypeDefinitionContainerImpl tdc = m_types.get(type.getParentTypeId());
            if (tdc != null) {
                if (tdc.getChildren() == null) {
                    tdc.setChildren(new ArrayList<TypeDefinitionContainer>());
                }
                tdc.getChildren().add(tc);
            }
        }

        m_types.put(type.getId(), tc);
        m_typeList.add(tc);
    }
263485
public void setSubnetGroups(java.util.Collection<SubnetGroup> subnetGroups) {
        if (subnetGroups == null) {
            this.subnetGroups = null;
            return;
        }

        this.subnetGroups = new java.util.ArrayList<SubnetGroup>(subnetGroups);
    }
1179192
public void setSubProtocols(String[] subProtocols) {
        if (subProtocols == null || subProtocols.length == 0) {
            this.subProtocols = null;
            return;
        }
        this.subProtocols = Arrays.asList(subProtocols);
    }
1171651
public static MediaType create(String type, String subtype) {
    return create(type, subtype, ImmutableListMultimap.<String, String>of());
  }
102740
public void setFileTypes(final String[] types) {
		if (types == null) {
			setFileTypes((List<String>) null);
		} else {
			setFileTypes(Arrays.asList(types));
		}
	}
454204
protected List<PType> cloneListType(List<PType> types)
	{
		List<PType> r = new LinkedList<PType>();
		for (PType type : types)
		{
			r.add(type.clone());
		}
		return r;
	}
152424
public void setSlotTypes(java.util.Collection<BuiltinSlotTypeMetadata> slotTypes) {
        if (slotTypes == null) {
            this.slotTypes = null;
            return;
        }

        this.slotTypes = new java.util.ArrayList<BuiltinSlotTypeMetadata>(slotTypes);
    }
454512
public static void addAll(Collection<Object> list, Object[] objects)
	{
		list.addAll(Arrays.asList(objects));
	}
631914
@Override
    public void putAll(Collection<IDataType> types) throws AtlasException {

        for (IDataType type : types) {
            assertValidType(type);
            types_.put(type.getName(), type);
        }
    }
1042633
public void addMimeType(String mimeType) {
		if (!Strings.isEmpty(mimeType)) {
			for (final String mtype : mimeType.split("[:;,]")) { //$NON-NLS-1$
				this.mimeTypes.add(mtype);
			}
		}
	}
1130271
public void setSubnets(java.util.Collection<Subnet> subnets) {
        if (subnets == null) {
            this.subnets = null;
            return;
        }

        this.subnets = new java.util.ArrayList<Subnet>(subnets);
    }
38941
public void addSubTerms(final List<IndexTerm> terms) {
        int subTermsNum;
        if (terms == null) {
            return;
        }

        subTermsNum = terms.size();
        for (int i = 0; i < subTermsNum; i++) {
            addSubTerm(terms.get(i));
        }
    }