Interface X4OPhase
- All Known Implementing Classes:
AbstractX4OPhase, X4OPhaseLanguageInit.X4OPhaseInitLanguageSiblings
public interface X4OPhase
X4OPhase is one small step in the read or write process of the language.
- Version:
- 1.0 Dec 31, 2008
- Author:
- Willem Cazander
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPhaseListener(X4OPhaseListener listener) Adds an X4OPhaseListener.getId()Returns the X4OPhase for which this handler was written.String[]Returns all phase listeners which where added.getType()booleanrunPhase is called but should do nothig.booleanReturns a flag indicating that this phase is runnable multiple times.voidremovePhaseListener(X4OPhaseListener listener) Removes an X4OPhaseListener.voidrunElementPhase(Element element) Run this phase for this Element.voidrunPhase(X4OLanguageSession elementLanguage) Runs this phase.
-
Method Details
-
getType
X4OPhaseType getType() -
getId
String getId()Returns the X4OPhase for which this handler was written.- Returns:
- Returns the phase for which this handler works.
-
getPhaseDependencies
String[] getPhaseDependencies() -
isRunOnce
boolean isRunOnce()Returns a flag indicating that this phase is runnable multiple times.- Returns:
- True if phase is restricted to run once.
-
runPhase
Runs this phase.- Parameters:
elementLanguage- The elementLanguage running this phase.- Throws:
X4OPhaseException- When error has happend.
-
getPhaseListeners
List<X4OPhaseListener> getPhaseListeners()Returns all phase listeners which where added.- Returns:
- All X4OPhaseListeners.
-
addPhaseListener
Adds an X4OPhaseListener.- Parameters:
listener- The listener to add.
-
removePhaseListener
Removes an X4OPhaseListener.- Parameters:
listener- The listener to remove.
-
isElementPhase
boolean isElementPhase()runPhase is called but should do nothig. When elementPhase is enables x4o tries to merge all element phases so we don't need to loop element tree to often.- Returns:
- True if to run in config.
-
runElementPhase
Run this phase for this Element.- Parameters:
element- The element to run this phase for.- Throws:
X4OPhaseException- Is thrown when error has happen.
-