String のみを受け入れるメソッドがあります。
public void setVerticalAlignment(String align) {
...
gd.verticalAlignment = align;
// accepts only int.
...
}
ただしgd.verticalAlignment
、intのみを受け入れます。通常、これはgd.verticalAlignment = SWT.TOP
where SWT.TOP
is a static int のようなものによって設定されます。
のようなものでこのメソッドを呼び出すことは可能setVerticalAlignment("SWT.TOP")
ですか?