In Java I have a class that implements an interface:
AlertDialog implements DialogInterface
If some variables are declared inside of the interface I could access them:
AlertDialog.BUTTON_POSITIVE
But in Scala the above line does not compile. Seems like it is hidden. Is there any way to access these variables in Scala without creating a new object or doing anything else hacky?
There is no way in Scala to have access to these variables from the
AlertDialogclass but you could use the interface itself as an object to access them.So you can directly access the variables from the interface: