since type is a reserved keyword in Scala I can see why I'm not able to read the value of an instance variable of java object called 'type' ... is there a workaround for this; I have no control over the Java code,
Re: accessing a java instance variable called 'type'
Put it in backticks and it will be fine:
val mytype = myObject.`type`
Regards,
Rüdiger
2011/6/27 Peter Maas :
> Hi all,
>
> since type is a reserved keyword in Scala I can see why I'm not able to read the value of an instance variable of java object called 'type' ... is there a workaround for this; I have no control over the Java code,
>
> Thanks in advance!
>
> Peter
>
>
Put it in backticks and it will be fine:
val mytype = myObject.`type`
Regards,
Rüdiger
2011/6/27 Peter Maas :
> Hi all,
>
> since type is a reserved keyword in Scala I can see why I'm not able to read the value of an instance variable of java object called 'type' ... is there a workaround for this; I have no control over the Java code,
>
> Thanks in advance!
>
> Peter
>
>