org.andromda.core.configuration
Class Namespace

java.lang.Object
  extended by org.andromda.core.configuration.Namespace
All Implemented Interfaces:
java.io.Serializable

public class Namespace
extends java.lang.Object
implements java.io.Serializable

A configurable namespace object. These are passed to Plugin instances (Cartridges, etc.).

Author:
Chad Brandon
See Also:
Serialized Form

Constructor Summary
Namespace()
           
 
Method Summary
 void addProperty(Property property)
          Adds a property to this Namespace object.
 java.lang.String getName()
          Returns name of this Namespace.
 java.util.Collection getProperties()
          Gets all namespaces belonging to this namespaces instance.
 java.util.Collection<Property> getProperties(java.lang.String name)
          Retrieves the properties with the specified name.
 Property getProperty(java.lang.String name)
          Retrieves the property (the first one found) with the specified name.
 void setName(java.lang.String name)
          Sets the name of this Namespace.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Namespace

public Namespace()
Method Detail

getName

public java.lang.String getName()
Returns name of this Namespace. Will correspond to a Plugin name (or it can be be 'default' if we want it's settings to be used everywhere).

Returns:
String

setName

public void setName(java.lang.String name)
Sets the name of this Namespace.

Parameters:
name - The name to set

addProperty

public void addProperty(Property property)
Adds a property to this Namespace object. A property must correspond to a java bean property name on a Plugin in order for it to be set during processing. Otherwise the property will just be ignored.

Parameters:
property - the property to add to this namespace.

getProperties

public java.util.Collection<Property> getProperties(java.lang.String name)
Retrieves the properties with the specified name.

Parameters:
name - the name of the property.
Returns:
the property

getProperty

public Property getProperty(java.lang.String name)
Retrieves the property (the first one found) with the specified name.

Parameters:
name - the name of the property.
Returns:
the property

getProperties

public java.util.Collection getProperties()
Gets all namespaces belonging to this namespaces instance.

Returns:
all namespaces.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.