summaryrefslogtreecommitdiff
path: root/src/main/java/com/redstoner/annotations/Version.java
blob: 2137c3fbfa6873f0057990779a5360120fc3542a (plain)
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
package com.redstoner.annotations;

import java.lang.annotation.*;

/**
 * The Version annotation, to be applied to all Classes that are part of the project.
 *
 * @author Pepich
 */
@Target (ElementType.TYPE)
@Documented
@Retention (RetentionPolicy.RUNTIME)
public @interface Version {
	/**
	 * The major indicator of the version. Will be used for compatibility detection.
	 *
	 * @return the major version as an int
	 */
	int major();

	int minor();

	int revision();

	/**
	 * The compatibility part of the version number. Will be used for compatibility detection.</br>
	 * Set to -1 if it is supposed to be always compatible.</br>
	 * Defaults to 1.
	 *
	 * @return the smallest compatible version as an int.
	 */
	int compatible() default 1;
}