private JFieldVar getStaticExtraField(EIntentServiceHolder holder, String extraName) { String staticFieldName = CaseHelper.camelCaseToUpperSnakeCase(null, extraName, "Extra"); JFieldVar staticExtraField = holder.getGeneratedClass().fields().get(staticFieldName); if (staticExtraField == null) { staticExtraField = holder .getGeneratedClass() .field(PUBLIC | STATIC | FINAL, classes().STRING, staticFieldName, lit(extraName)); } return staticExtraField; }
private JFieldVar createStaticActionField( EIntentServiceHolder holder, String extraKey, String methodName) { String staticFieldName = CaseHelper.camelCaseToUpperSnakeCase("action", methodName, null); return holder .getGeneratedClass() .field(PUBLIC | STATIC | FINAL, classes().STRING, staticFieldName, lit(extraKey)); }