• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.android.apifinder;
2 
3 public class JavaApiUsedByMainlineModuleCases {
4 
5   public class PublicSubClass {
publicMethod()6     public void publicMethod() {}
7 
privateMethod()8     private void privateMethod() {}
9   }
10 
11   private class PrivateSubClass {
publicMethod()12     public void publicMethod() {}
13   }
14 
testMethod()15   public void testMethod() {
16     // BUG: Diagnostic contains: JavaApiUsedByMainlineModuleCases.PublicSubClass
17     // .JavaApiUsedByMainlineModuleCases.PublicSubClass()
18     PublicSubClass publicTestClass = new PublicSubClass();
19 
20     // BUG: Diagnostic contains: JavaApiUsedByMainlineModuleCases.PublicSubClass.publicMethod()
21     publicTestClass.publicMethod();
22 
23     /** Should not be reported since PrivateSubClass is a private class. */
24     PrivateSubClass privateTestClass = new PrivateSubClass();
25     privateTestClass.publicMethod();
26   }
27 }
28