scala - Creating Some(object) from Java -


I have to call Java from Scala API in which the signature option [activity] .

I want to pass some (this) , whose class is derived from the class activity .

I have tried some things:

  • New something & lt; Activity & gt; .apply (this)
  • some .apply (activity) this)
  • option. App (this activity)

But I get a compilation error like this:

  The actual argument is something & lt; Activity & gt; Options & lt; Class & lt;? Can not be converted into activity increases & gt; & Gt;   

Related questions:

  • It talks about the option [double] , and there are no issues of inheritance:

Are you fully sure that your method is a option [activity ] ? Because that message shows that it is taking a option [class [_ . Please post the scala code and how you are calling it.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -