org.inria.ns.reflex.processor.core
Class VersionAttr

java.lang.Object
  extended by org.inria.ns.reflex.processor.ForeignAttribute.Impl
      extended by org.inria.ns.reflex.processor.core.VersionAttr
All Implemented Interfaces:
Comparable, ForeignAttribute

public class VersionAttr
extends ForeignAttribute.Impl

A foreign attribute that set the version of a module to use. The key of the module is the namespace URI of the attribute.

This class may be safely used by all modules that define this foreign attribute.

Usage

 <elem foo:version="1.0"/>
 

Module definition

 <exp:attribute
     name="foo:version"
     impl="org.inria.ns.reflex.processor.core.VersionAttr"/>
 

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.processor.ForeignAttribute
ForeignAttribute.Impl, ForeignAttribute.Marker
 
Constructor Summary
VersionAttr()
           
 
Method Summary
 AbstractAction apply(AbstractAction parent, Element element, SortedList foreignAttrs)
          Set the version of a module to use.
 int getPriority()
          Return the priority of this foreign attribute, that is zero.
 
Methods inherited from class org.inria.ns.reflex.processor.ForeignAttribute.Impl
compareTo, getName, getValue, setName, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionAttr

public VersionAttr()
Method Detail

apply

public AbstractAction apply(AbstractAction parent,
                            Element element,
                            SortedList foreignAttrs)
Set the version of a module to use. This foreign attribute applied when unmarshalling only.

Parameters:
parent - The action depending from.
element - The XML element that contains the foreign attribute.
foreignAttrs - The other foreign attributes found within the element that hosts the attribute. Not used.
Returns:
The parent action, which is unchanged.

getPriority

public int getPriority()
Return the priority of this foreign attribute, that is zero.

Returns:
0 = the priority level of this foreign attribute.