org.andromda.core.common
Class TemplateObject

java.lang.Object
  extended by org.andromda.core.common.TemplateObject

public class TemplateObject
extends java.lang.Object

Contains the configuration of a template object which are objects that are made available to the cartridge templates.

Author:
Chad Brandon

Constructor Summary
TemplateObject()
           
 
Method Summary
 void addPropertyReference(java.lang.String reference)
          Adds a templateObject property reference (used to customize templateObjects).
protected  org.apache.log4j.Logger getLogger()
          Gets the namespace logger (the logger under which output for this template object should be written).
 java.lang.String getName()
          Gets the current name of this TemplateObject.
 java.lang.String getNamespace()
          Gets the namespace to which this template object belongs.
 java.lang.Object getObject()
          Returns the actuall object instance described by this template object.
 java.net.URL getResource()
          The resource in which the templateObject was found.
 void setClassName(java.lang.String className)
          Sets the class of the transformation object.
 void setName(java.lang.String name)
          Sets the name of the template object (this name will be what the template class is stored under in the template)
 void setNamespace(java.lang.String namespace)
          Sets the namespace to which this template object belongs.
protected  void setProperties(java.lang.Object templateObject)
          Sets all the nested properties on the templateObject object.
 void setResource(java.net.URL resource)
          Sets the resource in which the templateObject was defined.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateObject

public TemplateObject()
Method Detail

getName

public java.lang.String getName()
Gets the current name of this TemplateObject.

Returns:
String

getObject

public java.lang.Object getObject()
Returns the actuall object instance described by this template object.

Returns:
the actual object instance.

setProperties

protected void setProperties(java.lang.Object templateObject)
Sets all the nested properties on the templateObject object.

Parameters:
templateObject - the template object on which to populate properties.

setName

public void setName(java.lang.String name)
Sets the name of the template object (this name will be what the template class is stored under in the template)

Parameters:
name - the name of the template object.

setClassName

public void setClassName(java.lang.String className)
Sets the class of the transformation object.

Parameters:
className - the name of the template object class.

addPropertyReference

public void addPropertyReference(java.lang.String reference)
Adds a templateObject property reference (used to customize templateObjects). Property references are used to populate bean like properties of template objects.

Parameters:
reference - the name of the property reference.

getResource

public java.net.URL getResource()
The resource in which the templateObject was found.

Returns:
the resource as a URL.

setResource

public void setResource(java.net.URL resource)
Sets the resource in which the templateObject was defined.

Parameters:
resource - the resource on which this template object was defined.

getNamespace

public java.lang.String getNamespace()
Gets the namespace to which this template object belongs.

Returns:
Returns the namespace.

setNamespace

public void setNamespace(java.lang.String namespace)
Sets the namespace to which this template object belongs.

Parameters:
namespace - The namespace to set.

getLogger

protected org.apache.log4j.Logger getLogger()
Gets the namespace logger (the logger under which output for this template object should be written).

Returns:
the logger instance.

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.