More BCEL pruning
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 7 Dec 2009 16:56:00 +0000 (16:56 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 7 Dec 2009 16:56:00 +0000 (16:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@887998 13f79535-47bb-0310-9956-ffa450edef68

21 files changed:
java/org/apache/tomcat/util/bcel/generic/BranchInstruction.java
java/org/apache/tomcat/util/bcel/generic/IFEQ.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IFGE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IFGT.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IFLE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IFLT.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IFNE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IFNONNULL.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IFNULL.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IF_ACMPEQ.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IF_ACMPNE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IF_ICMPEQ.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IF_ICMPGE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IF_ICMPGT.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IF_ICMPLE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IF_ICMPLT.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IF_ICMPNE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IfInstruction.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/LocalVariableGen.java
java/org/apache/tomcat/util/bcel/generic/MethodGen.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/StackConsumer.java [deleted file]

index 2e48b98..a08444b 100644 (file)
@@ -43,14 +43,7 @@ public abstract class BranchInstruction extends Instruction implements Instructi
     }
 
 
-    /** Common super constructor
-     * @param opcode Instruction opcode
-     * @param target instruction to branch to
-     */
-    protected BranchInstruction(short opcode, InstructionHandle target) {
-        super(opcode, (short) 3);
-        setTarget(target);
-    }
+    
 
 
     /**
diff --git a/java/org/apache/tomcat/util/bcel/generic/IFEQ.java b/java/org/apache/tomcat/util/bcel/generic/IFEQ.java
deleted file mode 100644 (file)
index 21a9078..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IFEQ - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFEQ extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFEQ() {
-    }
-
-
-    public IFEQ(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IFEQ, target);
-    }
-
-
-    /**
-     * @return negation of instruction, e.g. IFEQ.negate() == IFNE
-     */
-    public IfInstruction negate() {
-        return new IFNE(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IFGE.java b/java/org/apache/tomcat/util/bcel/generic/IFGE.java
deleted file mode 100644 (file)
index 65098ba..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IFGE - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFGE extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFGE() {
-    }
-
-
-    public IFGE(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IFGE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IFLT(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IFGT.java b/java/org/apache/tomcat/util/bcel/generic/IFGT.java
deleted file mode 100644 (file)
index 6f800d0..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IFGT - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFGT extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFGT() {
-    }
-
-
-    public IFGT(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IFGT, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IFLE(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IFLE.java b/java/org/apache/tomcat/util/bcel/generic/IFLE.java
deleted file mode 100644 (file)
index 160f8bb..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IFLE - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFLE extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFLE() {
-    }
-
-
-    public IFLE(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IFLE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IFGT(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IFLT.java b/java/org/apache/tomcat/util/bcel/generic/IFLT.java
deleted file mode 100644 (file)
index 88677ee..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IFLT - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFLT extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFLT() {
-    }
-
-
-    public IFLT(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IFLT, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IFGE(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IFNE.java b/java/org/apache/tomcat/util/bcel/generic/IFNE.java
deleted file mode 100644 (file)
index eaa9463..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IFNE - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFNE extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFNE() {
-    }
-
-
-    public IFNE(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IFNE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IFEQ(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IFNONNULL.java b/java/org/apache/tomcat/util/bcel/generic/IFNONNULL.java
deleted file mode 100644 (file)
index ae11e66..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IFNONNULL - Branch if reference is not null
- *
- * <PRE>Stack: ..., reference -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFNONNULL extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFNONNULL() {
-    }
-
-
-    public IFNONNULL(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IFNONNULL, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IFNULL(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IFNULL.java b/java/org/apache/tomcat/util/bcel/generic/IFNULL.java
deleted file mode 100644 (file)
index 9c244bd..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IFNULL - Branch if reference is not null
- *
- * <PRE>Stack: ..., reference -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFNULL extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFNULL() {
-    }
-
-
-    public IFNULL(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IFNULL, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IFNONNULL(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IF_ACMPEQ.java b/java/org/apache/tomcat/util/bcel/generic/IF_ACMPEQ.java
deleted file mode 100644 (file)
index 8ce1b29..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IF_ACMPEQ - Branch if reference comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ACMPEQ extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ACMPEQ() {
-    }
-
-
-    public IF_ACMPEQ(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IF_ACMPEQ, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IF_ACMPNE(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IF_ACMPNE.java b/java/org/apache/tomcat/util/bcel/generic/IF_ACMPNE.java
deleted file mode 100644 (file)
index 08776f3..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IF_ACMPNE - Branch if reference comparison doesn't succeed
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ACMPNE extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ACMPNE() {
-    }
-
-
-    public IF_ACMPNE(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IF_ACMPNE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IF_ACMPEQ(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IF_ICMPEQ.java b/java/org/apache/tomcat/util/bcel/generic/IF_ICMPEQ.java
deleted file mode 100644 (file)
index 02227dd..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IF_ICMPEQ - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPEQ extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPEQ() {
-    }
-
-
-    public IF_ICMPEQ(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IF_ICMPEQ, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IF_ICMPNE(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IF_ICMPGE.java b/java/org/apache/tomcat/util/bcel/generic/IF_ICMPGE.java
deleted file mode 100644 (file)
index 383b940..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IF_ICMPGE - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPGE extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPGE() {
-    }
-
-
-    public IF_ICMPGE(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IF_ICMPGE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IF_ICMPLT(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IF_ICMPGT.java b/java/org/apache/tomcat/util/bcel/generic/IF_ICMPGT.java
deleted file mode 100644 (file)
index f1c817e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IF_ICMPGT - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPGT extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPGT() {
-    }
-
-
-    public IF_ICMPGT(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IF_ICMPGT, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IF_ICMPLE(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IF_ICMPLE.java b/java/org/apache/tomcat/util/bcel/generic/IF_ICMPLE.java
deleted file mode 100644 (file)
index caf7616..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IF_ICMPLE - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPLE extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPLE() {
-    }
-
-
-    public IF_ICMPLE(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IF_ICMPLE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IF_ICMPGT(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IF_ICMPLT.java b/java/org/apache/tomcat/util/bcel/generic/IF_ICMPLT.java
deleted file mode 100644 (file)
index 6ff23c0..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IF_ICMPLT - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPLT extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPLT() {
-    }
-
-
-    public IF_ICMPLT(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IF_ICMPLT, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IF_ICMPGE(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IF_ICMPNE.java b/java/org/apache/tomcat/util/bcel/generic/IF_ICMPNE.java
deleted file mode 100644 (file)
index f0a9172..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/** 
- * IF_ICMPNE - Branch if int comparison doesn't succeed
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPNE extends IfInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPNE() {
-    }
-
-
-    public IF_ICMPNE(InstructionHandle target) {
-        super(org.apache.tomcat.util.bcel.Constants.IF_ICMPNE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    public IfInstruction negate() {
-        return new IF_ICMPEQ(target);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IfInstruction.java b/java/org/apache/tomcat/util/bcel/generic/IfInstruction.java
deleted file mode 100644 (file)
index df88950..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/**
- * Super class for the IFxxx family of instructions.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class IfInstruction extends BranchInstruction implements StackConsumer {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IfInstruction() {
-    }
-
-
-    /**
-     * @param opcode opcode of instruction
-     * @param target Target instruction to branch to
-     */
-    protected IfInstruction(short opcode, InstructionHandle target) {
-        super(opcode, target);
-    }
-
-
-    /**
-     * @return negation of instruction, e.g. IFEQ.negate() == IFNE
-     */
-    public abstract IfInstruction negate();
-}
index 97ebeb8..1e9ca62 100644 (file)
@@ -27,7 +27,6 @@ import org.apache.tomcat.util.bcel.classfile.LocalVariable;
  * @version $Id$
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @see     LocalVariable
- * @see     MethodGen
  */
 public class LocalVariableGen implements InstructionTargeter, NamedAndTyped, Cloneable,
         java.io.Serializable {
diff --git a/java/org/apache/tomcat/util/bcel/generic/MethodGen.java b/java/org/apache/tomcat/util/bcel/generic/MethodGen.java
deleted file mode 100644 (file)
index d6f8599..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.tomcat.util.bcel.classfile.Attribute;
-import org.apache.tomcat.util.bcel.classfile.Code;
-import org.apache.tomcat.util.bcel.classfile.ExceptionTable;
-import org.apache.tomcat.util.bcel.classfile.LocalVariable;
-import org.apache.tomcat.util.bcel.classfile.LocalVariableTable;
-import org.apache.tomcat.util.bcel.classfile.Method;
-import org.apache.tomcat.util.bcel.classfile.Utility;
-import org.apache.tomcat.util.bcel.util.BCELComparator;
-
-/** 
- * Template class for building up a method. This is done by defining exception
- * handlers, adding thrown exceptions, local variables and attributes, whereas
- * the `LocalVariableTable' and `LineNumberTable' attributes will be set
- * automatically for the code. Use stripAttributes() if you don't like this.
- *
- * While generating code it may be necessary to insert NOP operations. You can
- * use the `removeNOPs' method to get rid off them.
- * The resulting method object can be obtained via the `getMethod()' method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @author  <A HREF="http://www.vmeng.com/beard">Patrick C. Beard</A> [setMaxStack()]
- * @see     InstructionList
- * @see     Method
- */
-public class MethodGen extends FieldGenOrMethodGen {
-
-    private Type[] arg_types;
-    private InstructionList il;
-    private List variable_vec = new ArrayList();
-    private List throws_vec = new ArrayList();
-    
-    private static BCELComparator _cmp = new BCELComparator() {
-
-        public boolean equals( Object o1, Object o2 ) {
-            MethodGen THIS = (MethodGen) o1;
-            MethodGen THAT = (MethodGen) o2;
-            return THIS.getName().equals(THAT.getName())
-                    && THIS.getSignature().equals(THAT.getSignature());
-        }
-
-
-        public int hashCode( Object o ) {
-            MethodGen THIS = (MethodGen) o;
-            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
-        }
-    };
-
-
-    /**
-     * Sort local variables by index
-     */
-    private static final void sort( LocalVariableGen[] vars, int l, int r ) {
-        int i = l, j = r;
-        int m = vars[(l + r) / 2].getIndex();
-        LocalVariableGen h;
-        do {
-            while (vars[i].getIndex() < m) {
-                i++;
-            }
-            while (m < vars[j].getIndex()) {
-                j--;
-            }
-            if (i <= j) {
-                h = vars[i];
-                vars[i] = vars[j];
-                vars[j] = h; // Swap elements
-                i++;
-                j--;
-            }
-        } while (i <= j);
-        if (l < j) {
-            sort(vars, l, j);
-        }
-        if (i < r) {
-            sort(vars, i, r);
-        }
-    }
-
-
-    /*
-     * If the range of the variable has not been set yet, it will be set to be valid from
-     * the start to the end of the instruction list.
-     * 
-     * @return array of declared local variables sorted by index
-     */
-    public LocalVariableGen[] getLocalVariables() {
-        int size = variable_vec.size();
-        LocalVariableGen[] lg = new LocalVariableGen[size];
-        variable_vec.toArray(lg);
-        for (int i = 0; i < size; i++) {
-            if (lg[i].getStart() == null) {
-                lg[i].setStart(il.getStart());
-            }
-            if (lg[i].getEnd() == null) {
-                lg[i].setEnd(il.getEnd());
-            }
-        }
-        if (size > 1) {
-            sort(lg, 0, size - 1);
-        }
-        return lg;
-    }
-
-
-    /**
-     * @return `LocalVariableTable' attribute of all the local variables of this method.
-     */
-    public LocalVariableTable getLocalVariableTable( ConstantPoolGen cp ) {
-        LocalVariableGen[] lg = getLocalVariables();
-        int size = lg.length;
-        LocalVariable[] lv = new LocalVariable[size];
-        for (int i = 0; i < size; i++) {
-            lv[i] = lg[i].getLocalVariable(cp);
-        }
-        return new LocalVariableTable(cp.addUtf8("LocalVariableTable"), 2 + lv.length * 10, lv, cp
-                .getConstantPool());
-    }
-
-
-    public String getSignature() {
-        return Type.getMethodSignature(type, arg_types);
-    }
-
-
-    /**
-     * Return string representation close to declaration format,
-     * `public static void main(String[]) throws IOException', e.g.
-     *
-     * @return String representation of the method.
-     */
-    public final String toString() {
-        String access = Utility.accessToString(access_flags);
-        String signature = Type.getMethodSignature(type, arg_types);
-        signature = Utility.methodSignatureToString(signature, name, access, true,
-                getLocalVariableTable(cp));
-        StringBuffer buf = new StringBuffer(signature);
-        for (int i = 0; i < getAttributes().length; i++) {
-            Attribute a = getAttributes()[i];
-            if (!((a instanceof Code) || (a instanceof ExceptionTable))) {
-                buf.append(" [").append(a.toString()).append("]");
-            }
-        }
-        
-        if (throws_vec.size() > 0) {
-            for (Iterator e = throws_vec.iterator(); e.hasNext();) {
-                buf.append("\n\t\tthrows ").append(e.next());
-            }
-        }
-        return buf.toString();
-    }
-
-
-    
-    
-    
-    
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default two MethodGen objects are said to be equal when
-     * their names and signatures are equal.
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals( Object obj ) {
-        return _cmp.equals(this, obj);
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default return the hashcode of the method's name XOR signature.
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return _cmp.hashCode(this);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/StackConsumer.java b/java/org/apache/tomcat/util/bcel/generic/StackConsumer.java
deleted file mode 100644 (file)
index b02cce4..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  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.apache.tomcat.util.bcel.generic;
-
-/**
- * Denote an instruction that may consume a value from the stack.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface StackConsumer {
-
-    
-}