LibreOffice Module xmerge (master) 1
Version.java
Go to the documentation of this file.
1/*
2 * This file is part of the LibreOffice project.
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 *
8 * This file incorporates work covered by the following license notice:
9 *
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
17 */
18
19package org.openoffice.xmerge;
20
27public final class Version {
28
29 private static final Version version = new Version();
30
31 private static final Package pkg = version.getClass().getPackage();
32
36 private Version() {
37 }
38
45 return pkg.getSpecificationVersion();
46 }
47
54 return pkg.getImplementationVersion();
55 }
56
62 public static void main(String args[]) {
63 System.out.println("Specification-Title: " + pkg.getSpecificationTitle());
64 System.out.println("Specification-Vendor: " + pkg.getSpecificationVendor());
65 System.out.println("Specification-Version: " + pkg.getSpecificationVersion());
66 System.out.println("Implementation-Version: " + pkg.getImplementationVersion());
67 }
68}
This class provides a quick utility to check the version of the jar file.
Definition: Version.java:27
static final Version version
Definition: Version.java:29
static final Package pkg
Definition: Version.java:31
static String getSpecificationVersion()
Returns specification version.
Definition: Version.java:44
static String getImplementationVersion()
Returns implementation version.
Definition: Version.java:53
Version()
Private constructor to provide a singleton instance.
Definition: Version.java:36
static void main(String args[])
Main method for printing out version info.
Definition: Version.java:62