SmartFrog 3.10.000

org.smartfrog.sfcore.languages.sf
Class Phase

java.lang.Object
  extended by org.smartfrog.sfcore.languages.sf.Phase
All Implemented Interfaces:
CDVisitor

public class Phase
extends java.lang.Object
implements CDVisitor

Phase is a class that implements a phase on a ComponentDescritpion. It is iterated over the tree by the visitor pattern implemented on ComponentDescription.


Field Summary
protected  java.util.Stack path
           
protected  java.lang.String phaseName
          The name of the phase.
 
Constructor Summary
Phase(java.lang.String name)
          Construct a phase object for a specific named phase.
 
Method Summary
 void actOn(ComponentDescription cd, java.util.Stack path)
          Evaluate a phase on the component description - this is the required method for the visitor pattern.
protected  PhaseAction phaseAction(java.lang.Object action, SFComponentDescription cd, java.util.Stack path)
          Create a PhaseAction for a specific node for which the phase is relevant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

phaseName

protected java.lang.String phaseName
The name of the phase.


path

protected java.util.Stack path
Constructor Detail

Phase

public Phase(java.lang.String name)
Construct a phase object for a specific named phase.

Parameters:
name - name of the phase
Method Detail

phaseAction

protected PhaseAction phaseAction(java.lang.Object action,
                                  SFComponentDescription cd,
                                  java.util.Stack path)
                           throws SmartFrogCompileResolutionException
Create a PhaseAction for a specific node for which the phase is relevant.

Parameters:
action - the object describing the phase - should be a string representing a class implementing the PhaseAction interface
cd - the component description on which it is to act
Returns:
PhaseAction for a specific node
Throws:
SmartFrogCompileResolutionException - failed to create PhaseAction

actOn

public void actOn(ComponentDescription cd,
                  java.util.Stack path)
           throws SmartFrogCompileResolutionException
Evaluate a phase on the component description - this is the required method for the visitor pattern.

Specified by:
actOn in interface CDVisitor
Parameters:
cd - the component description on which to carry out the phase
path - Stack
Throws:
SmartFrogCompileResolutionException - failed to create PhaseAction

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP