Class TextualInstantiation

java.lang.Object
  |
  +--TextualInstantiation

public class TextualInstantiation
extends java.lang.Object

Stores information about textual instantiations.

Missing

Probably will have to store information about parameters at some point

Author:
M. Oliver Möller
See Also:
Flatten

Field Summary
 java.lang.String activator
          The channel the translation of this template depends on.
The translation of this part of the system remains in a special state _idle_(number), until the signal [activator]! is sent.
 org.w3c.dom.Element componentElement
          The (hierarchical old) component, where this object instanted
(package private) static boolean debug
          Spam out debuggin information, if debug is true
 java.lang.String exitSignal
          The signal that is issued, if the component becomes idle.
This is NOT specific to any particular exit, but only to the TextualInstantiation itself.

private static int exitSignalCounter
          Auxillary Variable, to make exit signals unique.
 TextualInstantiation father
          Pointer to the direct father.
 java.lang.String inheritedInvariant
          Contains (texutally conjunct) the invariants inherited by ancestors; they are assumed to be parameter-corrected allready.
Is initialized on call of setup(java.lang.String, java.util.Vector, TextualInstantiation, org.w3c.dom.Element, org.w3c.dom.Element, org.w3c.dom.Element).

ASSUMPTION: ALL ANCHESTORS ARE SETUP BEFORE THEIR DESCENDANDTS.
 boolean isANDComponent
          Set to true, if the exit point of this instantiaion are connected to a join
Note that an arbitrary amount of global joins can be related to this particular instantiation.
(package private) static long objectCounter
          Counter to provide unique object names
 java.lang.String objectName
          The name of the incarnated object
 java.lang.String originalInstantiationName
          Object name in the original hierarchical version
Only relevant for global elements
 java.util.Vector parameters
          List of parameters
 org.w3c.dom.Element templateElement
          The (hierarchical old) Element node this object instantiates
 org.w3c.dom.Element translationOfTemplateElement
          Pointer to the (flat) template Element this textual instantiation was translated to.

Used for the global joins, i.e.
 
Constructor Summary
TextualInstantiation()
          Empty Constructor; use setup(java.lang.String, java.util.Vector, TextualInstantiation, org.w3c.dom.Element, org.w3c.dom.Element, org.w3c.dom.Element) to fill with meaning.
TextualInstantiation(java.lang.String objectPrefix, java.util.Vector v, TextualInstantiation fatherPointer, org.w3c.dom.Element tplElement, org.w3c.dom.Element theComponent, org.w3c.dom.Element theTranslation)
          Default Constructor objectPrefix gives a hint, in how to name the object such that the origin is derivable The vector gives the list of parameters fatherPrefix is the textual prefix of the father instantiation
it is used for unique naming templateElement is the node in the hierarchical document that is instanciated
(for the kicker, this is null) NOTE:Equivalently, you can call the empty constructor and later call setup(java.lang.String, java.util.Vector, TextualInstantiation, org.w3c.dom.Element, org.w3c.dom.Element, org.w3c.dom.Element) with the same arguments.
 
Method Summary
private static java.lang.String getFreshObjectName(java.lang.String objectPrefix)
          uniqueName, due to containment of non-user string "--"
private  void inventExitSignal()
          Set the exit signal.
(Unfortunately, this cannot be dependent on the NAME of the textual instantiation, for it has to be present, before the setup is called).
 void setActivator(java.lang.String act)
          Set the field activator
 void setup(java.lang.String objectPrefix, java.util.Vector v, TextualInstantiation fatherPointer, org.w3c.dom.Element tplElement, org.w3c.dom.Element theComponent, org.w3c.dom.Element theTranslation)
          Is assumed to be called exactly once.
 java.lang.String toString()
          Returns the instantiation text

objectName := templateName(parameters)
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

objectCounter

static long objectCounter
Counter to provide unique object names

objectName

public java.lang.String objectName
The name of the incarnated object

originalInstantiationName

public java.lang.String originalInstantiationName
Object name in the original hierarchical version
Only relevant for global elements

parameters

public java.util.Vector parameters
List of parameters

!! in Vanilla-1 always empty !!


templateElement

public org.w3c.dom.Element templateElement
The (hierarchical old) Element node this object instantiates

componentElement

public org.w3c.dom.Element componentElement
The (hierarchical old) component, where this object instanted

activator

public java.lang.String activator
The channel the translation of this template depends on.
The translation of this part of the system remains in a special state _idle_(number), until the signal [activator]! is sent.

!! OUTDATED !!


exitSignal

public java.lang.String exitSignal
The signal that is issued, if the component becomes idle.
This is NOT specific to any particular exit, but only to the TextualInstantiation itself.


isANDComponent

public boolean isANDComponent
Set to true, if the exit point of this instantiaion are connected to a join
Note that an arbitrary amount of global joins can be related to this particular instantiation. Default is false

translationOfTemplateElement

public org.w3c.dom.Element translationOfTemplateElement
Pointer to the (flat) template Element this textual instantiation was translated to.

Used for the global joins, i.e. to augment this transition with the encoding of the join.

father

public TextualInstantiation father
Pointer to the direct father. Is null, if this textual instantiation is global.

inheritedInvariant

public java.lang.String inheritedInvariant
Contains (texutally conjunct) the invariants inherited by ancestors; they are assumed to be parameter-corrected allready.
Is initialized on call of setup(java.lang.String, java.util.Vector, TextualInstantiation, org.w3c.dom.Element, org.w3c.dom.Element, org.w3c.dom.Element).

ASSUMPTION: ALL ANCHESTORS ARE SETUP BEFORE THEIR DESCENDANDTS.

debug

static boolean debug
Spam out debuggin information, if debug is true

exitSignalCounter

private static int exitSignalCounter
Auxillary Variable, to make exit signals unique.
Constructor Detail

TextualInstantiation

public TextualInstantiation(java.lang.String objectPrefix,
                            java.util.Vector v,
                            TextualInstantiation fatherPointer,
                            org.w3c.dom.Element tplElement,
                            org.w3c.dom.Element theComponent,
                            org.w3c.dom.Element theTranslation)
                     throws java.lang.Exception
Default Constructor NOTE:Equivalently, you can call the empty constructor and later call setup(java.lang.String, java.util.Vector, TextualInstantiation, org.w3c.dom.Element, org.w3c.dom.Element, org.w3c.dom.Element) with the same arguments.

TextualInstantiation

public TextualInstantiation()
Empty Constructor; use setup(java.lang.String, java.util.Vector, TextualInstantiation, org.w3c.dom.Element, org.w3c.dom.Element, org.w3c.dom.Element) to fill with meaning.
Method Detail

setup

public void setup(java.lang.String objectPrefix,
                  java.util.Vector v,
                  TextualInstantiation fatherPointer,
                  org.w3c.dom.Element tplElement,
                  org.w3c.dom.Element theComponent,
                  org.w3c.dom.Element theTranslation)
           throws java.lang.Exception
Is assumed to be called exactly once.

setActivator

public void setActivator(java.lang.String act)
Set the field activator

toString

public java.lang.String toString()
Returns the instantiation text

objectName := templateName(parameters)
Overrides:
toString in class java.lang.Object

getFreshObjectName

private static java.lang.String getFreshObjectName(java.lang.String objectPrefix)
uniqueName, due to containment of non-user string "--"

inventExitSignal

private void inventExitSignal()
Set the exit signal.
(Unfortunately, this cannot be dependent on the NAME of the textual instantiation, for it has to be present, before the setup is called).