/** * Weaves the state machines of the state views. Doesn't take into account the dependencies and * instantiations of the aspect. * * @param aspect the aspect to weave state machines for * @param listener to notify when events occur during weaving */ public void weaveStateMachines(Aspect aspect, WeaverListener<Aspect> listener) { try { listener.weavingStarted(); Aspect result = loadNewInstance(aspect); stateViewWeaver.weaveStateViews(result); 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); } }
/** * 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); } }