Skip to content

Package: DefaultConstructorCreator

DefaultConstructorCreator

nameinstructionbranchcomplexitylinemethod
DefaultConstructorCreator()
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%
close()
M: 1 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getOrCreateComponent(Class)
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) 2016, 2022 Oracle and/or its affiliates. All rights reserved.
3: *
4: * This program and the accompanying materials are made available under the
5: * terms of the Eclipse Public License v. 2.0 which is available at
6: * http://www.eclipse.org/legal/epl-2.0,
7: * or the Eclipse Distribution License v. 1.0 which is available at
8: * http://www.eclipse.org/org/documents/edl-v10.php.
9: *
10: * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
11: */
12:
13: package org.eclipse.yasson.internal.components;
14:
15: import java.io.IOException;
16:
17: import org.eclipse.yasson.internal.InstanceCreator;
18: import org.eclipse.yasson.spi.JsonbComponentInstanceCreator;
19:
20: /**
21: * Creates components instance with default constructor.
22: */
23: public class DefaultConstructorCreator implements JsonbComponentInstanceCreator {
24:
25: @Override
26: public <T> T getOrCreateComponent(Class<T> componentClass) {
27: return InstanceCreator.createInstance(componentClass);
28: }
29:
30: @Override
31: public void close() throws IOException {
32:
33: }
34: }