EMMA Coverage Report (generated Thu Nov 26 15:54:18 CST 2009)
[all classes][org.eclipse.pde.api.tools.internal.model]

COVERAGE SUMMARY FOR SOURCE FILE [CompositeApiTypeContainer.java]

nameclass, %method, %block, %line, %
CompositeApiTypeContainer.java100% (1/1)67%  (2/3)21%  (12/56)31%  (4/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CompositeApiTypeContainer100% (1/1)67%  (2/3)21%  (12/56)31%  (4/13)
toString (): String 0%   (0/1)0%   (0/44)0%   (0/9)
CompositeApiTypeContainer (IApiElement, List): void 100% (1/1)100% (9/9)100% (3/3)
createApiTypeContainers (): List 100% (1/1)100% (3/3)100% (1/1)

1/*******************************************************************************
2 * Copyright (c) 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 *     IBM Corporation - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.pde.api.tools.internal.model;
12 
13import java.util.Iterator;
14import java.util.List;
15 
16import org.eclipse.core.runtime.CoreException;
17import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
18import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
19 
20/**
21 * A collection of class file containers.
22 * 
23 * @since 1.0
24 */
25public class CompositeApiTypeContainer extends AbstractApiTypeContainer {
26        
27        private List fContainers;
28        
29        /**
30         * Constructs a composite container on the given list of containers.
31         * 
32         * @param containers list of containers
33         */
34        public CompositeApiTypeContainer(IApiElement parent, List containers) {
35                super(parent, IApiElement.API_TYPE_CONTAINER, "Composite Class File Container"); //$NON-NLS-1$
36                this.fContainers = containers;
37        }
38 
39        /* (non-Javadoc)
40         * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#createClassFileContainers()
41         */
42        protected List createApiTypeContainers() throws CoreException {
43                return fContainers;
44        }
45        
46        /**
47         * @see java.lang.Object#toString()
48         */
49        public String toString() {
50                StringBuffer buff = new StringBuffer();
51                buff.append("Composite Class File Container:\n"); //$NON-NLS-1$
52                if(fContainers == null) {
53                        buff.append("\t<EMPTY>"); //$NON-NLS-1$
54                }
55                else {
56                        IApiTypeContainer container = null;
57                        for(Iterator iter = fContainers.iterator(); iter.hasNext();) {
58                                container = (IApiTypeContainer) iter.next();
59                                buff.append("\t"+container.toString()); //$NON-NLS-1$
60                        }
61                }
62                return buff.toString();
63        }
64}

[all classes][org.eclipse.pde.api.tools.internal.model]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov