Skip to content
Advertisement

grep method appears in class file but not in its human dump

I’m grepping for a method getNumBytes in some class file A.class:

JavaScript

When I dump its content with javap I can’t see my method:

JavaScript

Here is a complete minimal example:

JavaScript

Advertisement

Answer

UPDATE I’m on Windows, and it runs fine. I believe Thomas Kläger is correct that this is a shell issue:

Its probably because of the $Companion in the class name. The linux shell replaces this with the contents of the Companion environment variable – which most probably not exists and gets replaced by nothing. Try executing javap -c -p -v -constants -l -s 'okio/Options$Companion.class' | grep "buildTrieRecursive"


Unable to reproduce.

JavaScript

Output

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement