use of com.helger.jcodemodel.JBlock in project androidannotations by androidannotations.
the class EActivityHolder method setFindSupportFragmentById.
@Override
protected void setFindSupportFragmentById() {
JMethod method = generatedClass.method(PRIVATE, getClasses().SUPPORT_V4_FRAGMENT, "findSupportFragmentById");
JVar idParam = method.param(getCodeModel().INT, "id");
JBlock body = method.body();
body._return(invoke("getSupportFragmentManager").invoke("findFragmentById").arg(idParam));
findSupportFragmentById = method;
}
use of com.helger.jcodemodel.JBlock in project androidannotations by androidannotations.
the class EActivityHolder method setSetIntent.
private void setSetIntent() {
setIntent = generatedClass.method(PUBLIC, getCodeModel().VOID, "setIntent");
setIntent.annotate(Override.class);
JVar methodParam = setIntent.param(getClasses().INTENT, "newIntent");
JBlock setIntentBody = setIntent.body();
setIntentBody.invoke(_super(), setIntent).arg(methodParam);
}
use of com.helger.jcodemodel.JBlock in project androidannotations by androidannotations.
the class EActivityHolder method setOnContentChanged.
private void setOnContentChanged() {
onContentChanged = generatedClass.method(JMod.PUBLIC, getCodeModel().VOID, "onContentChanged");
onContentChanged.annotate(Override.class);
JBlock body = onContentChanged.body();
body.invoke(_super(), onContentChanged);
onContentChangedAfterSuperBlock = body.blockSimple();
}
use of com.helger.jcodemodel.JBlock in project androidannotations by androidannotations.
the class EActivityHolder method setOnRestart.
private void setOnRestart() {
JMethod method = generatedClass.method(JMod.PUBLIC, getCodeModel().VOID, "onRestart");
method.annotate(Override.class);
JBlock body = method.body();
onRestartBeforeSuperBlock = body.blockSimple();
body.invoke(_super(), method);
onRestartAfterSuperBlock = body.blockSimple();
}
use of com.helger.jcodemodel.JBlock in project androidannotations by androidannotations.
the class EActivityHolder method setFindNativeFragmentById.
@Override
protected void setFindNativeFragmentById() {
JMethod method = generatedClass.method(PRIVATE, getClasses().FRAGMENT, "findNativeFragmentById");
JVar idParam = method.param(getCodeModel().INT, "id");
JBlock body = method.body();
body._return(invoke("getFragmentManager").invoke("findFragmentById").arg(idParam));
findNativeFragmentById = method;
}
Aggregations