summaryrefslogtreecommitdiffstats
path: root/src/org/jetbrains/java/decompiler/code/optinstructions
diff options
context:
space:
mode:
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-08-28 21:34:14 +0400
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-08-28 21:34:19 +0400
commit076e4393f25bf1ad1ff1bd2853153e2b595dd90b (patch)
treef1a17a12ea762525b5efbc0778b0945d906c68c9 /src/org/jetbrains/java/decompiler/code/optinstructions
parent663631f0456fcc245dd835889f86541d75161c53 (diff)
downloadfernflower-076e4393f25bf1ad1ff1bd2853153e2b595dd90b.tar
fernflower-076e4393f25bf1ad1ff1bd2853153e2b595dd90b.tar.gz
fernflower-076e4393f25bf1ad1ff1bd2853153e2b595dd90b.tar.lz
fernflower-076e4393f25bf1ad1ff1bd2853153e2b595dd90b.tar.xz
fernflower-076e4393f25bf1ad1ff1bd2853153e2b595dd90b.zip
java-decompiler: post-import cleanup (formatting and copyright)
Diffstat (limited to 'src/org/jetbrains/java/decompiler/code/optinstructions')
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/ALOAD.java90
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/ANEWARRAY.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/ASTORE.java90
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/BIPUSH.java66
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/CHECKCAST.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/DLOAD.java90
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/DSTORE.java89
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/FLOAD.java90
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/FSTORE.java89
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/GETFIELD.java41
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/GETSTATIC.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/GOTO.java64
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/GOTO_W.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/IINC.java59
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/ILOAD.java81
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/INSTANCEOF.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEDYNAMIC.java39
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEINTERFACE.java44
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESPECIAL.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESTATIC.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEVIRTUAL.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/ISTORE.java81
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/JSR.java64
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/JSR_W.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/LDC.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/LDC2_W.java38
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/LDC_W.java38
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/LLOAD.java79
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/LOOKUPSWITCH.java58
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/LSTORE.java81
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/MULTIANEWARRAY.java42
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/NEW.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/NEWARRAY.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/PUTFIELD.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/PUTSTATIC.java40
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/RET.java55
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/SIPUSH.java38
-rw-r--r--src/org/jetbrains/java/decompiler/code/optinstructions/TABLESWITCH.java59
38 files changed, 1094 insertions, 1031 deletions
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/ALOAD.java b/src/org/jetbrains/java/decompiler/code/optinstructions/ALOAD.java
index b2727cf..788795e 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/ALOAD.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/ALOAD.java
@@ -1,56 +1,60 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class ALOAD extends Instruction {
-
- private static int[] opcodes = new int[] {opc_aload_0,opc_aload_1,opc_aload_2,opc_aload_3};
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_aload);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- return 4;
- } else {
- return 2;
- }
- } else {
- return 1;
- }
- }
-
+ private static int[] opcodes = new int[]{opc_aload_0, opc_aload_1, opc_aload_2, opc_aload_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_aload);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ return 4;
+ }
+ else {
+ return 2;
+ }
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/ANEWARRAY.java b/src/org/jetbrains/java/decompiler/code/optinstructions/ANEWARRAY.java
index 1e0d4ff..d514ffe 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/ANEWARRAY.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/ANEWARRAY.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class ANEWARRAY extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_anewarray);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_anewarray);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/ASTORE.java b/src/org/jetbrains/java/decompiler/code/optinstructions/ASTORE.java
index 475df11..40336f4 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/ASTORE.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/ASTORE.java
@@ -1,56 +1,60 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class ASTORE extends Instruction {
- private static int[] opcodes = new int[] {opc_astore_0,opc_astore_1,opc_astore_2,opc_astore_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_astore);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- return 4;
- } else {
- return 2;
- }
- } else {
- return 1;
- }
- }
-
+ private static int[] opcodes = new int[]{opc_astore_0, opc_astore_1, opc_astore_2, opc_astore_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_astore);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ return 4;
+ }
+ else {
+ return 2;
+ }
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/BIPUSH.java b/src/org/jetbrains/java/decompiler/code/optinstructions/BIPUSH.java
index 2fb2db5..4686051 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/BIPUSH.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/BIPUSH.java
@@ -1,44 +1,48 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class BIPUSH extends Instruction {
- private static int[] opcodes = new int[] {opc_iconst_m1,opc_iconst_0,opc_iconst_1,opc_iconst_2,opc_iconst_3,opc_iconst_4,opc_iconst_5};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int value = getOperand(0);
- if(value<-1 || value > 5) {
- out.writeByte(opc_bipush);
- out.writeByte(value);
- } else {
- out.writeByte(opcodes[value+1]);
- }
- }
-
- public int length() {
- int value = getOperand(0);
- if(value<-1 || value > 5) {
- return 2;
- } else {
- return 1;
- }
- }
+ private static int[] opcodes =
+ new int[]{opc_iconst_m1, opc_iconst_0, opc_iconst_1, opc_iconst_2, opc_iconst_3, opc_iconst_4, opc_iconst_5};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int value = getOperand(0);
+ if (value < -1 || value > 5) {
+ out.writeByte(opc_bipush);
+ out.writeByte(value);
+ }
+ else {
+ out.writeByte(opcodes[value + 1]);
+ }
+ }
+
+ public int length() {
+ int value = getOperand(0);
+ if (value < -1 || value > 5) {
+ return 2;
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/CHECKCAST.java b/src/org/jetbrains/java/decompiler/code/optinstructions/CHECKCAST.java
index 73417de..9a42f65 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/CHECKCAST.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/CHECKCAST.java
@@ -1,34 +1,34 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class CHECKCAST extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_checkcast);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_checkcast);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/DLOAD.java b/src/org/jetbrains/java/decompiler/code/optinstructions/DLOAD.java
index 96d5449..7630185 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/DLOAD.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/DLOAD.java
@@ -1,56 +1,60 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class DLOAD extends Instruction {
- private static int[] opcodes = new int[] {opc_dload_0,opc_dload_1,opc_dload_2,opc_dload_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_dload);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- return 4;
- } else {
- return 2;
- }
- } else {
- return 1;
- }
- }
-
+ private static int[] opcodes = new int[]{opc_dload_0, opc_dload_1, opc_dload_2, opc_dload_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_dload);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ return 4;
+ }
+ else {
+ return 2;
+ }
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/DSTORE.java b/src/org/jetbrains/java/decompiler/code/optinstructions/DSTORE.java
index 61a8776..2bdb749 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/DSTORE.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/DSTORE.java
@@ -1,55 +1,60 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class DSTORE extends Instruction {
- private static int[] opcodes = new int[] {opc_dstore_0,opc_dstore_1,opc_dstore_2,opc_dstore_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_dstore);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- return 4;
- } else {
- return 2;
- }
- } else {
- return 1;
- }
- }
+ private static int[] opcodes = new int[]{opc_dstore_0, opc_dstore_1, opc_dstore_2, opc_dstore_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_dstore);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ return 4;
+ }
+ else {
+ return 2;
+ }
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/FLOAD.java b/src/org/jetbrains/java/decompiler/code/optinstructions/FLOAD.java
index 5c8fe26..8a89dff 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/FLOAD.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/FLOAD.java
@@ -1,56 +1,60 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class FLOAD extends Instruction {
- private static int[] opcodes = new int[] {opc_fload_0,opc_fload_1,opc_fload_2,opc_fload_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_fload);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- return 4;
- } else {
- return 2;
- }
- } else {
- return 1;
- }
- }
-
+ private static int[] opcodes = new int[]{opc_fload_0, opc_fload_1, opc_fload_2, opc_fload_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_fload);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ return 4;
+ }
+ else {
+ return 2;
+ }
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/FSTORE.java b/src/org/jetbrains/java/decompiler/code/optinstructions/FSTORE.java
index 3685254..9061913 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/FSTORE.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/FSTORE.java
@@ -1,55 +1,60 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class FSTORE extends Instruction {
- private static int[] opcodes = new int[] {opc_fstore_0,opc_fstore_1,opc_fstore_2,opc_fstore_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_fstore);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- return 4;
- } else {
- return 2;
- }
- } else {
- return 1;
- }
- }
+ private static int[] opcodes = new int[]{opc_fstore_0, opc_fstore_1, opc_fstore_2, opc_fstore_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_fstore);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ return 4;
+ }
+ else {
+ return 2;
+ }
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/GETFIELD.java b/src/org/jetbrains/java/decompiler/code/optinstructions/GETFIELD.java
index b9a8ab5..6b95aaf 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/GETFIELD.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/GETFIELD.java
@@ -1,32 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class GETFIELD extends Instruction {
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_getfield);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_getfield);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/GETSTATIC.java b/src/org/jetbrains/java/decompiler/code/optinstructions/GETSTATIC.java
index 1890bc0..c1401a6 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/GETSTATIC.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/GETSTATIC.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class GETSTATIC extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_getstatic);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_getstatic);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/GOTO.java b/src/org/jetbrains/java/decompiler/code/optinstructions/GOTO.java
index 3a81194..97374c0 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/GOTO.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/GOTO.java
@@ -1,44 +1,46 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.JumpInstruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.JumpInstruction;
-
public class GOTO extends JumpInstruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int operand = getOperand(0);
- if(operand < -32768 || operand > 32767) {
- out.writeByte(opc_goto_w);
- out.writeInt(operand);
- } else {
- out.writeByte(opc_goto);
- out.writeShort(operand);
- }
- }
-
- public int length() {
- int operand = getOperand(0);
- if(operand < -32768 || operand > 32767) {
- return 5;
- } else {
- return 3;
- }
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int operand = getOperand(0);
+ if (operand < -32768 || operand > 32767) {
+ out.writeByte(opc_goto_w);
+ out.writeInt(operand);
+ }
+ else {
+ out.writeByte(opc_goto);
+ out.writeShort(operand);
+ }
+ }
+
+ public int length() {
+ int operand = getOperand(0);
+ if (operand < -32768 || operand > 32767) {
+ return 5;
+ }
+ else {
+ return 3;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/GOTO_W.java b/src/org/jetbrains/java/decompiler/code/optinstructions/GOTO_W.java
index 6e1f6e7..56ba9e8 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/GOTO_W.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/GOTO_W.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.JumpInstruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.JumpInstruction;
-
public class GOTO_W extends JumpInstruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_goto_w);
- out.writeInt(getOperand(0));
- }
-
- public int length() {
- return 5;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_goto_w);
+ out.writeInt(getOperand(0));
+ }
+
+ public int length() {
+ return 5;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/IINC.java b/src/org/jetbrains/java/decompiler/code/optinstructions/IINC.java
index e945969..05b446c 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/IINC.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/IINC.java
@@ -1,42 +1,43 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class IINC extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_iinc);
- if(wide) {
- out.writeShort(getOperand(0));
- out.writeShort(getOperand(1));
- } else {
- out.writeByte(getOperand(0));
- out.writeByte(getOperand(1));
- }
- }
-
- public int length() {
- return wide?6:3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_iinc);
+ if (wide) {
+ out.writeShort(getOperand(0));
+ out.writeShort(getOperand(1));
+ }
+ else {
+ out.writeByte(getOperand(0));
+ out.writeByte(getOperand(1));
+ }
+ }
+
+ public int length() {
+ return wide ? 6 : 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/ILOAD.java b/src/org/jetbrains/java/decompiler/code/optinstructions/ILOAD.java
index 40bfa4d..24b95ff 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/ILOAD.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/ILOAD.java
@@ -1,52 +1,55 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class ILOAD extends Instruction {
- private static int[] opcodes = new int[] {opc_iload_0,opc_iload_1,opc_iload_2,opc_iload_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_iload);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- return wide?4:2;
- } else {
- return 1;
- }
- }
-
+ private static int[] opcodes = new int[]{opc_iload_0, opc_iload_1, opc_iload_2, opc_iload_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_iload);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ return wide ? 4 : 2;
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/INSTANCEOF.java b/src/org/jetbrains/java/decompiler/code/optinstructions/INSTANCEOF.java
index f02dfc6..f93d5b8 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/INSTANCEOF.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/INSTANCEOF.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class INSTANCEOF extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_instanceof);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_instanceof);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEDYNAMIC.java b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEDYNAMIC.java
index ee8c785..917c5bd 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEDYNAMIC.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEDYNAMIC.java
@@ -1,20 +1,35 @@
+/*
+ * Copyright 2000-2014 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class INVOKEDYNAMIC extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_invokedynamic);
- out.writeShort(getOperand(0));
- out.writeByte(0);
- out.writeByte(0);
- }
-
- public int length() {
- return 5;
- }
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_invokedynamic);
+ out.writeShort(getOperand(0));
+ out.writeByte(0);
+ out.writeByte(0);
+ }
+
+ public int length() {
+ return 5;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEINTERFACE.java b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEINTERFACE.java
index e4f06f2..51259ff 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEINTERFACE.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEINTERFACE.java
@@ -1,35 +1,35 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class INVOKEINTERFACE extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_invokeinterface);
- out.writeShort(getOperand(0));
- out.writeByte(getOperand(1));
- out.writeByte(0);
- }
-
- public int length() {
- return 5;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_invokeinterface);
+ out.writeShort(getOperand(0));
+ out.writeByte(getOperand(1));
+ out.writeByte(0);
+ }
+
+ public int length() {
+ return 5;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESPECIAL.java b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESPECIAL.java
index 6b9b559..2436803 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESPECIAL.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESPECIAL.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class INVOKESPECIAL extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_invokespecial);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_invokespecial);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESTATIC.java b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESTATIC.java
index 0f1ad16..f036a1d 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESTATIC.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKESTATIC.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class INVOKESTATIC extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_invokestatic);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_invokestatic);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEVIRTUAL.java b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEVIRTUAL.java
index f4537f3..ca3bcd3 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEVIRTUAL.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/INVOKEVIRTUAL.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class INVOKEVIRTUAL extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_invokevirtual);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_invokevirtual);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/ISTORE.java b/src/org/jetbrains/java/decompiler/code/optinstructions/ISTORE.java
index 0ced128..5907538 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/ISTORE.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/ISTORE.java
@@ -1,52 +1,55 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class ISTORE extends Instruction {
- private static int[] opcodes = new int[] {opc_istore_0,opc_istore_1,opc_istore_2,opc_istore_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_istore);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- return wide?4:2;
- } else {
- return 1;
- }
- }
-
+ private static int[] opcodes = new int[]{opc_istore_0, opc_istore_1, opc_istore_2, opc_istore_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_istore);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ return wide ? 4 : 2;
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/JSR.java b/src/org/jetbrains/java/decompiler/code/optinstructions/JSR.java
index ef6c2ad..bb000a7 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/JSR.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/JSR.java
@@ -1,44 +1,46 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.JumpInstruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.JumpInstruction;
-
public class JSR extends JumpInstruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int operand = getOperand(0);
- if(operand < -32768 || operand > 32767) {
- out.writeByte(opc_jsr_w);
- out.writeInt(operand);
- } else {
- out.writeByte(opc_jsr);
- out.writeShort(operand);
- }
- }
-
- public int length() {
- int operand = getOperand(0);
- if(operand < -32768 || operand > 32767) {
- return 5;
- } else {
- return 3;
- }
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int operand = getOperand(0);
+ if (operand < -32768 || operand > 32767) {
+ out.writeByte(opc_jsr_w);
+ out.writeInt(operand);
+ }
+ else {
+ out.writeByte(opc_jsr);
+ out.writeShort(operand);
+ }
+ }
+
+ public int length() {
+ int operand = getOperand(0);
+ if (operand < -32768 || operand > 32767) {
+ return 5;
+ }
+ else {
+ return 3;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/JSR_W.java b/src/org/jetbrains/java/decompiler/code/optinstructions/JSR_W.java
index bc7ae59..fb04ed9 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/JSR_W.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/JSR_W.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.JumpInstruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.JumpInstruction;
-
public class JSR_W extends JumpInstruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_jsr_w);
- out.writeInt(getOperand(0));
- }
-
- public int length() {
- return 5;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_jsr_w);
+ out.writeInt(getOperand(0));
+ }
+
+ public int length() {
+ return 5;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/LDC.java b/src/org/jetbrains/java/decompiler/code/optinstructions/LDC.java
index 4b1a715..ae7b3c6 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/LDC.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/LDC.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class LDC extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_ldc);
- out.writeByte(getOperand(0));
- }
-
- public int length() {
- return 2;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_ldc);
+ out.writeByte(getOperand(0));
+ }
+
+ public int length() {
+ return 2;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/LDC2_W.java b/src/org/jetbrains/java/decompiler/code/optinstructions/LDC2_W.java
index 4b7ea0b..6ba1964 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/LDC2_W.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/LDC2_W.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class LDC2_W extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_ldc2_w);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_ldc2_w);
+ out.writeShort(getOperand(0));
+ }
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/LDC_W.java b/src/org/jetbrains/java/decompiler/code/optinstructions/LDC_W.java
index 6a4e3a6..71e5fe0 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/LDC_W.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/LDC_W.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class LDC_W extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_ldc_w);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_ldc_w);
+ out.writeShort(getOperand(0));
+ }
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/LLOAD.java b/src/org/jetbrains/java/decompiler/code/optinstructions/LLOAD.java
index 52f2b5c..6e50659 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/LLOAD.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/LLOAD.java
@@ -1,52 +1,55 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class LLOAD extends Instruction {
- private static int[] opcodes = new int[] {opc_lload_0,opc_lload_1,opc_lload_2,opc_lload_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_lload);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
+ private static int[] opcodes = new int[]{opc_lload_0, opc_lload_1, opc_lload_2, opc_lload_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_lload);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- return wide?4:2;
- } else {
- return 1;
- }
- }
-
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ return wide ? 4 : 2;
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/LOOKUPSWITCH.java b/src/org/jetbrains/java/decompiler/code/optinstructions/LOOKUPSWITCH.java
index 1654622..4183168 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/LOOKUPSWITCH.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/LOOKUPSWITCH.java
@@ -1,42 +1,42 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.SwitchInstruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.SwitchInstruction;
-
public class LOOKUPSWITCH extends SwitchInstruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
-
- out.writeByte(opc_lookupswitch);
-
- int padding = 3 - (offset%4);
- for(int i=0;i<padding;i++){
- out.writeByte(0);
- }
-
- for(int i=0;i<operandsCount();i++) {
- out.writeInt(getOperand(i));
- }
- }
-
- public int length() {
- return 1+operandsCount()*4;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+
+ out.writeByte(opc_lookupswitch);
+
+ int padding = 3 - (offset % 4);
+ for (int i = 0; i < padding; i++) {
+ out.writeByte(0);
+ }
+
+ for (int i = 0; i < operandsCount(); i++) {
+ out.writeInt(getOperand(i));
+ }
+ }
+
+ public int length() {
+ return 1 + operandsCount() * 4;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/LSTORE.java b/src/org/jetbrains/java/decompiler/code/optinstructions/LSTORE.java
index 410d19a..9095f04 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/LSTORE.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/LSTORE.java
@@ -1,52 +1,55 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class LSTORE extends Instruction {
- private static int[] opcodes = new int[] {opc_lstore_0,opc_lstore_1,opc_lstore_2,opc_lstore_3};
-
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- int index = getOperand(0);
- if(index>3) {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_lstore);
- if(wide) {
- out.writeShort(index);
- } else {
- out.writeByte(index);
- }
- } else {
- out.writeByte(opcodes[index]);
- }
- }
-
- public int length() {
- int index = getOperand(0);
- if(index>3) {
- return wide?4:2;
- } else {
- return 1;
- }
- }
-
+ private static int[] opcodes = new int[]{opc_lstore_0, opc_lstore_1, opc_lstore_2, opc_lstore_3};
+
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ int index = getOperand(0);
+ if (index > 3) {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_lstore);
+ if (wide) {
+ out.writeShort(index);
+ }
+ else {
+ out.writeByte(index);
+ }
+ }
+ else {
+ out.writeByte(opcodes[index]);
+ }
+ }
+
+ public int length() {
+ int index = getOperand(0);
+ if (index > 3) {
+ return wide ? 4 : 2;
+ }
+ else {
+ return 1;
+ }
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/MULTIANEWARRAY.java b/src/org/jetbrains/java/decompiler/code/optinstructions/MULTIANEWARRAY.java
index c7eb0b9..b6835e8 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/MULTIANEWARRAY.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/MULTIANEWARRAY.java
@@ -1,34 +1,34 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class MULTIANEWARRAY extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_multianewarray);
- out.writeShort(getOperand(0));
- out.writeByte(getOperand(1));
- }
-
- public int length() {
- return 4;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_multianewarray);
+ out.writeShort(getOperand(0));
+ out.writeByte(getOperand(1));
+ }
+
+ public int length() {
+ return 4;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/NEW.java b/src/org/jetbrains/java/decompiler/code/optinstructions/NEW.java
index eafe17c..2e8854f 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/NEW.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/NEW.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class NEW extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_new);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_new);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/NEWARRAY.java b/src/org/jetbrains/java/decompiler/code/optinstructions/NEWARRAY.java
index 8764a6f..f2f8e4d 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/NEWARRAY.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/NEWARRAY.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class NEWARRAY extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_newarray);
- out.writeByte(getOperand(0));
- }
-
- public int length() {
- return 2;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_newarray);
+ out.writeByte(getOperand(0));
+ }
+
+ public int length() {
+ return 2;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/PUTFIELD.java b/src/org/jetbrains/java/decompiler/code/optinstructions/PUTFIELD.java
index 096da07..c1e3e92 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/PUTFIELD.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/PUTFIELD.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class PUTFIELD extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_putfield);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_putfield);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/PUTSTATIC.java b/src/org/jetbrains/java/decompiler/code/optinstructions/PUTSTATIC.java
index e543c88..0fe0240 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/PUTSTATIC.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/PUTSTATIC.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class PUTSTATIC extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_putstatic);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_putstatic);
+ out.writeShort(getOperand(0));
+ }
+
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/RET.java b/src/org/jetbrains/java/decompiler/code/optinstructions/RET.java
index d52d2a2..93f62ff 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/RET.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/RET.java
@@ -1,40 +1,41 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class RET extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- if(wide) {
- out.writeByte(opc_wide);
- }
- out.writeByte(opc_ret);
- if(wide) {
- out.writeShort(getOperand(0));
- } else {
- out.writeByte(getOperand(0));
- }
- }
-
- public int length() {
- return wide?4:2;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ if (wide) {
+ out.writeByte(opc_wide);
+ }
+ out.writeByte(opc_ret);
+ if (wide) {
+ out.writeShort(getOperand(0));
+ }
+ else {
+ out.writeByte(getOperand(0));
+ }
+ }
+
+ public int length() {
+ return wide ? 4 : 2;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/SIPUSH.java b/src/org/jetbrains/java/decompiler/code/optinstructions/SIPUSH.java
index 5bac32f..08b10a5 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/SIPUSH.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/SIPUSH.java
@@ -1,33 +1,33 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.Instruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.Instruction;
-
public class SIPUSH extends Instruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
- out.writeByte(opc_sipush);
- out.writeShort(getOperand(0));
- }
-
- public int length() {
- return 3;
- }
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+ out.writeByte(opc_sipush);
+ out.writeShort(getOperand(0));
+ }
+ public int length() {
+ return 3;
+ }
}
diff --git a/src/org/jetbrains/java/decompiler/code/optinstructions/TABLESWITCH.java b/src/org/jetbrains/java/decompiler/code/optinstructions/TABLESWITCH.java
index ca2eae5..0b41ecf 100644
--- a/src/org/jetbrains/java/decompiler/code/optinstructions/TABLESWITCH.java
+++ b/src/org/jetbrains/java/decompiler/code/optinstructions/TABLESWITCH.java
@@ -1,43 +1,42 @@
/*
- * Fernflower - The Analytical Java Decompiler
- * http://www.reversed-java.com
+ * Copyright 2000-2014 JetBrains s.r.o.
*
- * (C) 2008 - 2010, Stiver
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This software is NEITHER public domain NOR free software
- * as per GNU License. See license.txt for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * This software is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.jetbrains.java.decompiler.code.optinstructions;
+import org.jetbrains.java.decompiler.code.SwitchInstruction;
+
import java.io.DataOutputStream;
import java.io.IOException;
-import org.jetbrains.java.decompiler.code.SwitchInstruction;
-
public class TABLESWITCH extends SwitchInstruction {
- public void writeToStream(DataOutputStream out, int offset) throws IOException {
-
- out.writeByte(opc_tableswitch);
-
- int padding = 3 - (offset%4);
- for(int i=0;i<padding;i++){
- out.writeByte(0);
- }
-
- for(int i=0;i<operandsCount();i++) {
- out.writeInt(getOperand(i));
- }
-
- }
-
- public int length() {
- return 1+operandsCount()*4;
- }
-
+ public void writeToStream(DataOutputStream out, int offset) throws IOException {
+
+ out.writeByte(opc_tableswitch);
+
+ int padding = 3 - (offset % 4);
+ for (int i = 0; i < padding; i++) {
+ out.writeByte(0);
+ }
+
+ for (int i = 0; i < operandsCount(); i++) {
+ out.writeInt(getOperand(i));
+ }
+ }
+
+ public int length() {
+ return 1 + operandsCount() * 4;
+ }
}