org.objectweb.fractal.aokell.glue.template
Class LifeCycleInterceptorTemplate

java.lang.Object
  extended by org.objectweb.fractal.aokell.glue.template.LifeCycleInterceptorTemplate
All Implemented Interfaces:
LifeCycleInterceptorItf, spoon.template.Template

public class LifeCycleInterceptorTemplate
extends Object
implements spoon.template.Template, LifeCycleInterceptorItf

Template applied to all classes which are processed by LifeCycleControllerProcessor. This template defines the _isFcStarted field which will be introduced and the statements which will be inserted at the beginning of all methods.

Author:
Lionel Seinturier

Field Summary
protected  boolean isFcStarted
          Introduced field to store the state of the lifecycle controller.
 
Constructor Summary
LifeCycleInterceptorTemplate()
           
 
Method Summary
 void setFcState(boolean isFcStarted)
          Set the state of the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isFcStarted

protected boolean isFcStarted
Introduced field to store the state of the lifecycle controller. This field caches the state which is managed by the lifecycle controller. This field is used to provide a more performant test on the lifecycle controller state (saves a method call). Visibility set to protected to let the field be visible by subclasses.

Constructor Detail

LifeCycleInterceptorTemplate

public LifeCycleInterceptorTemplate()
Method Detail

setFcState

public void setFcState(boolean isFcStarted)
Set the state of the component.

Specified by:
setFcState in interface LifeCycleInterceptorItf
Parameters:
isFcStarted - true if the component is started