@@ -119,7 +119,7 @@ protected void setContextRef() {
119119
120120 @ Override
121121 protected void setInit () {
122- init = generatedClass .method (PRIVATE , codeModel ().VOID , "init" + generationSuffix ());
122+ init = generatedClass .method (PRIVATE , getCodeModel ().VOID , "init" + generationSuffix ());
123123 JClass bundleClass = getClasses ().BUNDLE ;
124124 initSavedInstanceParam = init .param (bundleClass , "savedInstanceState" );
125125 getOnCreate ();
@@ -140,7 +140,7 @@ public JMethod getSetIntent() {
140140 }
141141
142142 private void setOnCreate () {
143- onCreate = generatedClass .method (PUBLIC , codeModel ().VOID , "onCreate" );
143+ onCreate = generatedClass .method (PUBLIC , getCodeModel ().VOID , "onCreate" );
144144 onCreate .annotate (Override .class );
145145 JClass bundleClass = getClasses ().BUNDLE ;
146146 JVar onCreateSavedInstanceState = onCreate .param (bundleClass , "savedInstanceState" );
@@ -154,7 +154,7 @@ private void setOnCreate() {
154154 // CHECKSTYLE:OFF
155155
156156 private void setOnStart () {
157- JMethod method = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onStart" );
157+ JMethod method = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onStart" );
158158 method .annotate (Override .class );
159159 JBlock body = method .body ();
160160 onStartBeforeSuperBlock = body .block ();
@@ -170,7 +170,7 @@ public JBlock getOnRestartAfterSuperBlock() {
170170 }
171171
172172 private void setOnRestart () {
173- JMethod method = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onRestart" );
173+ JMethod method = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onRestart" );
174174 method .annotate (Override .class );
175175 JBlock body = method .body ();
176176 onRestartBeforeSuperBlock = body .block ();
@@ -179,7 +179,7 @@ private void setOnRestart() {
179179 }
180180
181181 private void setOnResume () {
182- JMethod method = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onResume" );
182+ JMethod method = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onResume" );
183183 method .annotate (Override .class );
184184 JBlock body = method .body ();
185185 onResumeBeforeSuperBlock = body .block ();
@@ -188,7 +188,7 @@ private void setOnResume() {
188188 }
189189
190190 private void setOnPause () {
191- JMethod method = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onPause" );
191+ JMethod method = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onPause" );
192192 method .annotate (Override .class );
193193 JBlock body = method .body ();
194194 onPauseBeforeSuperBlock = body .block ();
@@ -197,7 +197,7 @@ private void setOnPause() {
197197 }
198198
199199 private void setOnNewIntent () {
200- onNewIntentMethod = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onNewIntent" );
200+ onNewIntentMethod = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onNewIntent" );
201201 onNewIntentMethod .annotate (Override .class );
202202 JVar intent = onNewIntentMethod .param (getClasses ().INTENT , "intent" );
203203 JBlock body = onNewIntentMethod .body ();
@@ -207,7 +207,7 @@ private void setOnNewIntent() {
207207 }
208208
209209 private void setSetIntent () {
210- setIntent = generatedClass .method (PUBLIC , codeModel ().VOID , "setIntent" );
210+ setIntent = generatedClass .method (PUBLIC , getCodeModel ().VOID , "setIntent" );
211211 setIntent .annotate (Override .class );
212212 JVar methodParam = setIntent .param (getClasses ().INTENT , "newIntent" );
213213 JBlock setIntentBody = setIntent .body ();
@@ -222,7 +222,7 @@ public JMethod getOnStop() {
222222 }
223223
224224 private void setOnStop () {
225- onStopMethod = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onStop" );
225+ onStopMethod = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onStop" );
226226 onStopMethod .annotate (Override .class );
227227 JBlock body = onStopMethod .body ();
228228 onStopBeforeSuperBlock = body .block ();
@@ -237,7 +237,7 @@ public JMethod getOnDestroy() {
237237 }
238238
239239 private void setOnDestroy () {
240- onDestroyMethod = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onDestroy" );
240+ onDestroyMethod = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onDestroy" );
241241 onDestroyMethod .annotate (Override .class );
242242 JBlock body = onDestroyMethod .body ();
243243 onDestroyBeforeSuperBlock = body .block ();
@@ -267,7 +267,7 @@ public JVar getOnConfigurationChangedNewConfigParam() {
267267 }
268268
269269 private void setOnConfigurationChanged () {
270- JMethod method = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onConfigurationChanged" );
270+ JMethod method = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onConfigurationChanged" );
271271 method .annotate (Override .class );
272272 JClass configurationClass = getClasses ().CONFIGURATION ;
273273 onConfigurationChangedNewConfigParam = method .param (configurationClass , "newConfig" );
@@ -292,15 +292,15 @@ public JBlock getOnContentChangedAfterSuperBlock() {
292292 }
293293
294294 private void setOnContentChanged () {
295- onContentChanged = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "onContentChanged" );
295+ onContentChanged = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "onContentChanged" );
296296 onContentChanged .annotate (Override .class );
297297 JBlock body = onContentChanged .body ();
298298 body .invoke (_super (), onContentChanged );
299299 onContentChangedAfterSuperBlock = body .block ();
300300 }
301301
302302 private void setOnCreateOptionsMenu () {
303- JMethod method = generatedClass .method (PUBLIC , codeModel ().BOOLEAN , "onCreateOptionsMenu" );
303+ JMethod method = generatedClass .method (PUBLIC , getCodeModel ().BOOLEAN , "onCreateOptionsMenu" );
304304 method .annotate (Override .class );
305305 JBlock methodBody = method .body ();
306306 onCreateOptionsMenuMenuParam = method .param (getClasses ().MENU , "menu" );
@@ -310,11 +310,11 @@ private void setOnCreateOptionsMenu() {
310310 }
311311
312312 private void setOnOptionsItemSelected () {
313- JMethod method = generatedClass .method (JMod .PUBLIC , codeModel ().BOOLEAN , "onOptionsItemSelected" );
313+ JMethod method = generatedClass .method (JMod .PUBLIC , getCodeModel ().BOOLEAN , "onOptionsItemSelected" );
314314 method .annotate (Override .class );
315315 JBlock methodBody = method .body ();
316316 onOptionsItemSelectedItem = method .param (getClasses ().MENU_ITEM , "item" );
317- onOptionsItemSelectedItemId = methodBody .decl (codeModel ().INT , "itemId_" , onOptionsItemSelectedItem .invoke ("getItemId" ));
317+ onOptionsItemSelectedItemId = methodBody .decl (getCodeModel ().INT , "itemId_" , onOptionsItemSelectedItem .invoke ("getItemId" ));
318318 onOptionsItemSelectedMiddleBlock = methodBody .block ();
319319
320320 methodBody ._return (invoke (_super (), method ).arg (onOptionsItemSelectedItem ));
@@ -323,7 +323,7 @@ private void setOnOptionsItemSelected() {
323323 @ Override
324324 protected void setFindNativeFragmentById () {
325325 JMethod method = generatedClass .method (PRIVATE , getClasses ().FRAGMENT , "findNativeFragmentById" );
326- JVar idParam = method .param (codeModel ().INT , "id" );
326+ JVar idParam = method .param (getCodeModel ().INT , "id" );
327327 JBlock body = method .body ();
328328 body ._return (invoke ("getFragmentManager" ).invoke ("findFragmentById" ).arg (idParam ));
329329 findNativeFragmentById = method ;
@@ -332,7 +332,7 @@ protected void setFindNativeFragmentById() {
332332 @ Override
333333 protected void setFindSupportFragmentById () {
334334 JMethod method = generatedClass .method (PRIVATE , getClasses ().SUPPORT_V4_FRAGMENT , "findSupportFragmentById" );
335- JVar idParam = method .param (codeModel ().INT , "id" );
335+ JVar idParam = method .param (getCodeModel ().INT , "id" );
336336 JBlock body = method .body ();
337337 body ._return (invoke ("getSupportFragmentManager" ).invoke ("findFragmentById" ).arg (idParam ));
338338 findSupportFragmentById = method ;
@@ -368,13 +368,13 @@ private void setSetContentView() {
368368
369369 JClass layoutParamsClass = getClasses ().VIEW_GROUP_LAYOUT_PARAMS ;
370370
371- setContentViewLayout = setContentViewMethod (new JType [] { codeModel ().INT }, new String [] { "layoutResID" });
371+ setContentViewLayout = setContentViewMethod (new JType [] { getCodeModel ().INT }, new String [] { "layoutResID" });
372372 setContentViewMethod (new JType [] { getClasses ().VIEW , layoutParamsClass }, new String [] { "view" , "params" });
373373 setContentViewMethod (new JType [] { getClasses ().VIEW }, new String [] { "view" });
374374 }
375375
376376 private JMethod setContentViewMethod (JType [] paramTypes , String [] paramNames ) {
377- JMethod method = generatedClass .method (JMod .PUBLIC , codeModel ().VOID , "setContentView" );
377+ JMethod method = generatedClass .method (JMod .PUBLIC , getCodeModel ().VOID , "setContentView" );
378378 method .annotate (Override .class );
379379
380380 List <JVar > params = new ArrayList <>();
@@ -437,7 +437,7 @@ public JVar getInjectExtras() {
437437 }
438438
439439 private void setInjectExtras () {
440- injectExtrasMethod = generatedClass .method (PRIVATE , codeModel ().VOID , "injectExtras" + generationSuffix ());
440+ injectExtrasMethod = generatedClass .method (PRIVATE , getCodeModel ().VOID , "injectExtras" + generationSuffix ());
441441 JBlock injectExtrasBody = injectExtrasMethod .body ();
442442 injectExtras = injectExtrasBody .decl (getClasses ().BUNDLE , "extras_" , invoke ("getIntent" ).invoke ("getExtras" ));
443443 injectExtrasBlock = injectExtrasBody ._if (injectExtras .ne (_null ()))._then ();
0 commit comments