This page is no longer maintained — Please continue to the home page at www.scala-lang.org

How to access an Java inner class

1 reply
garlicsoup
Joined: 2010-04-13,
User offline. Last seen 42 years 45 weeks ago.

I have a Java class A which contains another inner class B.

when I declare "val v:A.B", scalac reports error: type B is not a
member of object A.

Any idea, how to fix this?
Thank,
Ning

Michael Armbrust 2
Joined: 2010-01-03,
User offline. Last seen 42 years 45 weeks ago.
Re: How to access an Java inner class
Try:
val v: A#B
Michael

On Tue, Apr 13, 2010 at 3:02 PM, garlicsoup <nwang [dot] fortify [at] gmail [dot] com> wrote:
I have a Java class  A which contains another inner class B.

when I declare  "val v:A.B", scalac reports error: type B is not a
member of object A.

Any idea, how to fix this?
Thank,
Ning

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland