Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
DirectBTVersion.java
Go to the documentation of this file.
1 /**
2  * Author: Sven Gothel <sgothel@jausoft.com>
3  * Copyright (c) 2021 Gothel Software e.K.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files (the
7  * "Software"), to deal in the Software without restriction, including
8  * without limitation the rights to use, copy, modify, merge, publish,
9  * distribute, sublicense, and/or sell copies of the Software, and to
10  * permit persons to whom the Software is furnished to do so, subject to
11  * the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
25 package org.direct_bt;
26 
27 import java.util.jar.Manifest;
28 
29 import org.jau.util.JauVersion;
30 import org.jau.util.VersionUtil;
31 
32 /**
33  * This {@code jaulib} derived version info class is only
34  * usable when having {@code jaulib} available, naturally.
35  */
36 public class DirectBTVersion extends JauVersion {
37 
38  protected DirectBTVersion(final String packageName, final Manifest mf) {
39  super(packageName, mf);
40  }
41 
42  /**
43  * Returns a transient new instance.
44  */
45  public static DirectBTVersion getInstance() {
46  final String packageNameCompileTime = "org.direct_bt";
47  final String packageNameRuntime = "org.direct_bt";
48  Manifest mf = VersionUtil.getManifest(DirectBTVersion.class.getClassLoader(), packageNameRuntime);
49  if(null != mf) {
50  return new DirectBTVersion(packageNameRuntime, mf);
51  } else {
52  mf = VersionUtil.getManifest(DirectBTVersion.class.getClassLoader(), packageNameCompileTime);
53  return new DirectBTVersion(packageNameCompileTime, mf);
54  }
55  }
56 
57  public static void main(final String args[]) {
58  BTFactory.main(args);
59  }
60 }
org.direct_bt.DirectBTVersion.getInstance
static DirectBTVersion getInstance()
Returns a transient new instance.
Definition: DirectBTVersion.java:45
org.direct_bt.DirectBTVersion.DirectBTVersion
DirectBTVersion(final String packageName, final Manifest mf)
Definition: DirectBTVersion.java:38
org.direct_bt.DirectBTVersion
This.
Definition: DirectBTVersion.java:36
org.direct_bt.BTFactory
One stop BTManager API entry point.
Definition: BTFactory.java:52
org.direct_bt.DirectBTVersion.main
static void main(final String args[])
Definition: DirectBTVersion.java:57
org.direct_bt.BTFactory.main
static void main(final String args[])
Definition: BTFactory.java:530
org