use of com.helger.jcodemodel.JMethod in project androidannotations by androidannotations.
the class PreferencesDelegate method setAddPreferencesFromResourceBlock.
private void setAddPreferencesFromResourceBlock() {
JMethod method = getGeneratedClass().method(PUBLIC, codeModel().VOID, "addPreferencesFromResource");
method.annotate(Override.class);
JVar preferencesResIdParam = method.param(int.class, "preferencesResId");
method.body().invoke(JExpr._super(), "addPreferencesFromResource").arg(preferencesResIdParam);
addPreferencesFromResourceInjectionBlock = method.body().blockVirtual();
addPreferencesFromResourceAfterInjectionBlock = method.body().blockVirtual();
}
use of com.helger.jcodemodel.JMethod in project androidannotations by androidannotations.
the class EProviderHolder method createOnCreate.
private void createOnCreate() {
JMethod onCreate = generatedClass.method(PUBLIC, getCodeModel().BOOLEAN, "onCreate");
onCreate.annotate(Override.class);
JBlock onCreateBody = onCreate.body();
onCreateBody.invoke(getInit());
onCreateBody._return(invoke(_super(), onCreate));
}
use of com.helger.jcodemodel.JMethod in project androidannotations by androidannotations.
the class EServiceHolder method setOnCreate.
private void setOnCreate() {
JMethod onCreate = generatedClass.method(PUBLIC, getCodeModel().VOID, "onCreate");
onCreate.annotate(Override.class);
JBlock onCreateBody = onCreate.body();
onCreateBody.invoke(getInit());
onCreateBody.invoke(JExpr._super(), onCreate);
}
use of com.helger.jcodemodel.JMethod in project androidannotations by androidannotations.
the class InstanceStateDelegate method setSaveStateMethod.
private void setSaveStateMethod() {
JMethod method = getGeneratedClass().method(PUBLIC, codeModel().VOID, "onSaveInstanceState");
method.annotate(Override.class);
saveStateBundleParam = method.param(getClasses().BUNDLE, "bundle" + generationSuffix());
saveStateMethodBody = method.body();
saveStateMethodBody.invoke(JExpr._super(), "onSaveInstanceState").arg(saveStateBundleParam);
}
use of com.helger.jcodemodel.JMethod in project androidannotations by androidannotations.
the class KeyEventCallbackMethodsDelegate method createOnKeyMultipleMethod.
private void createOnKeyMultipleMethod() {
JMethod method = getGeneratedClass().method(PUBLIC, codeModel().BOOLEAN, "onKeyMultiple");
method.annotate(Override.class);
JVar keyCode = method.param(codeModel().INT, "keyCode");
onKeyMultipleCountParam = method.param(codeModel().INT, "count");
onKeyMultipleKeyEventParam = method.param(getClasses().KEY_EVENT, "keyEvent");
JBlock methodBody = method.body();
onKeyMultipleSwitchBody = methodBody._switch(keyCode);
methodBody._return(_super().invoke(method).arg(keyCode).arg(onKeyMultipleCountParam).arg(onKeyDownKeyEventParam));
}
Aggregations