Skip to content

Package: AbstractComponentBinding

AbstractComponentBinding

nameinstructionbranchcomplexitylinemethod
AbstractComponentBinding(Type)
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%
getBindingType()
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, 2020 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.lang.reflect.Type;
16: import java.util.Objects;
17:
18: /**
19: * Wrapper for user components, components, (de)serializer.
20: * Contains resolved binding type an component.
21: */
22: public abstract class AbstractComponentBinding {
23:
24: private final Type bindingType;
25:
26: /**
27: * Creates info.
28: *
29: * @param bindingType type to which component is bound.
30: */
31: public AbstractComponentBinding(Type bindingType) {
32: Objects.requireNonNull(bindingType);
33: this.bindingType = bindingType;
34: }
35:
36: /**
37: * Resolved binding type of a component.
38: *
39: * @return binding type
40: */
41: public Type getBindingType() {
42: return bindingType;
43: }
44:
45: /**
46: * Class of user component.
47: *
48: * @return component class
49: */
50: public abstract Class<?> getComponentClass();
51: }