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

Underscore and java interfaces

1 reply
edmondo1984
Joined: 2011-09-14,
User offline. Last seen 28 weeks 4 days ago.
Dear all,why does the following code not compile with error: unbound placeholder parameter on val gigaSpace:GigaSpace = _ ;
(The val value will be injected through reflection by Spring IOC)
Best RegardsEdmondo
class CurveComputationEventHandlersFactory {  @Autowired  val partitionManager:PartitionManager=_;  @Autowired   val gottwareRuntimeConfiguration:GottwareRuntimeConfiguration=_;  @GigaSpaceContext  val gigaSpace:GigaSpace=_;
}
Doug Tangren
Joined: 2009-12-10,
User offline. Last seen 42 years 45 weeks ago.
Re: Underscore and java interfaces
On Tue, Dec 27, 2011 at 8:56 AM, Edmondo Porcu <edmondo.porcu@gmail.com> wrote:
Dear all,why does the following code not compile with error: unbound placeholder parameter on val gigaSpace:GigaSpace = _ ;
(The val value will be injected through reflection by Spring IOC)

I think you want vars.
 
Best Regards Edmondo
class CurveComputationEventHandlersFactory {  @Autowired  val partitionManager:PartitionManager=_;  @Autowired   val gottwareRuntimeConfiguration:GottwareRuntimeConfiguration=_;  @GigaSpaceContext  val gigaSpace:GigaSpace=_;
}



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