What does $$ in javac generated name mean?

Viewed 2832

When shifting through java call graph generated by libraries like DependencyFinder and java-callgraph, I found out that java compiler generate names for anonymous functions, inner classes, etc.

I've found out the meaning of a couple of them (please correct if I'm wrong):

  • org.example.Bar$Foo refers to Foo, which is an inner class of org.example.Bar.
  • org.example.Bar$1 refers to an anonymous class declared inside one of the methods of org.example.Bar.
  • org.example.Bar.lambda$spam$1() refers to a lambda declared inside of org.example.Bar.spam() method.

However, I also found:

  1. org.example.Bar$$Lambda$2.args$1
  2. org.example.Bar$$Lambda$2.call()
  3. org.example.Bar$$Lambda$7.lambdaFactory$()
  4. org.example.Bar$$Lambda$7.get$Lambda()

What does the four name above refer to? What does double dollar ($$) mean?

1 Answers
Related