Opcodes will often use parameters, these look a little cryptic in the bytecode as they're usually referenced via lookup tables. Internally, Java uses what's called descriptors to describe these parameters.
They describe types and signatures using a specific grammar you'll see throughout the bytecode. You'll often see the same grammar used in compiler or debug output, so it's useful to recap it here.
Here's an example of a method signature descriptor.
Example$1."<init>":(Lcom/foo/Example;Lcom/foo/Server;)V
It's describing the constructor of a class called $1
, which we happen to know is the JVM's name for the first anonymous class instance within another class. In this case Example
. So we've got a constructor of an anonymous class that takes two parameters, an instance of the outer class com.foo.Example
and an instance of com.foo.Server
.
Being a constructor, the method doesn't return anything. The V
symbol represents void.
Have a look at breakdown of the descriptor syntax below...