What is the meaning of “static synthetic”?

In the java language, inner classes can access private members of their enclosing class. However, in Java bytecode, the concept of inner classes does not exist, and the private members are not accessible. To work around this, the compiler creates synthetic accessor methods in the outer class. I believe that is what you are seeing here. access$0 is simply the name of the method. I’m not sure what, if anything the synthetic does. It may just hide the method from other compilers to ensure encapsulation.

Synthetic field, (2)

A compiler-created field that links a local inner class to a block’s local variable or reference type parameter.

See also The JavaTM Virtual Machine Specification (ยง4.7.6) or Synthetic Class in Java.

Leave a Comment