Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.aendvari.cerberus.component.descriptor
Class ComponentInstance  view ComponentInstance download ComponentInstance.java

java.lang.Object
  extended bycom.aendvari.cerberus.component.descriptor.ComponentInstance

public class ComponentInstance
extends java.lang.Object

Represents an instance of a ComponentDefinition.


Field Summary
protected  java.util.HashMap attributes
          The attributes for this component.
protected  java.lang.String definition
          The component definition of the component instance.
protected  java.util.HashMap messages
          The messages for this component.
protected  java.lang.String name
          The name of this component.
 
Constructor Summary
ComponentInstance()
          Constructs a ComponentInstance.
ComponentInstance(ComponentInstance instance)
          Constructs a ComponentInstance as a copy of the one supplied.
 
Method Summary
 void addAttribute(ComponentAttribute attribute)
          Adds an attribute to this component.
 void addMessage(ComponentMessage message)
          Adds a message to this component.
 ComponentAttribute getAttribute(java.lang.String name)
          Returns the specified attribute.
 java.util.Collection getAttributes()
          Returns the attributes of this component.
 java.lang.String getDefinition()
          Returns the definition for this component.
 ComponentMessage getMessage(java.lang.String name)
          Returns the specified message.
 java.util.Collection getMessages()
          Returns the messages of this component.
 java.lang.String getName()
          Returns the name of this component.
 void setDefinition(java.lang.String setDefinition)
          Sets the definition for this component.
 void setName(java.lang.String setName)
          Sets the name of this component.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 void updateAttribute(java.lang.String name, ComponentAttribute attribute)
          Updates the specified attribute.
 void updateMessage(java.lang.String name, ComponentMessage message)
          Updates the specified message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name of this component.


definition

protected java.lang.String definition
The component definition of the component instance.


messages

protected java.util.HashMap messages
The messages for this component.


attributes

protected java.util.HashMap attributes
The attributes for this component.

Constructor Detail

ComponentInstance

public ComponentInstance()
Constructs a ComponentInstance.


ComponentInstance

public ComponentInstance(ComponentInstance instance)
Constructs a ComponentInstance as a copy of the one supplied.

Method Detail

setName

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


getName

public java.lang.String getName()
Returns the name of this component.


setDefinition

public void setDefinition(java.lang.String setDefinition)
Sets the definition for this component.


getDefinition

public java.lang.String getDefinition()
Returns the definition for this component.


addAttribute

public void addAttribute(ComponentAttribute attribute)
Adds an attribute to this component.


updateAttribute

public void updateAttribute(java.lang.String name,
                            ComponentAttribute attribute)
Updates the specified attribute. This allows the attribute to be renamed.


getAttribute

public ComponentAttribute getAttribute(java.lang.String name)
Returns the specified attribute.


getAttributes

public java.util.Collection getAttributes()
Returns the attributes of this component.


addMessage

public void addMessage(ComponentMessage message)
Adds a message to this component.


updateMessage

public void updateMessage(java.lang.String name,
                          ComponentMessage message)
Updates the specified message. This allows the message to be renamed.


getMessage

public ComponentMessage getMessage(java.lang.String name)
Returns the specified message.


getMessages

public java.util.Collection getMessages()
Returns the messages of this component.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).