Skip to content

Package: ECPAdditionalRendererDescription

ECPAdditionalRendererDescription

nameinstructionbranchcomplexitylinemethod
ECPAdditionalRendererDescription(Class, ECPAdditionalRendererTester)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getRenderer()
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%
getTester()
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%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eugen - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.internal.swt;
15:
16: import org.eclipse.emf.ecp.view.spi.model.VElement;
17: import org.eclipse.emf.ecp.view.spi.swt.ECPAdditionalRendererTester;
18: import org.eclipse.emfforms.spi.swt.core.AbstractAdditionalSWTRenderer;
19:
20: /**
21: * A class describing a rendererClass.
22: *
23: * @author Eugen Neufeld
24: *
25: */
26: public class ECPAdditionalRendererDescription {
27:
28:         private final Class<AbstractAdditionalSWTRenderer<VElement>> rendererClass;
29:         private final ECPAdditionalRendererTester tester;
30:
31:         /**
32:          * The constructor of the ControlDescription.
33:          *
34:          * @param rendererClass the rendererClass
35:          * @param tester the class testing whether the rendererClass is applicable for the current view model context
36:          */
37:         public ECPAdditionalRendererDescription(Class<AbstractAdditionalSWTRenderer<VElement>> rendererClass,
38:                 ECPAdditionalRendererTester tester) {
39:                 super();
40:                 this.rendererClass = rendererClass;
41:                 this.tester = tester;
42:         }
43:
44:         /**
45:          * The rendererClass. It extends the {@link AbstractAdditionalSWTRenderer}.
46:          *
47:          * @return the class implementing this rendererClass
48:          */
49:         public Class<AbstractAdditionalSWTRenderer<VElement>> getRenderer() {
50:                 return rendererClass;
51:         }
52:
53:         /**
54:          * The tester for this rendererClass. The tester is used to check whether this rendererClass is usable on a specific
55:          * view
56:          * model context.
57:          *
58:          * @return the {@link ECPAdditionalRendererTester} implementation
59:          */
60:         public ECPAdditionalRendererTester getTester() {
61:                 return tester;
62:         }
63: }