version"
From Documentation
Dennischen (talk | contribs) |
|||
Line 19: | Line 19: | ||
package foo; | package foo; | ||
public class MyAddon { | public class MyAddon { | ||
− | + | public static final String UID = "1.0.3"; | |
} | } | ||
</source> | </source> |
Revision as of 08:40, 2 May 2012
Syntax:
<version> <version-class>a_class</version-class> <version-uid>a_version</version-uid> <zk-version>a_version</zk-version> </version>
[Optional]
It specifies the version of this language definition or addon. It also controls whether to ignore this document.
First, ZK checks if the specified class (<version-calss>) matches the version (<version-uid>). Second, it checks if ZK's version is the same or larger than the version specified in <zk-version>.
The specified class, if any, must have a static field called UID. ZK will compare its value with the version specified in <version-uid>. For example,
package foo;
public class MyAddon {
public static final String UID = "1.0.3";
}
Then, you could specify it as follows.
<version>
<version-class>foo.MyAddon</version-class>
<version-uid>1.0.3</version-uid>
<zk-version>5.0.0</zk-version>
</version>
which means foo.MyAddon.UID must be 1.0.3, and WebApp.getVersion() must be 5.0.0 or later.
Version History
Version | Date | Content |
---|---|---|