001 package com.softnetConsult.utils.reflect;
002
003 /**
004 * Objects of this class encapsulate information about a physical Java class file
005 * including the major class file version, the minor class file version, and the
006 * minimum version of the Java virtual machine required to execute a class file
007 * with the specified major and minor version.
008 *
009 * <p style="font-size:smaller;">This product includes software developed by the
010 * <strong>SoftNet-Consult Java Utility Library</strong> project and its contributors.<br />
011 * (<a href="http://java-tools.sourceforge.net" target="_blank">http://java-tools.sourceforge.net</a>)<br />
012 * Copyright (c) 2007-2008 SoftNet-Consult.<br />
013 * Copyright (c) 2007-2008 G. Paperin.<br />
014 * All rights reserved.
015 * </p>
016 * <p style="font-size:smaller;">File: ClassVersionInfo.java<br />
017 * Library API version: {@value com.softnetConsult.utils.APIProperties#apiVersion}<br />
018 * Java compliance version: {@value com.softnetConsult.utils.APIProperties#javaComplianceVersion}
019 * </p>
020 * <p style="font-size:smaller;">Redistribution and use in source and binary forms, with or
021 * without modification, are permitted provided that the following terms and conditions are met:
022 * </p>
023 * <p style="font-size:smaller;">1. Redistributions of source code must retain the above
024 * acknowledgement of the SoftNet-Consult Java Utility Library project, the above copyright
025 * notice, this list of conditions and the following disclaimer.<br />
026 * 2. Redistributions in binary form must reproduce the above acknowledgement of the
027 * SoftNet-Consult Java Utility Library project, the above copyright notice, this list of
028 * conditions and the following disclaimer in the documentation and/or other materials
029 * provided with the distribution.<br />
030 * 3. All advertising materials mentioning features or use of this software or any derived
031 * software must display the following acknowledgement:<br />
032 * <em>This product includes software developed by the SoftNet-Consult Java Utility Library
033 * project and its contributors.</em>
034 * </p>
035 * <p style="font-size:smaller;">THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY
036 * OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
037 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
038 * THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
039 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
040 * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
041 * </p>
042 * @author Greg Paperin (<a href="http://www.paperin.org" target="_blank">http://www.paperin.org</a>)
043 * @version {@value com.softnetConsult.utils.APIProperties#apiVersion}
044 *
045 */
046 public final class ClassVersionInfo {
047
048 /**
049 * The major version number of a Java class binary.
050 */
051 public final int majorClassVersion;
052
053 /**
054 * The minor version number of a Java class binary.
055 */
056 public final int minorClassVersion;
057
058 /**
059 * The minimum version of the Java virtual machine required to execure a Java
060 * class binary with the major and minor versions specified by {@code majorClassVersion}
061 * and {@code minorClassVersion} respectively.
062 */
063 public final String reqJavaVersion;
064
065 /**
066 * Constructs a new immutable {@code ClassVersionInfo} with the specified major and minor
067 * version numbers and the minumum required JVM version number.
068 *
069 * @param majorClassVer Major version number of a Java class binary.
070 * @param minorClassVer Minor version number of a Java class binary.
071 * @param reqJavaVer Minimum required Java version to run the specified class binary
072 * version (no consistency check is done).
073 */
074 /*package*/ ClassVersionInfo(final int majorClassVer, final int minorClassVer, final String reqJavaVer) {
075 this.majorClassVersion = majorClassVer;
076 this.minorClassVersion = minorClassVer;
077 this.reqJavaVersion = reqJavaVer;
078 }
079
080 } // public final class ClassVersionInfo