Clover icon

sunshower-sdk

  1. Project Clover database Wed Apr 4 2018 21:39:43 UTC
  2. Package io.sunshower.sdk.core.model

File Extensions.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart0.png
34% of files have more coverage

Code metrics

4
14
2
1
31
27
4
0.29
7
2
2

Classes

Class Line # Actions
Extensions 8 14 4
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.sdk.core.model;
2   
3    import io.sunshower.kernel.api.ExtensionCoordinate;
4    import io.sunshower.kernel.api.ExtensionPointDefinition;
5    import io.sunshower.sdk.kernel.model.ExtensionPointCoordinateElement;
6    import io.sunshower.sdk.kernel.model.ExtensionPointDescriptorElement;
7   
 
8    public interface Extensions {
 
9  0 toggle default ExtensionPointDescriptorElement toElement(ExtensionPointDefinition<?> e) {
10   
11  0 if (e == null) {
12  0 return null;
13    }
14  0 final ExtensionPointDescriptorElement ele = new ExtensionPointDescriptorElement();
15  0 ele.setCoordinates(toElement(e.getCoordinate()));
16  0 ele.setExtensionType(e.getExtensionPoint());
17  0 ele.setLocation(e.getMetadata().getDeploymentLocation());
18  0 return ele;
19    }
20   
 
21  0 toggle default ExtensionPointCoordinateElement toElement(ExtensionCoordinate coordinate) {
22  0 if (coordinate == null) {
23  0 return null;
24    }
25  0 final ExtensionPointCoordinateElement ele = new ExtensionPointCoordinateElement();
26  0 ele.setGroup(coordinate.getGroup());
27  0 ele.setName(coordinate.getName());
28  0 ele.setNamespace(coordinate.getNamespace());
29  0 return ele;
30    }
31    }