use of com.helger.jcodemodel.JSynchronizedBlock in project androidannotations by androidannotations.
the class RoboGuiceHandler method onContentChangedMethod.
private void onContentChangedMethod(RoboGuiceHolder holder, JFieldVar scope, JFieldVar eventManager) {
JBlock onContentChangedAfterSuperBlock = holder.getOnContentChangedAfterSuperBlock();
JSynchronizedBlock synchronizedBlock = onContentChangedAfterSuperBlock.synchronizedBlock(getJClass(RoboGuiceClasses.CONTEXT_SCOPE).dotclass());
JBlock synchronizedBlockBody = synchronizedBlock.body();
synchronizedBlockBody.invoke(scope, "enter").arg(_this());
JTryBlock tryBlock = synchronizedBlockBody._try();
tryBlock.body().staticInvoke(getJClass(RoboGuiceHelper.class), "callInjectViews").arg(_this());
tryBlock._finally().invoke(scope, "exit").arg(_this());
onContentChangedAfterSuperBlock.add(synchronizedBlock);
fireEvent(eventManager, onContentChangedAfterSuperBlock, getJClass(RoboGuiceClasses.ON_CONTENT_CHANGED_EVENT));
}
Aggregations