这段java代码需要转换为javascript吗?
private void validatePartitionSum() throws ProfileUsageException {
int moSize = maxSizeMO == -1 ? 0 : maxSizeMO;
int mtSize = maxSizeMT == -1 ? 0 : maxSizeMT;
if (maxSize > 0 && moSize + mtSize > maxSize) {
//added to default limit type to Messages when error occurs
if(this.editPartitionLimitFlag == false) {
this.limitType = ThresholdType.MESSAGES;
}
String errorMessage =
getFormattedResourceValue(STORAGE_SUM_LARGER_THAN_TOTAL);
throw new ProfileUsageException(errorMessage,
MMException.INVALID_PARAMETER);
}
}
答案 0 :(得分:2)
了解gwt,(不是在线工具)
引用:"使用您选择的Java IDE"
在Java中编写浏览器应用程序http://www.gwtproject.org/doc/latest/tutorial/gettingstarted.html
答案 1 :(得分:1)