javabytecodedisassemblyjava-synthetic-methods

What is the meaning of "static synthetic"?


I am looking at some disassembled code obtained from Java bytecode. I see some declaration as follows:

.method static synthetic access$0()Lcom/package/Sample;

I am not able to figure out what the synthetic or access$0 mean. Can someone please help me understand this part?


Solution

  • 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.