@@ -25,7 +25,6 @@ public class BlackReflectionProxy {
2525
2626 private final ClassName mContextInterface ;
2727 private final ClassName mStaticInterface ;
28- private final ClassName mInterface ;
2928 private final String mPackageName ;
3029
3130 public BlackReflectionProxy (String packageName , BlackReflectionInfo reflection ) {
@@ -37,7 +36,6 @@ public BlackReflectionProxy(String packageName, BlackReflectionInfo reflection)
3736
3837 mContextInterface = ClassName .get (ClassUtils .getPackage (finalClass ), ClassUtils .getName (finalClass + "Context" ));
3938 mStaticInterface = ClassName .get (ClassUtils .getPackage (finalClass ), ClassUtils .getName (finalClass + "Static" ));
40- mInterface = ClassName .get (ClassUtils .getPackage (finalClass ), ClassUtils .getName (finalClass ));
4139 }
4240
4341 public JavaFile generateJavaCode () {
@@ -52,7 +50,7 @@ public JavaFile generateJavaCode() {
5250 .addMethod (generaNotCallerMethod (false ))
5351 .addMethod (generaCallerMethod (true ))
5452 .addMethod (generaCallerMethod (false ))
55- .addMethod (generaGetRealClassMethod ())
53+ .addMethod (generaIsLoadMethod ())
5654 .build ();
5755 return JavaFile .builder (mPackageName , reflection ).build ();
5856 }
@@ -85,14 +83,14 @@ private MethodSpec generaCallerMethod(boolean withException) {
8583 return builder .build ();
8684 }
8785
88- private MethodSpec generaGetRealClassMethod () {
86+ private MethodSpec generaIsLoadMethod () {
8987 MethodSpec .Builder builder = MethodSpec .methodBuilder ("getRealClass" )
9088 .addModifiers (Modifier .PUBLIC , Modifier .STATIC )
9189 .returns (ClassName .get (Class .class ));
9290
9391 String statement = "return top.niunaijun.blackreflection.utils.ClassUtil.classReady($T.class)" ;
9492 builder .addStatement (statement ,
95- mInterface
93+ mContextInterface
9694 );
9795 return builder .build ();
9896 }
0 commit comments