2323@ SuppressWarnings ("NewApi" )
2424public class ViewInterfaceInfo implements TypeElementHolder {
2525 @ Nullable
26- private final ViewInterfaceInfo superInterfaceInfo ;
27- private final TypeElement element ;
28- private final ClassName name ;
29- private final List <TypeVariableName > typeVariables ;
30- private final List <ViewMethod > methods ;
26+ private final TypeElement mSuperInterfaceType ;
27+ private final TypeElement mElement ;
28+ private final ClassName mName ;
29+ private final List <TypeVariableName > mTypeVariables ;
30+ private final List <ViewMethod > mMethods ;
3131
3232 public ViewInterfaceInfo (TypeElement element , List <ViewMethod > methods ) {
3333 this (null , element , methods );
3434 }
3535
36- public ViewInterfaceInfo (@ Nullable ViewInterfaceInfo superInterfaceInfo , TypeElement element , List <ViewMethod > methods ) {
37- this . superInterfaceInfo = superInterfaceInfo ;
38- this . element = element ;
39- this . name = ClassName .get (element );
40- this . methods = methods ;
36+ public ViewInterfaceInfo (@ Nullable TypeElement superInterfaceType , TypeElement element , List <ViewMethod > methods ) {
37+ mSuperInterfaceType = superInterfaceType ;
38+ mElement = element ;
39+ mName = ClassName .get (element );
40+ mMethods = methods ;
4141
42- this . typeVariables = element .getTypeParameters ().stream ()
42+ mTypeVariables = element .getTypeParameters ().stream ()
4343 .map (TypeVariableName ::get )
4444 .collect (Collectors .toList ());
4545
4646 }
4747
4848 @ Nullable
49- public ViewInterfaceInfo getSuperInterfaceInfo () {
50- return superInterfaceInfo ;
49+ public TypeElement getSuperInterfaceType () {
50+ return mSuperInterfaceType ;
5151 }
5252
5353 public TypeElement getTypeElement () {
54- return element ;
54+ return mElement ;
5555 }
5656
5757 public ClassName getName () {
58- return name ;
58+ return mName ;
5959 }
6060
6161 public TypeName getNameWithTypeVariables () {
62- if (typeVariables .isEmpty ()) {
63- return name ;
62+ if (mTypeVariables .isEmpty ()) {
63+ return mName ;
6464 } else {
65- TypeVariableName [] names = new TypeVariableName [typeVariables .size ()];
66- typeVariables .toArray (names );
65+ TypeVariableName [] names = new TypeVariableName [mTypeVariables .size ()];
66+ mTypeVariables .toArray (names );
6767
68- return ParameterizedTypeName .get (name , names );
68+ return ParameterizedTypeName .get (mName , names );
6969 }
7070 }
7171
7272 public List <TypeVariableName > getTypeVariables () {
73- return typeVariables ;
73+ return mTypeVariables ;
7474 }
7575
7676 public List <ViewMethod > getMethods () {
77- return methods ;
77+ return mMethods ;
7878 }
7979
8080 public String getViewStateFullName (Elements elements ) {
81- return getViewStateFullName (elements , element );
81+ return getViewStateFullName (elements , mElement );
8282 }
8383
8484 public String getViewStateSimpleName (Elements elements ) {
85- return getViewStateSimpleName (elements , element );
85+ return getViewStateSimpleName (elements , mElement );
8686 }
8787
8888 @ Override
@@ -92,19 +92,19 @@ public boolean equals(Object o) {
9292
9393 ViewInterfaceInfo that = (ViewInterfaceInfo ) o ;
9494
95- return name != null ? name .equals (that .name ) : that .name == null ;
95+ return mName != null ? mName .equals (that .mName ) : that .mName == null ;
9696 }
9797
9898 @ Override
9999 public int hashCode () {
100- return name != null ? name .hashCode () : 0 ;
100+ return mName != null ? mName .hashCode () : 0 ;
101101 }
102102
103103 @ Override
104104 public String toString () {
105105 return "ViewInterfaceInfo{" +
106- "superInterfaceInfo=" + superInterfaceInfo +
107- ", element=" + element +
106+ "superInterfaceInfo=" + mSuperInterfaceType +
107+ ", element=" + mElement +
108108 '}' ;
109109 }
110110
0 commit comments