Package: InitSectionSpec

InitSectionSpec

nameinstructionbranchcomplexitylinemethod
InitSectionSpec()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
toString()
M: 43 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2009, 2012 Obeo.
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: * Obeo - initial API and implementation
10: *******************************************************************************/
11: package org.eclipse.acceleo.model.mtl.impl.spec;
12:
13: import java.util.List;
14:
15: import org.eclipse.acceleo.model.mtl.impl.InitSectionImpl;
16: import org.eclipse.ocl.ecore.Variable;
17:
18: /**
19: * Specializes the InitSection implementation.
20: *
21: * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
22: */
23: public class InitSectionSpec extends InitSectionImpl {
24:         /**
25:          * {@inheritDoc}
26:          *
27:          * @see org.eclipse.acceleo.model.mtl.impl.InitSectionImpl#toString()
28:          */
29:         @Override
30:         public String toString() {
31:                 final List<Variable> variables = getVariable();
32:
33:                 final StringBuilder toString = new StringBuilder("{"); //$NON-NLS-1$
34:•                for (int i = 0; i < variables.size(); i++) {
35:                         toString.append(variables.get(i).toString());
36:•                        if (i + 1 < variables.size()) {
37:                                 toString.append(';').append(' ');
38:                         }
39:                 }
40:                 toString.append('}');
41:                 return toString.toString();
42:         }
43: }