【发布时间】:2012-09-27 01:12:14
【问题描述】:
我目前正在通过以下方式调用我的方法:
InstrumentsInfo instrumentsInfo = new InstrumentsInfo();
String shortInstruName = "EURUSD"
TrackInstruments trackInstruments = new TrackInstruments(instrumentsInfo.getInstrumentID(shortInstruName), instrumentsInfo.getInstrumentTickSize(shortInstruName), instrumentsInfo.getInstrumentName(shortInstruName));
在 VBA 中我会做这样的事情
With instrumentsInfo
TrackInstruments(.getInstrumentID(shortInstruName), .getInstrumentTickSize(shortInstruName), .getInstrumentName(shortInstruName));
所以我的问题是,有没有办法避免在 Java 的方法调用中重复“instrumentsInfo”?
【问题讨论】:
标签: java vba with-statement