package xdc.services.spec |
|
Java classes to access XDCspec information
This package contains several Java classes that enable clients to
retrieve inforation about modules, interfaces, and packages from their
specification files (i.e.,
*.xdc files). Being Java classes, the APIs
provided are available to both Java applications and XDCscripts (via the
$spec property of the module, interface, or package).
[
more ... ]
package xdc.services.spec [1, 0, 0, 0] {
}
DETAILS
This package contains several Java classes that enable clients to
retrieve inforation about modules, interfaces, and packages from their
specification files (i.e., *.xdc files). Being Java classes, the APIs
provided are available to both Java applications and XDCscripts (via the
$spec property of the module, interface, or package).
- [Pkg]
-
Package related information available from a package's $spec
property.
- [Unit]
-
Module (or interface) related information available from a
module's (or interface's) $spec property.
NOTE
When accessing the Java methods provided by this package via XDCscript,
you can either either use their liternames (e.g., getName()) or use
the JavaBeans pattern of getters and setters in which the method
getName() can be accessed via just name. The examples below provide
examples of how this pattern can be used.
XDCSCRIPT EXAMPLES
Get the declared name of a module:
var Mod = xdc.module('pkg.Mod');
print("Module declared as " + Mod.$spec.getName());
This same example can be written using the JavaBean pattern as follows:
var Mod = xdc.module('pkg.Mod');
print("Module declared as " + Mod.$spec.name);
SEE
generated on Thu, 16 Jun 2011 22:53:10 GMT