diff options
Diffstat (limited to 'src/org/jetbrains/java/decompiler/code/instructions')
154 files changed, 3162 insertions, 858 deletions
diff --git a/src/org/jetbrains/java/decompiler/code/instructions/AALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/AALOAD.java index 6e92fe6..a460184 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/AALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/AALOAD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/AASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/AASTORE.java index 09f5c4b..9e0805d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/AASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/AASTORE.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/ACONST_NULL.java b/src/org/jetbrains/java/decompiler/code/instructions/ACONST_NULL.java index 5733d40..2f78e54 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ACONST_NULL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ACONST_NULL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/ALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/ALOAD.java index a9c9e05..604585c 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ALOAD.java @@ -1,43 +1,60 @@ +/* + * 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.instructions; +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/instructions/ANEWARRAY.java b/src/org/jetbrains/java/decompiler/code/instructions/ANEWARRAY.java index aa9a6c9..09afe91 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ANEWARRAY.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ANEWARRAY.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/ARETURN.java b/src/org/jetbrains/java/decompiler/code/instructions/ARETURN.java index 915a50f..bf4bfae 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ARETURN.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ARETURN.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/ARRAYLENGTH.java b/src/org/jetbrains/java/decompiler/code/instructions/ARRAYLENGTH.java index a54aa41..6ddee94 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ARRAYLENGTH.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ARRAYLENGTH.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/ASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/ASTORE.java index 701f082..67ef5dd 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ASTORE.java @@ -1,42 +1,60 @@ +/* + * 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.instructions; +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/instructions/ATHROW.java b/src/org/jetbrains/java/decompiler/code/instructions/ATHROW.java index 1ca07c5..66d22a0 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ATHROW.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ATHROW.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/BALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/BALOAD.java index c9d9e79..4a2e5d9 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/BALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/BALOAD.java @@ -1,7 +1,22 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; public class BALOAD extends Instruction { - + } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/BASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/BASTORE.java index 478a887..70e8f0d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/BASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/BASTORE.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/BIPUSH.java b/src/org/jetbrains/java/decompiler/code/instructions/BIPUSH.java index 90874c5..836ee10 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/BIPUSH.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/BIPUSH.java @@ -1,30 +1,48 @@ +/* + * 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.instructions; +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/instructions/CALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/CALOAD.java index cf3fb87..9646179 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/CALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/CALOAD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/CASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/CASTORE.java index 2ed21e5..6222e2f 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/CASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/CASTORE.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/CHECKCAST.java b/src/org/jetbrains/java/decompiler/code/instructions/CHECKCAST.java index a3bb57e..bfff1cf 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/CHECKCAST.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/CHECKCAST.java @@ -1,20 +1,34 @@ +/* + * 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.instructions; +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/instructions/D2F.java b/src/org/jetbrains/java/decompiler/code/instructions/D2F.java index fd42a2e..e40a093 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/D2F.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/D2F.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/D2I.java b/src/org/jetbrains/java/decompiler/code/instructions/D2I.java index 4fc7801..97e1675 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/D2I.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/D2I.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/D2L.java b/src/org/jetbrains/java/decompiler/code/instructions/D2L.java index cc90f1c..0d6a304 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/D2L.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/D2L.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DADD.java b/src/org/jetbrains/java/decompiler/code/instructions/DADD.java index ac84423..e65a669 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DADD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DADD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/DALOAD.java index 00a0d17..a356c5b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DALOAD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/DASTORE.java index e33959f..f1c6cda 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DASTORE.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DCMPG.java b/src/org/jetbrains/java/decompiler/code/instructions/DCMPG.java index 2b853ac..8c1ffc0 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DCMPG.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DCMPG.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DCMPL.java b/src/org/jetbrains/java/decompiler/code/instructions/DCMPL.java index 7fdba33..2b146a5 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DCMPL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DCMPL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DCONST_0.java b/src/org/jetbrains/java/decompiler/code/instructions/DCONST_0.java index d0023f2..78c5dde 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DCONST_0.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DCONST_0.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DCONST_1.java b/src/org/jetbrains/java/decompiler/code/instructions/DCONST_1.java index bcd7c67..8127cfb 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DCONST_1.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DCONST_1.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DDIV.java b/src/org/jetbrains/java/decompiler/code/instructions/DDIV.java index 40d86a8..d15e7af 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DDIV.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DDIV.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DLOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/DLOAD.java index ee098d6..1d7fea4 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DLOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DLOAD.java @@ -1,42 +1,60 @@ +/* + * 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.instructions; +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/instructions/DMUL.java b/src/org/jetbrains/java/decompiler/code/instructions/DMUL.java index 65bedca..3fdc17a 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DMUL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DMUL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DNEG.java b/src/org/jetbrains/java/decompiler/code/instructions/DNEG.java index 15bd9f3..83f82c5 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DNEG.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DNEG.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DREM.java b/src/org/jetbrains/java/decompiler/code/instructions/DREM.java index ab57911..55453fc 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DREM.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DREM.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DRETURN.java b/src/org/jetbrains/java/decompiler/code/instructions/DRETURN.java index 0a6e376..b758dcb 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DRETURN.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DRETURN.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DSTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/DSTORE.java index fe1feb8..e1e37e5 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DSTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DSTORE.java @@ -1,41 +1,60 @@ +/* + * 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.instructions; +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/instructions/DSUB.java b/src/org/jetbrains/java/decompiler/code/instructions/DSUB.java index d683a63..33026ca 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DSUB.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DSUB.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DUP.java b/src/org/jetbrains/java/decompiler/code/instructions/DUP.java index 50119da..07a7c4f 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DUP.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DUP.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DUP2.java b/src/org/jetbrains/java/decompiler/code/instructions/DUP2.java index 3929ee0..6451cf2 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DUP2.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DUP2.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DUP2_X1.java b/src/org/jetbrains/java/decompiler/code/instructions/DUP2_X1.java index ad59230..deddd1b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DUP2_X1.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DUP2_X1.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DUP2_X2.java b/src/org/jetbrains/java/decompiler/code/instructions/DUP2_X2.java index d27ca93..deafca6 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DUP2_X2.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DUP2_X2.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DUP_X1.java b/src/org/jetbrains/java/decompiler/code/instructions/DUP_X1.java index 9b6b271..a1268e9 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DUP_X1.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DUP_X1.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/DUP_X2.java b/src/org/jetbrains/java/decompiler/code/instructions/DUP_X2.java index 8c4b03e..bf5f71d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/DUP_X2.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/DUP_X2.java @@ -1,7 +1,22 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; public class DUP_X2 extends Instruction { - + } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/F2D.java b/src/org/jetbrains/java/decompiler/code/instructions/F2D.java index debb8de..dd5b4a6 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/F2D.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/F2D.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/F2I.java b/src/org/jetbrains/java/decompiler/code/instructions/F2I.java index bbda5c8..0811e2b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/F2I.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/F2I.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/F2L.java b/src/org/jetbrains/java/decompiler/code/instructions/F2L.java index a58a398..a470414 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/F2L.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/F2L.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FADD.java b/src/org/jetbrains/java/decompiler/code/instructions/FADD.java index ab7a357..bdd9b89 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FADD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FADD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/FALOAD.java index cc56e21..e9befaf 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FALOAD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/FASTORE.java index d18a2ef..6e280fc 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FASTORE.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FCMPG.java b/src/org/jetbrains/java/decompiler/code/instructions/FCMPG.java index a86b2a9..4c3c9c5 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FCMPG.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FCMPG.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FCMPL.java b/src/org/jetbrains/java/decompiler/code/instructions/FCMPL.java index 450546c..42dcb4b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FCMPL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FCMPL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FCONST_0.java b/src/org/jetbrains/java/decompiler/code/instructions/FCONST_0.java index 77f4e84..957fe29 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FCONST_0.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FCONST_0.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FCONST_1.java b/src/org/jetbrains/java/decompiler/code/instructions/FCONST_1.java index e90fd44..ab014c4 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FCONST_1.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FCONST_1.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FCONST_2.java b/src/org/jetbrains/java/decompiler/code/instructions/FCONST_2.java index 7736565..fa6be0f 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FCONST_2.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FCONST_2.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FDIV.java b/src/org/jetbrains/java/decompiler/code/instructions/FDIV.java index 0524b01..eb6dce4 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FDIV.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FDIV.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FLOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/FLOAD.java index 03ba1d2..6640d5d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FLOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FLOAD.java @@ -1,42 +1,60 @@ +/* + * 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.instructions; +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/instructions/FMUL.java b/src/org/jetbrains/java/decompiler/code/instructions/FMUL.java index 598145b..5a5cee3 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FMUL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FMUL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FNEG.java b/src/org/jetbrains/java/decompiler/code/instructions/FNEG.java index b1d96ea..ab68c82 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FNEG.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FNEG.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FREM.java b/src/org/jetbrains/java/decompiler/code/instructions/FREM.java index b8dc0fe..91900a8 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FREM.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FREM.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FRETURN.java b/src/org/jetbrains/java/decompiler/code/instructions/FRETURN.java index 3781401..a310022 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FRETURN.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FRETURN.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/FSTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/FSTORE.java index 203588b..15b5d42 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FSTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FSTORE.java @@ -1,41 +1,60 @@ +/* + * 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.instructions; +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/instructions/FSUB.java b/src/org/jetbrains/java/decompiler/code/instructions/FSUB.java index 841ee0d..09a07b8 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/FSUB.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/FSUB.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/GETFIELD.java b/src/org/jetbrains/java/decompiler/code/instructions/GETFIELD.java index 8500f46..93b46ae 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/GETFIELD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/GETFIELD.java @@ -1,18 +1,33 @@ +/* + * 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.instructions; +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/instructions/GETSTATIC.java b/src/org/jetbrains/java/decompiler/code/instructions/GETSTATIC.java index 761624f..86f1b75 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/GETSTATIC.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/GETSTATIC.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/GOTO.java b/src/org/jetbrains/java/decompiler/code/instructions/GOTO.java index 91f5081..515275f 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/GOTO.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/GOTO.java @@ -1,30 +1,46 @@ +/* + * 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.instructions; +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/instructions/GOTO_W.java b/src/org/jetbrains/java/decompiler/code/instructions/GOTO_W.java index 830b766..ec427f8 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/GOTO_W.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/GOTO_W.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/I2B.java b/src/org/jetbrains/java/decompiler/code/instructions/I2B.java index f5a3fbd..b6fc681 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/I2B.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/I2B.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/I2C.java b/src/org/jetbrains/java/decompiler/code/instructions/I2C.java index a180a64..a1dca6b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/I2C.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/I2C.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/I2D.java b/src/org/jetbrains/java/decompiler/code/instructions/I2D.java index b0bad9a..6478d78 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/I2D.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/I2D.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/I2F.java b/src/org/jetbrains/java/decompiler/code/instructions/I2F.java index ca1a0fb..1247eff 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/I2F.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/I2F.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/I2L.java b/src/org/jetbrains/java/decompiler/code/instructions/I2L.java index 24bca4e..6e27d5a 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/I2L.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/I2L.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/I2S.java b/src/org/jetbrains/java/decompiler/code/instructions/I2S.java index 370ae2f..e66b75b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/I2S.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/I2S.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IADD.java b/src/org/jetbrains/java/decompiler/code/instructions/IADD.java index f427c40..5922136 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IADD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IADD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/IALOAD.java index d70fae6..645d6df 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IALOAD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IAND.java b/src/org/jetbrains/java/decompiler/code/instructions/IAND.java index 00ae7a6..207ed34 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IAND.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IAND.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/IASTORE.java index 78a1d28..56d3d24 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IASTORE.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IDIV.java b/src/org/jetbrains/java/decompiler/code/instructions/IDIV.java index bec8cc9..60b4690 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IDIV.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IDIV.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IFEQ.java b/src/org/jetbrains/java/decompiler/code/instructions/IFEQ.java index 47711d8..28cfd81 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IFEQ.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IFEQ.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IFEQ extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_ifeq); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_ifeq); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IFGE.java b/src/org/jetbrains/java/decompiler/code/instructions/IFGE.java index 9cfaba4..d805789 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IFGE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IFGE.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IFGE extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_ifge); - out.writeShort(getOperand(0)); - } + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_ifge); + out.writeShort(getOperand(0)); + } - public int length() { - return 3; - } - + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IFGT.java b/src/org/jetbrains/java/decompiler/code/instructions/IFGT.java index 99b171e..13f650a 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IFGT.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IFGT.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IFGT extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_ifgt); - out.writeShort(getOperand(0)); - } + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_ifgt); + out.writeShort(getOperand(0)); + } - public int length() { - return 3; - } - + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IFLE.java b/src/org/jetbrains/java/decompiler/code/instructions/IFLE.java index b21b2cf..e03d915 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IFLE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IFLE.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IFLE extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_ifle); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_ifle); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IFLT.java b/src/org/jetbrains/java/decompiler/code/instructions/IFLT.java index 66ba02b..0299a91 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IFLT.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IFLT.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IFLT extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_iflt); - out.writeShort(getOperand(0)); - } + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_iflt); + out.writeShort(getOperand(0)); + } - public int length() { - return 3; - } - + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IFNE.java b/src/org/jetbrains/java/decompiler/code/instructions/IFNE.java index 983fea2..3402362 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IFNE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IFNE.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IFNE extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_ifne); - out.writeShort(getOperand(0)); - } + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_ifne); + out.writeShort(getOperand(0)); + } - public int length() { - return 3; - } - + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IFNONNULL.java b/src/org/jetbrains/java/decompiler/code/instructions/IFNONNULL.java index 2555a80..64a12d0 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IFNONNULL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IFNONNULL.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IFNONNULL extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_ifnonnull); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_ifnonnull); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IFNULL.java b/src/org/jetbrains/java/decompiler/code/instructions/IFNULL.java index b695787..71265b6 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IFNULL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IFNULL.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IFNULL extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_ifnull); - out.writeShort(getOperand(0)); - } + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_ifnull); + out.writeShort(getOperand(0)); + } - public int length() { - return 3; - } - + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPEQ.java b/src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPEQ.java index 30e530b..5b23cbf 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPEQ.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPEQ.java @@ -1,20 +1,34 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IF_ACMPEQ extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_if_acmpeq); - out.writeShort(getOperand(0)); - } + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_if_acmpeq); + out.writeShort(getOperand(0)); + } - public int length() { - return 3; - } - + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPNE.java b/src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPNE.java index ccb513f..e41ea9f 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPNE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IF_ACMPNE.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IF_ACMPNE extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_if_acmpne); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_if_acmpne); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPEQ.java b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPEQ.java index 1343aca..dad633d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPEQ.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPEQ.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IF_ICMPEQ extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_if_icmpeq); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_if_icmpeq); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGE.java b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGE.java index beeabec..54f6295 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGE.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IF_ICMPGE extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_if_icmpge); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_if_icmpge); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGT.java b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGT.java index e41d261..e2e1972 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGT.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPGT.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IF_ICMPGT extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_if_icmpgt); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_if_icmpgt); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPLE.java b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPLE.java index c9288da..4f8c76c 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPLE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPLE.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IF_ICMPLE extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_if_icmple); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_if_icmple); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPLT.java b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPLT.java index 107519e..d6a9a48 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPLT.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPLT.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IF_ICMPLT extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_if_icmplt); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_if_icmplt); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPNE.java b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPNE.java index 703c10c..6484344 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPNE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IF_ICMPNE.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +import org.jetbrains.java.decompiler.code.JumpInstruction; + import java.io.DataOutputStream; import java.io.IOException; -import org.jetbrains.java.decompiler.code.JumpInstruction; - public class IF_ICMPNE extends JumpInstruction { - public void writeToStream(DataOutputStream out, int offset) throws IOException { - out.writeByte(opc_if_icmpne); - out.writeShort(getOperand(0)); - } - - public int length() { - return 3; - } - + public void writeToStream(DataOutputStream out, int offset) throws IOException { + out.writeByte(opc_if_icmpne); + out.writeShort(getOperand(0)); + } + + public int length() { + return 3; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IINC.java b/src/org/jetbrains/java/decompiler/code/instructions/IINC.java index 763a192..fc2506c 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IINC.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IINC.java @@ -1,28 +1,43 @@ +/* + * 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.instructions; +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/instructions/ILOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/ILOAD.java index 4b9bd59..3be609d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ILOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ILOAD.java @@ -1,38 +1,55 @@ +/* + * 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.instructions; +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/instructions/IMUL.java b/src/org/jetbrains/java/decompiler/code/instructions/IMUL.java index 64dd4cc..8cec91b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IMUL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IMUL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/INEG.java b/src/org/jetbrains/java/decompiler/code/instructions/INEG.java index cf341e7..903a22d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/INEG.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/INEG.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/INSTANCEOF.java b/src/org/jetbrains/java/decompiler/code/instructions/INSTANCEOF.java index a4214ec..e5acd87 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/INSTANCEOF.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/INSTANCEOF.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/INVOKEINTERFACE.java b/src/org/jetbrains/java/decompiler/code/instructions/INVOKEINTERFACE.java index bd1ce37..ecf15b1 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/INVOKEINTERFACE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/INVOKEINTERFACE.java @@ -1,21 +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.instructions; +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/instructions/INVOKESPECIAL.java b/src/org/jetbrains/java/decompiler/code/instructions/INVOKESPECIAL.java index d14a8ee..0f3ad00 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/INVOKESPECIAL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/INVOKESPECIAL.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/INVOKESTATIC.java b/src/org/jetbrains/java/decompiler/code/instructions/INVOKESTATIC.java index 8ef9f26..1d21cd2 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/INVOKESTATIC.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/INVOKESTATIC.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/INVOKEVIRTUAL.java b/src/org/jetbrains/java/decompiler/code/instructions/INVOKEVIRTUAL.java index 687c6e4..2ce543d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/INVOKEVIRTUAL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/INVOKEVIRTUAL.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/IOR.java b/src/org/jetbrains/java/decompiler/code/instructions/IOR.java index b3e6bae..b8bc4b1 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IOR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IOR.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IREM.java b/src/org/jetbrains/java/decompiler/code/instructions/IREM.java index db1fbb8..4d299b7 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IREM.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IREM.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IRETURN.java b/src/org/jetbrains/java/decompiler/code/instructions/IRETURN.java index 2a2e48c..7f95241 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IRETURN.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IRETURN.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/ISHL.java b/src/org/jetbrains/java/decompiler/code/instructions/ISHL.java index 5e0b1e0..f440380 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ISHL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ISHL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/ISHR.java b/src/org/jetbrains/java/decompiler/code/instructions/ISHR.java index 9a8c182..6fa2b71 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ISHR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ISHR.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/ISTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/ISTORE.java index 7bc1647..5d6024a 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ISTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ISTORE.java @@ -1,38 +1,55 @@ +/* + * 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.instructions; +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/instructions/ISUB.java b/src/org/jetbrains/java/decompiler/code/instructions/ISUB.java index 3007c8a..7e3caf0 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/ISUB.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/ISUB.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IUSHR.java b/src/org/jetbrains/java/decompiler/code/instructions/IUSHR.java index 3171c1a..b548209 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IUSHR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IUSHR.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/IXOR.java b/src/org/jetbrains/java/decompiler/code/instructions/IXOR.java index f6568d2..261146b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/IXOR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/IXOR.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/JSR.java b/src/org/jetbrains/java/decompiler/code/instructions/JSR.java index bb23f66..1c80177 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/JSR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/JSR.java @@ -1,30 +1,46 @@ +/* + * 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.instructions; +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/instructions/JSR_W.java b/src/org/jetbrains/java/decompiler/code/instructions/JSR_W.java index 47af3e6..67cf91d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/JSR_W.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/JSR_W.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/L2D.java b/src/org/jetbrains/java/decompiler/code/instructions/L2D.java index 59178d2..5569d3f 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/L2D.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/L2D.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/L2F.java b/src/org/jetbrains/java/decompiler/code/instructions/L2F.java index 37932b6..fcab0ba 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/L2F.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/L2F.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/L2I.java b/src/org/jetbrains/java/decompiler/code/instructions/L2I.java index c197282..558e5f5 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/L2I.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/L2I.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LADD.java b/src/org/jetbrains/java/decompiler/code/instructions/LADD.java index 8c5625c..358a788 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LADD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LADD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/LALOAD.java index 3590f94..9e6b0b0 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LALOAD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LAND.java b/src/org/jetbrains/java/decompiler/code/instructions/LAND.java index 46a396c..37da9bd 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LAND.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LAND.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/LASTORE.java index 107af51..e89aeff 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LASTORE.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LCMP.java b/src/org/jetbrains/java/decompiler/code/instructions/LCMP.java index 8a9dac5..399d231 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LCMP.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LCMP.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LCONST_0.java b/src/org/jetbrains/java/decompiler/code/instructions/LCONST_0.java index 5617fbe..04bc841 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LCONST_0.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LCONST_0.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LCONST_1.java b/src/org/jetbrains/java/decompiler/code/instructions/LCONST_1.java index 8244407..b58fadf 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LCONST_1.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LCONST_1.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LDC.java b/src/org/jetbrains/java/decompiler/code/instructions/LDC.java index 088e5a5..aa1e9ac 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LDC.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LDC.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/LDC2_W.java b/src/org/jetbrains/java/decompiler/code/instructions/LDC2_W.java index 9b67a7e..67ba631 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LDC2_W.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LDC2_W.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/LDC_W.java b/src/org/jetbrains/java/decompiler/code/instructions/LDC_W.java index 290462e..1e5030a 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LDC_W.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LDC_W.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/LDIV.java b/src/org/jetbrains/java/decompiler/code/instructions/LDIV.java index 36b09ca..b90015b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LDIV.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LDIV.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LLOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/LLOAD.java index 0cf9695..44afa3b 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LLOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LLOAD.java @@ -1,38 +1,55 @@ +/* + * 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.instructions; +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/instructions/LMUL.java b/src/org/jetbrains/java/decompiler/code/instructions/LMUL.java index 075c50b..475030d 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LMUL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LMUL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LNEG.java b/src/org/jetbrains/java/decompiler/code/instructions/LNEG.java index b2c9f10..5cacf17 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LNEG.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LNEG.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LOOKUPSWITCH.java b/src/org/jetbrains/java/decompiler/code/instructions/LOOKUPSWITCH.java index dbe5f03..04ec7ba 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LOOKUPSWITCH.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LOOKUPSWITCH.java @@ -1,28 +1,42 @@ +/* + * 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.instructions; +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/instructions/LOR.java b/src/org/jetbrains/java/decompiler/code/instructions/LOR.java index 55921d4..0c65e5c 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LOR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LOR.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LREM.java b/src/org/jetbrains/java/decompiler/code/instructions/LREM.java index cd5073b..b75ebc5 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LREM.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LREM.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LRETURN.java b/src/org/jetbrains/java/decompiler/code/instructions/LRETURN.java index e7dea00..b2f03de 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LRETURN.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LRETURN.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LSHL.java b/src/org/jetbrains/java/decompiler/code/instructions/LSHL.java index 206f91a..ae5e9f2 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LSHL.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LSHL.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LSHR.java b/src/org/jetbrains/java/decompiler/code/instructions/LSHR.java index b4276ad..7402178 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LSHR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LSHR.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LSTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/LSTORE.java index 1f5dfea..230c3e4 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LSTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LSTORE.java @@ -1,38 +1,55 @@ +/* + * 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.instructions; +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/instructions/LSUB.java b/src/org/jetbrains/java/decompiler/code/instructions/LSUB.java index 14b019f..cce794a 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LSUB.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LSUB.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LUSHR.java b/src/org/jetbrains/java/decompiler/code/instructions/LUSHR.java index 63d5ca4..ecdc444 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LUSHR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LUSHR.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/LXOR.java b/src/org/jetbrains/java/decompiler/code/instructions/LXOR.java index 9812a1a..d9f2644 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/LXOR.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/LXOR.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/MONITORENTER.java b/src/org/jetbrains/java/decompiler/code/instructions/MONITORENTER.java index d2ed979..c92bbf0 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/MONITORENTER.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/MONITORENTER.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/MONITOREXIT.java b/src/org/jetbrains/java/decompiler/code/instructions/MONITOREXIT.java index f1324be..1a645b9 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/MONITOREXIT.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/MONITOREXIT.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/MULTIANEWARRAY.java b/src/org/jetbrains/java/decompiler/code/instructions/MULTIANEWARRAY.java index 313b708..9a1b16a 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/MULTIANEWARRAY.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/MULTIANEWARRAY.java @@ -1,20 +1,34 @@ +/* + * 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.instructions; +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/instructions/NEW.java b/src/org/jetbrains/java/decompiler/code/instructions/NEW.java index 8c5ab34..7ffbdd3 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/NEW.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/NEW.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/NEWARRAY.java b/src/org/jetbrains/java/decompiler/code/instructions/NEWARRAY.java index eb25456..ec4ada8 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/NEWARRAY.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/NEWARRAY.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/NOP.java b/src/org/jetbrains/java/decompiler/code/instructions/NOP.java index ef11da8..4c47938 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/NOP.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/NOP.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/POP.java b/src/org/jetbrains/java/decompiler/code/instructions/POP.java index 8848163..99fa873 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/POP.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/POP.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/POP2.java b/src/org/jetbrains/java/decompiler/code/instructions/POP2.java index f07d5d5..1ff12f3 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/POP2.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/POP2.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/PUTFIELD.java b/src/org/jetbrains/java/decompiler/code/instructions/PUTFIELD.java index b37efb0..1ab8773 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/PUTFIELD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/PUTFIELD.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/PUTSTATIC.java b/src/org/jetbrains/java/decompiler/code/instructions/PUTSTATIC.java index 260e57c..92e2271 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/PUTSTATIC.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/PUTSTATIC.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/RET.java b/src/org/jetbrains/java/decompiler/code/instructions/RET.java index 490ad8c..c317be0 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/RET.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/RET.java @@ -1,26 +1,41 @@ +/* + * 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.instructions; +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/instructions/RETURN.java b/src/org/jetbrains/java/decompiler/code/instructions/RETURN.java index cbdcbfc..83bf8c7 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/RETURN.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/RETURN.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/SALOAD.java b/src/org/jetbrains/java/decompiler/code/instructions/SALOAD.java index c9da26e..deb82e3 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/SALOAD.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/SALOAD.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/SASTORE.java b/src/org/jetbrains/java/decompiler/code/instructions/SASTORE.java index 4a90aac..e1ff283 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/SASTORE.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/SASTORE.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/SIPUSH.java b/src/org/jetbrains/java/decompiler/code/instructions/SIPUSH.java index a5f7025..7c5c55e 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/SIPUSH.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/SIPUSH.java @@ -1,19 +1,33 @@ +/* + * 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.instructions; +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/instructions/SWAP.java b/src/org/jetbrains/java/decompiler/code/instructions/SWAP.java index 9fd99b3..64d67f4 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/SWAP.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/SWAP.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/src/org/jetbrains/java/decompiler/code/instructions/TABLESWITCH.java b/src/org/jetbrains/java/decompiler/code/instructions/TABLESWITCH.java index 4a4be0a..ac5e6bd 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/TABLESWITCH.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/TABLESWITCH.java @@ -1,29 +1,42 @@ +/* + * 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.instructions; +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; + } } diff --git a/src/org/jetbrains/java/decompiler/code/instructions/XXXUNUSEDXXX.java b/src/org/jetbrains/java/decompiler/code/instructions/XXXUNUSEDXXX.java index 2907258..739aea9 100644 --- a/src/org/jetbrains/java/decompiler/code/instructions/XXXUNUSEDXXX.java +++ b/src/org/jetbrains/java/decompiler/code/instructions/XXXUNUSEDXXX.java @@ -1,3 +1,18 @@ +/* + * 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.instructions; import org.jetbrains.java.decompiler.code.Instruction; |