java反编译输出中的标签位置
我正在使用 jd-gui 反编译一个类文件,我得到了一个中断标签(label1076),如下所示。 在 Eclipse 中,我编译时出错,因为标签是在使用后声明的。 不使用break语句的等效java代码是什么?
public List buildChildList()
{
for (int i = 0; i < size; ++i)
{
... for (int i = 0; i < relatedWorkExpressions.size(); ++i) {
...
try
{
...
}
catch (Exception ex)
{
... 打破标签1076: }
...
...
...
label1076: childList[childPosition.intValue()] = child;
}
}
... }
I am using jd-gui to decompile a class file, and I got a break label (label1076) as below.
In eclipse I got an error compiling because the label is declared after it is used.
What is the equivalent java code without using break statement?
public List buildChildList()
{
for (int i = 0; i < size; ++i)
{
...
for (int i = 0; i < relatedWorkExpressions.size(); ++i) {
...
try
{
...
}
catch (Exception ex)
{
...
break label1076:
}
...
...
...
label1076: childList[childPosition.intValue()] = child;
}
}
...
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
等效的未标记 Java 将取决于代码逻辑。给定两个嵌套循环,标签可能应该位于外循环之前。跳出内部循环不需要标签,如图所示 这里。
The equivalent unlabeled Java would depend on the logic of code. Given two nested loops, the label probably should precede the outer loop. Breaking out of the inner loop wouldn't require a label, as shown here.