6

I don't have access to java source code, I have created java code from jar files. I need to modify one of the java file to add some additional functionality, it is complaining about one inner class method

return Survey.access$000();

It is saying Cannot resolve method 'access$000()' What should I do to get rid of this error So far I haven't modified any thing after I reverse engineered the jar file. The class in question is Survey and it has the following inner class

private static class SurveyPermissionCatalogFinder
/*     */     implements PermissionCatalogFinder
/*     */   {
/*     */     private static final long serialVersionUID = 1L;
/*     */     private static SurveyPermissionCatalogFinder one;
/*     */ 
/*     */     public PermissionCatalog getCatalog()
/*     */     {
/* 225 */       return Survey.access$000();
/*     */     }
/*     */     public static SurveyPermissionCatalogFinder getInstance() {
/* 228 */       if (one == null) {
/* 229 */         one = new SurveyPermissionCatalogFinder();
/*     */       }
/* 231 */       return one;
/*     */     }
Danubian Sailor
  • 1
  • 38
  • 145
  • 223
Mohammed Ahmed
  • 71
  • 1
  • 1
  • 4
  • It seems that you want to access something private in an instance of class Survey, something which is returned by access$000(). Well, in this case, class Survey is likely not to have been designed to give you access to that private stuff (maybe for security reasons?), and thus you had better try an alternative class rather than "forcing" the object through its non-public methods – ignis Jun 07 '11 at 19:25
  • The code you decompiled may also be obfuscated through some obfu mechanism (google java obfuscation). – Adam Gent Jun 07 '11 at 20:22

1 Answers1

10

Looks like there originally was some private variable being accessed in an inner class. Can't say what you should do about it except that you can't always expect decompiled classes to be valid Java source code.

Have a look at the question below for an explanation of the mysterious access$000() method.

Community
  • 1
  • 1
aioobe
  • 413,195
  • 112
  • 811
  • 826