2

I am collecting API calls from the source code of Android apps using Androguard. Some of the retrieved API calls have a $ symbol in their call description, such as: Ljava/util/Locale$LanguageRange/<init> or Lcom/google/android/gms/vision/barcode/BarcodeDetector$Builder/setBarcodeFormats, whereas the vast majority of them do not have this dollar symbol included. For instance, Lcom/google/android/gms/vision/Tracker/<init>.

The $ symbol is to denote variable references in some programming but it is strange to find it in an API call reference. How can I interpret it here? What does the $ symbol mean in this context of API call tracing?

Riddick
  • 29
  • 3

1 Answers1

4

In this case it represents a nested class.

So for the example of BarcodeDetector$Builder, it is referring to the Builder class which is a class within BarcodeDetector.

Henry Twist
  • 5,666
  • 3
  • 19
  • 44
  • Thanks! So I can assume that `Builder` is then a child class of `BarcodeDetector`, thus inheriting from the parent class `BarcodeDetector`? – Riddick Nov 23 '21 at 09:38
  • 1
    Not quite, `Builder` wouldn't have to inherit from `BarcodeDetector`, it's just nested within. You can take a look [here](https://docs.oracle.com/javase/tutorial/java/javaOO/nested.html) for some more clarity. – Henry Twist Nov 23 '21 at 10:06