org.objectweb.fractal.adl

Class AbstractNode

Implemented Interfaces:
Node
Known Direct Subclasses:
XMLNode

public abstract class AbstractNode
extends Object
implements Node

An abstract Node.

Constructor Summary

AbstractNode(String type)

Method Summary

Object
astGetDecoration(String name)
Returns a decoration of this node.
Map
astGetDecorations()
Returns the decorations of this node.
String
astGetSource()
Returns the source of this node.
String
astGetType()
Returns the type of this node.
void
astSetDecoration(String name, Object decoration)
Sets a decoration of this node.
void
astSetDecorations(Map decorations)
Sets the decorations of this node.
void
astSetSource(String source)
Sets the source of this node.

Constructor Details

AbstractNode

public AbstractNode(String type)

Method Details

astGetDecoration

public Object astGetDecoration(String name)
Returns a decoration of this node.
Specified by:
astGetDecoration in interface Node

Parameters:
name - the decoration's name.

Returns:
a decoration of this node. May be null if this node does not have a decoration with the specified name.


astGetDecorations

public Map astGetDecorations()
Returns the decorations of this node.
Specified by:
astGetDecorations in interface Node

Returns:
the decorations of this node.


astGetSource

public String astGetSource()
Returns the source of this node.
Specified by:
astGetSource in interface Node

Returns:
the source of this node (such as a file name).


astGetType

public String astGetType()
Returns the type of this node.
Specified by:
astGetType in interface Node

Returns:
the type of this node.


astSetDecoration

public void astSetDecoration(String name,
                             Object decoration)
Sets a decoration of this node.
Specified by:
astSetDecoration in interface Node

Parameters:
name - the decoration's name.
decoration - a decoration.


astSetDecorations

public void astSetDecorations(Map decorations)
Sets the decorations of this node.
Specified by:
astSetDecorations in interface Node

Parameters:
decorations - the decorations of this node that must be changed (decorations that are not defined in this argument are left unchanged).


astSetSource

public void astSetSource(String source)
Sets the source of this node.
Specified by:
astSetSource in interface Node

Parameters:
source - the source of this node (such as a file name).