File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
moxy-compiler/src/main/java/com/omegar/mvp/compiler Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 3939import javax .lang .model .type .TypeMirror ;
4040import javax .lang .model .type .TypeVariable ;
4141import javax .lang .model .type .WildcardType ;
42- import javax .tools .Diagnostic ;
4342
4443/**
4544 * Utilities for handling types in annotation processors
@@ -209,6 +208,11 @@ public static boolean hasEmptyConstructor(TypeElement element) {
209208 return false ;
210209 }
211210
211+ public static String capitalizeString (String string ) {
212+ return string == null || string .isEmpty () ? "" : string .length () == 1 ? string .toUpperCase () : Character .toUpperCase (string .charAt (0 )) + string .substring (1 );
213+ }
214+
215+
212216 public static String decapitalizeString (String string ) {
213217 return string == null || string .isEmpty () ? "" : string .length () == 1 ? string .toLowerCase () : Character .toLowerCase (string .charAt (0 )) + string .substring (1 );
214218 }
Original file line number Diff line number Diff line change 11package com .omegar .mvp .compiler .presenterbinder ;
22
33import com .omegar .mvp .MvpProcessor ;
4+ import com .omegar .mvp .compiler .Util ;
45import com .omegar .mvp .presenter .PresenterType ;
56import com .squareup .javapoet .ParameterizedTypeName ;
67import com .squareup .javapoet .TypeName ;
@@ -48,7 +49,7 @@ TypeName getTypeName() {
4849 }
4950
5051 String getGeneratedClassName () {
51- return name + MvpProcessor .PRESENTER_BINDER_INNER_SUFFIX ;
52+ return Util . capitalizeString ( name ) + MvpProcessor .PRESENTER_BINDER_INNER_SUFFIX ;
5253 }
5354
5455 String getTag () {
You can’t perform that action at this time.
0 commit comments