/** * Weaves the state machines of the state views. Doesn't apply the CSP composition to the copied * state machines. * * @param aspect the aspect to weave state machines for * @param listener to notify when events occur during weaving */ public void weaveAllNoCSPWeavingForStateViews(Aspect aspect, WeaverListener<Aspect> listener) { try { listener.weavingStarted(); Aspect result = loadNewInstance(aspect); weavingInformation.clear(); // Do phase 1: Weave all structural views and copy the message and state views // from the lower- to the higher-level aspect. resolveDependenciesBottomUp(result); messageViewWeaver.weaveMessageViews(aspect, weavingInformation); listener.weavingFinished(result); // CHECKSTYLE:IGNORE IllegalCatch: There could be many different exceptions during // initialization. } catch (Exception e) { // TODO: catch in lower level weaver operations, and throw custom exception. listener.weavingFailed(e); } }
/** * Performs the final step of weaving. I.e., message views and state views are woven. The actions * are performed on the given aspect directly. * * @param aspect the aspect for which views should be woven */ public void weaveAll(Aspect aspect) { messageViewWeaver.weaveMessageViews(aspect, weavingInformation); stateViewWeaver.weaveStateViews(aspect); }