001 /**
002 * <copyright>
003 *
004 * Copyright (c) 2004 IBM Corporation and others.
005 * All rights reserved. This program and the accompanying materials
006 * are made available under the terms of the Eclipse Public License v1.0
007 * which accompanies this distribution, and is available at
008 * http://www.eclipse.org/legal/epl-v10.html
009 *
010 * Contributors:
011 * IBM - Initial API and implementation
012 *
013 * </copyright>
014 *
015 * $Id: DiagnosticChain.java,v 1.2 2005/06/08 06:19:08 nickb Exp $
016 */
017 package org.eclipse.emf.common.util;
018
019 /**
020 * An accumulator of diagnostics.
021 */
022 public interface DiagnosticChain
023 {
024 /**
025 * Adds the diagnostic to the chain.
026 */
027 void add(Diagnostic diagnostic);
028
029 /**
030 * Adds the {@link Diagnostic#getChildren children} of the diagnostic to the chain.
031 */
032 void addAll(Diagnostic diagnostic);
033
034 /**
035 * If the diagnostic has {@link Diagnostic#getChildren children},
036 * {@link #addAll add}s those children,
037 * otherwise, {@link #add add}s the diagnostic.
038 */
039 void merge(Diagnostic diagnostic);
040 }