org.objectweb.kilim.description
Class Reference

java.lang.Object
  extended byorg.objectweb.kilim.description.TemplateElementImpl
      extended byorg.objectweb.kilim.description.Reference
All Implemented Interfaces:
BasicElement, java.lang.Cloneable, TemplateElement

public class Reference
extends TemplateElementImpl
implements BasicElement

Author:
horn

Field Summary
private  BasicNamedElement boundElement
           
private  boolean performsAction
           
private  boolean providesValue
           
private  java.lang.String targetName
           
 
Fields inherited from class org.objectweb.kilim.description.TemplateElementImpl
 
Constructor Summary
Reference(java.lang.String aTargetName, TemplateDescription aTemplate, boolean isP, boolean isT)
          a public constructor for references..
 
Method Summary
 int getKind()
          returns the element kind.
 java.lang.String getTargetName()
          returns the name of the target.
 boolean isEventSource()
          indicates whether the element is an event source or not.
 boolean performsAction()
          Basic elements either provide values or exceute actions that complete the instatiation process This method.
 boolean providesValue()
          Basic elements either provide values or exceute actions that complete the instatiation process This method.
 void setContainingTemplate(TemplateDescription aTemplate)
          sets the template in which the element is defined.
 void setTargetName(java.lang.String aName)
          sets the name of a target for the reference.
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.kilim.description.TemplateElementImpl
clone, getContainingTemplate, getTemplateDefHierarchy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.kilim.description.TemplateElement
clone, getContainingTemplate, getTemplateDefHierarchy
 

Field Detail

targetName

private java.lang.String targetName

boundElement

private BasicNamedElement boundElement

performsAction

private boolean performsAction

providesValue

private boolean providesValue
Constructor Detail

Reference

public Reference(java.lang.String aTargetName,
                 TemplateDescription aTemplate,
                 boolean isP,
                 boolean isT)
          throws KilimException
a public constructor for references..

Parameters:
aTargetName - : the name of the target
aTemplate - : the template in which the reference is defined
isP - : true if the reference target provides a value (and can thus be used as a provider).
isT - : true if the reference target executes an action (and can thus be used as a transformer).
Throws:
KilimException - : generated if aTargetName or aTemplate is null.
Method Detail

setTargetName

public void setTargetName(java.lang.String aName)
sets the name of a target for the reference. Setting a new name resets the boundElement to null.

Parameters:
aName - : a name for the target.

getTargetName

public java.lang.String getTargetName()
returns the name of the target.

Returns:
String

setContainingTemplate

public void setContainingTemplate(TemplateDescription aTemplate)
                           throws KilimException
Description copied from interface: TemplateElement
sets the template in which the element is defined.

Specified by:
setContainingTemplate in interface TemplateElement
Overrides:
setContainingTemplate in class TemplateElementImpl
Throws:
KilimException
See Also:
TemplateElement.setContainingTemplate(TemplateDescription)

toString

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

isEventSource

public boolean isEventSource()
Description copied from interface: BasicElement
indicates whether the element is an event source or not.

Specified by:
isEventSource in interface BasicElement
Returns:
boolean
See Also:
org.objectweb.kilim.description.ExtendedSource#isEventSource()

providesValue

public boolean providesValue()
Description copied from interface: BasicElement
Basic elements either provide values or exceute actions that complete the instatiation process This method. indicates whether the element returns a value in the Kilim model. The result is true for providers, ports, properties, inlined getters inlined news, constructors, methods which do not return void. It also return true for references to the elements previously defined (i.e. ports, properties, .).

Specified by:
providesValue in interface BasicElement
Returns:
boolean
See Also:
org.objectweb.kilim.description.TemplateElement#providesValue()

performsAction

public boolean performsAction()
Description copied from interface: BasicElement
Basic elements either provide values or exceute actions that complete the instatiation process This method. indicates whether the element performs an action and can therefore been used in a trigger. The result is true for transformers, inlined setter, inlined news, methods, and constructors. It also return true for references to the elements previously defined (setters, methods, ...).

Specified by:
performsAction in interface BasicElement
Returns:
boolean
See Also:
org.objectweb.kilim.description.TemplateElement#performsAction()

getKind

public int getKind()
Description copied from interface: BasicElement
returns the element kind.

Specified by:
getKind in interface BasicElement
Returns:
int
See Also:
BasicElement.getKind()