From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC

XDCspec - @Facet

This meta-only unit or config parameter is a facet

The @Facet attribute can only be applied to meta-only modules, interfaces, or Instance config parameters.

A module can have any number of Facet config parameters, but a module may not contain more then one Facet config parameter of the same type.

A Facet config parameter can only reference Instances of modules that are themselves declared to be Facets.

Using a module's or interface's $spec property, it is possible to "query" a module in the meta-domain to determine if it has a particular facet.

 
 
 
 
 
 
 
 
 
var SysMin= xdc.module("xdc.runtime.SysMin");
 
/* get the name of the "xdc.rov.ViewInfo" fact config parameter */
var facet = SysMin.$spec.queryFacet("xdc.rov.ViewInfo");
if (facet != null) {
    /* if SysMin has the "xdc.rov.ViewInfo" facet, get the instance */
    var inst = SysMin[facet];
       : 
}

See also

XDCscript - Module-Object.$spec Module specification object
xdc.services.spec Client documentation for xdc.services.spec


[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved


Views
Personal tools
package reference