<p>
delete all descendant elements that is specified tag type having
specified class attribute.
</p>

@param clazz
class attribute
@param tagType
161966
@SuppressWarnings("unchecked")
    public <T extends AbstractJaxb> void removeDescendants(String clazz,
            Class<T> tagType) {
        RemoveDescendantsUtil.removeDescendants((T) this, clazz, tagType);
    }
1232951
@SuppressWarnings("unchecked")
  public <T extends Tag<?>> List<T> getTags(Class<T> tagClass) {
    List<T> matches = new LinkedList<T>();
    Iterator<Tag<?>> tagIter = _tags.iterator();
    while (tagIter.hasNext()) {
      Tag<?> tag = tagIter.next();
      if (tagClass.isInstance(tag)) {
        matches.add((T)tag);
      }
    }
    return matches;
  }
17286
public void setTags( Collection<String> tags ) {

		synchronized( this.tags ) {
			this.tags.clear();
			if( tags != null )
				this.tags.addAll( tags );
		}
	}
1054009
public void removeCustomTag(String virtual) throws SecurityException {
	checkWriteAccess();

	Element mappings = _getRootElement("custom-tag");
	Element[] children = XMLConfigWebFactory.getChildren(mappings, "mapping");
	for (int i = 0; i < children.length; i++) {
	    if (virtual.equals(createVirtual(children[i]))) mappings.removeChild(children[i]);
	}
    }
803281
@SuppressWarnings("unchecked")
  public <T extends Tag> T getTag(Class<T> tagClass) {
    List<T> matches = getTags(tagClass);
    T matchingTag = null;
    if (matches.size() > 0) {
      matchingTag = matches.get(0);
    }
//    if (matches.size() >= 2) {
//      throw new IllegalStateException("Multiple identical tags found (" + matches + ")");
//    }
//    else if (matches.size() == 1) {
//      matchingTag = matches.get(0);
//    }
    return matchingTag;
  }
118204
public boolean deleteTags(final List<String> resources) {

        for (MockTags mockTags : allMockTags) {
           if (mockTags.getResourcesSet().containsAll(resources)) {
               allMockTags.remove(mockTags);
               return true;
           }
        }

        return false;
    }
372329
public void setClassTag (String tag, Class type) {
		if (tag == null) throw new IllegalArgumentException("tag cannot be null.");
		if (type == null) throw new IllegalArgumentException("type cannot be null.");
		classNameToTag.put(type.getName(), tag);
		tagToClass.put(tag, type);
	}
554388
public void deleteElement(Object parent, String name) {
		Element element = getElement(parent, name);
		if (element != null) {
			Element group = (Element) element.getParentElement();
			if (group != null) {
				deleteRecursively(group, element);
			}
		}
	}
233368
public void removeTag(Reference reference, String tag) {
		getResourceFactory()
				.getApiResource("/tag/" + reference.toURLFragment())
				.queryParam("text", tag).delete();
	}
1355733
public static <T extends Tree> Matcher<T> isSameType(Class<?> clazz) {
    return new IsSameType<>(typeFromClass(clazz));
  }
880903
public void removeTagFromFileModel(FileModel fileModel, String tagName)
    {
        Traversable<Vertex, Vertex> q = getGraphContext().getQuery(TechnologyTagModel.class)
                .traverse(g -> g.has(TechnologyTagModel.NAME, tagName));
        TechnologyTagModel technologyTag = super.getUnique(q.getRawTraversal());

        if (technologyTag != null)
            technologyTag.removeFileModel(fileModel);
    }
1164544
public void setTagsToDelete(java.util.Collection<String> tagsToDelete) {
        if (tagsToDelete == null) {
            this.tagsToDelete = null;
            return;
        }

        this.tagsToDelete = new com.amazonaws.internal.SdkInternalList<String>(tagsToDelete);
    }
308687
@SuppressWarnings("unchecked")
  protected <T extends Component> T findAncestor(Class<T> clazz) {
    Stack<? extends Component> componentStack = getComponentStack();
    for (int i = componentStack.size() - 2; i >= 0; i--) {
      Component component = componentStack.get(i);
      if (clazz.equals(component.getClass())) return (T) component;
    }
    return null;
  }
450067
public static void removeLastChild(Element tag) {
    final Node last = tag.getLastChild();
    if(last != null) {
      tag.removeChild(last);
    }
  }
870763
public final void removeElementsWithTag(@Nonnull String tag) {
        getElements().stream()
                .map(ElementView::getElement)
                .filter(e -> e.hasTag(tag))
                .forEach(this::removeElement);
    }
793127
public void removeTag(Tag tag) {
    Iterable<Tag> tags = getTags();
    removeAll(tags, singletonList(tag));
    set(PackageMetadata.TAGS, tag);
  }
603076
public void deleteAllPresentationModelsOfType(String presentationModelType) {
        getClientConnector().send(new DeletedAllPresentationModelsOfTypeNotification(presentationModelType));
        List<ClientPresentationModel> models = new LinkedList<ClientPresentationModel>(findAllPresentationModelsByType(presentationModelType));
        for (ClientPresentationModel model: models) {
            delete(model, false);
        }
    }