まず、私は Java に非常に慣れていないため、プログラミング全般がさびています。そのため、非常に単純なものを見落としている可能性があります。
エラー:
cannot find symbol
symbol : method setMethod(java.lang.String)
location: class ij.plugin.Thresholder
Thresholder.setMethod("Mean");
一部のコード スニペット: この部分はサード パーティのコードです。なるべく改造は避けたい
public class Thresholder implements PlugIn, Measurements, ItemListener {
private static String staticMethod = methods[0];
public static void setMethod(String method) {
staticMethod = method;
}
}
私のコード(まあ、いくつかの関連部分)
import ij.plugin.Thresholder;
public class CASA_ implements PlugInFilter,Measurements {
public void run(ImageProcessor ip) {
track(imp, minSize, maxSize, maxVelocity);
}
public void track(ImagePlus imp, float minSize, float maxSize, float maxVelocity) {
Thresholder.setMethod("Mean"); <-- This is the line the compiler hates
}
}
コンパイラが void 以外を返す setMethod メソッドを探すのはなぜですか?
ありがとう