summaryrefslogtreecommitdiff
path: root/src/msil/ch/epfl/lamp/compiler/msil/Version.java
blob: ad4b09b16319cb3115974bb1322b3570790a9ff2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * System.Reflection-like API for access to .NET assemblies (DLL & EXE)
 */


package ch.epfl.lamp.compiler.msil;


/**
 * Represents the version number for a common language runtime assembly
 *
 * @author Nikolay Mihaylov
 * @version 1.0
 */
public final class Version {

    //##########################################################################
    // public interface

    /**
     * Gets the value of the major component of the version
     * number for this instance.
     */
    public final int  Major;

    /**
     * Gets the value of the minor component of the version
     * number for this instance.
     */
    public final int Minor;

    /**
     * Gets the value of the build component of the version
     * number for this instance.
     */
    public final int Build;

    /**
     * Gets the value of the revision component of the version
     * number for this instance.
     */
    public final int Revision;

    /**
     * Initializes a new instance of the Version class.
     */
    public Version() {
	this(0,0,0,0);
    }

    /**
     * Initializes a new instance of the Version class with
     * the specified major, minor, build, and revision numbers.
     */
    public Version(int major, int minor, int build, int revision) {
	this.Major = major;
	this.Minor = minor;
	this.Build = build;
	this.Revision = revision;
    }

    /**
     * Converts the value of this instance to its equivalent String representation
     */
    public String toString() {
	return "" + Major + "." + Minor + "." + Build + "." +  Revision;
    }

    //##########################################################################

} // class Version