tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r887610 [2/6] - in /tomcat/trunk/java/org/apache/tomcat/util/bcel: ./ classfile/ generic/ util/
Date Sat, 05 Dec 2009 23:22:52 GMT
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodref.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodref.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodref.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodref.java Sat Dec  5 23:22:46 2009
@@ -28,12 +28,7 @@
  */
 public final class ConstantMethodref extends ConstantCP {
 
-    /**
-     * Initialize from another object.
-     */
-    public ConstantMethodref(ConstantMethodref c) {
-        super(Constants.CONSTANT_Methodref, c.getClassIndex(), c.getNameAndTypeIndex());
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantNameAndType.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantNameAndType.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantNameAndType.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantNameAndType.java Sat Dec  5 23:22:46 2009
@@ -38,12 +38,7 @@
     private int signature_index; // and its signature.
 
 
-    /**
-     * Initialize from another object.
-     */
-    public ConstantNameAndType(ConstantNameAndType c) {
-        this(c.getNameIndex(), c.getSignatureIndex());
-    }
+    
 
 
     /**
@@ -101,11 +96,7 @@
     }
 
 
-    /** @return name
-     */
-    public final String getName( ConstantPool cp ) {
-        return cp.constantToString(getNameIndex(), Constants.CONSTANT_Utf8);
-    }
+    
 
 
     /**
@@ -116,27 +107,13 @@
     }
 
 
-    /** @return signature
-     */
-    public final String getSignature( ConstantPool cp ) {
-        return cp.constantToString(getSignatureIndex(), Constants.CONSTANT_Utf8);
-    }
+    
 
 
-    /**
-     * @param name_index the name index of this constant
-     */
-    public final void setNameIndex( int name_index ) {
-        this.name_index = name_index;
-    }
+    
 
 
-    /**
-     * @param signature_index the signature index in the constant pool of this type
-     */
-    public final void setSignatureIndex( int signature_index ) {
-        this.signature_index = signature_index;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantObject.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantObject.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantObject.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantObject.java Sat Dec  5 23:22:46 2009
@@ -26,7 +26,5 @@
  */
 public interface ConstantObject {
 
-    /** @return object representing the constant, e.g., Long for ConstantLong
-     */
-    public abstract Object getConstantValue( ConstantPool cp );
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java Sat Dec  5 23:22:46 2009
@@ -17,7 +17,6 @@
 package org.apache.tomcat.util.bcel.classfile;
 
 import java.io.DataInputStream;
-import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.Serializable;
 import org.apache.tomcat.util.bcel.Constants;
@@ -80,16 +79,7 @@
     }
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitConstantPool(this);
-    }
+    
 
 
     /**
@@ -191,20 +181,7 @@
     }
 
 
-    /** 
-     * Dump constant pool to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(constant_pool_count);
-        for (int i = 1; i < constant_pool_count; i++) {
-            if (constant_pool[i] != null) {
-                constant_pool[i].dump(file);
-            }
-        }
-    }
+    
 
 
     /**
@@ -247,13 +224,7 @@
     }
 
 
-    /**
-     * @return Array of constants.
-     * @see    Constant
-     */
-    public Constant[] getConstantPool() {
-        return constant_pool;
-    }
+    
 
 
     /**
@@ -304,12 +275,7 @@
     }
 
 
-    /**
-     * @param constant Constant to set
-     */
-    public void setConstant( int index, Constant constant ) {
-        constant_pool[index] = constant;
-    }
+    
 
 
     /**
@@ -333,21 +299,5 @@
     }
 
 
-    /**
-     * @return deep copy of this constant pool
-     */
-    public ConstantPool copy() {
-        ConstantPool c = null;
-        try {
-            c = (ConstantPool) clone();
-            c.constant_pool = new Constant[constant_pool_count];
-            for (int i = 1; i < constant_pool_count; i++) {
-                if (constant_pool[i] != null) {
-                    c.constant_pool[i] = constant_pool[i].copy();
-                }
-            }
-        } catch (CloneNotSupportedException e) {
-        }
-        return c;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantString.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantString.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantString.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantString.java Sat Dec  5 23:22:46 2009
@@ -36,12 +36,7 @@
     private int string_index; // Identical to ConstantClass except for this name
 
 
-    /**
-     * Initialize from another object.
-     */
-    public ConstantString(ConstantString c) {
-        this(c.getStringIndex());
-    }
+    
 
 
     /** 
@@ -96,12 +91,7 @@
     }
 
 
-    /**
-     * @param string_index the index into the constant of the string value
-     */
-    public final void setStringIndex( int string_index ) {
-        this.string_index = string_index;
-    }
+    
 
 
     /**
@@ -112,17 +102,8 @@
     }
 
 
-    /** @return String object
-     */
-    public Object getConstantValue( ConstantPool cp ) {
-        Constant c = cp.getConstant(string_index, Constants.CONSTANT_Utf8);
-        return ((ConstantUtf8) c).getBytes();
-    }
+    
 
 
-    /** @return dereferenced string
-     */
-    public String getBytes( ConstantPool cp ) {
-        return (String) getConstantValue(cp);
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java Sat Dec  5 23:22:46 2009
@@ -36,12 +36,7 @@
     private String bytes;
 
 
-    /**
-     * Initialize from another object.
-     */
-    public ConstantUtf8(ConstantUtf8 c) {
-        this(c.getBytes());
-    }
+    
 
 
     /**
@@ -100,12 +95,7 @@
     }
 
 
-    /**
-     * @param bytes the raw bytes of this Utf-8
-     */
-    public final void setBytes( String bytes ) {
-        this.bytes = bytes;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java Sat Dec  5 23:22:46 2009
@@ -36,13 +36,7 @@
     private int constantvalue_index;
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public ConstantValue(ConstantValue c) {
-        this(c.getNameIndex(), c.getLength(), c.getConstantValueIndex(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -96,20 +90,10 @@
     }
 
 
-    /**
-     * @return Index in constant pool of constant value.
-     */
-    public final int getConstantValueIndex() {
-        return constantvalue_index;
-    }
+    
 
 
-    /**
-     * @param constantvalue_index the index info the constant pool of this constant value
-     */
-    public final void setConstantValueIndex( int constantvalue_index ) {
-        this.constantvalue_index = constantvalue_index;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java Sat Dec  5 23:22:46 2009
@@ -35,13 +35,7 @@
     private byte[] bytes;
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Deprecated(Deprecated c) {
-        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -101,20 +95,10 @@
     }
 
 
-    /**
-     * @return data bytes.
-     */
-    public final byte[] getBytes() {
-        return bytes;
-    }
+    
 
 
-    /**
-     * @param bytes the raw bytes that represents this byte array
-     */
-    public final void setBytes( byte[] bytes ) {
-        this.bytes = bytes;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java Sat Dec  5 23:22:46 2009
@@ -133,10 +133,5 @@
 		}
 	}
 
-	public String toShortString()
-	{
-		StringBuffer result = new StringBuffer();
-		result.append(stringifyValue());
-		return result.toString();
-	}
+	
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java Sat Dec  5 23:22:46 2009
@@ -60,13 +60,7 @@
 		return elementNameIndex;
 	}
 
-	public String toShortString()
-	{
-		StringBuffer result = new StringBuffer();
-		result.append(getNameString()).append("=").append(
-				getValue().toShortString());
-		return result.toString();
-	}
+	
 	
 	protected void dump(DataOutputStream dos) throws IOException {
 		dos.writeShort(elementNameIndex); // u2 name of the element

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java Sat Dec  5 23:22:46 2009
@@ -59,25 +59,15 @@
 		// return (EnclosingMethod)clone();
 	}
 	
-	// Accessors
-	public final int getEnclosingClassIndex() { return classIndex; }  
-	public final int getEnclosingMethodIndex(){ return methodIndex;}
+	  
+	
+	
+	
 	
-	public final void setEnclosingClassIndex(int idx) {classIndex = idx;}
-	public final void setEnclosingMethodIndex(int idx){methodIndex= idx;}
 
-	public final ConstantClass getEnclosingClass() {
-		ConstantClass c = 
-			(ConstantClass)constant_pool.getConstant(classIndex,Constants.CONSTANT_Class);
-		return c;
-	}
 	
-	public final ConstantNameAndType getEnclosingMethod() {
-		if (methodIndex == 0) return null;
-		ConstantNameAndType nat = 
-			(ConstantNameAndType)constant_pool.getConstant(methodIndex,Constants.CONSTANT_NameAndType);
-		return nat;
-	}
+	
+	
 
     public final void dump(DataOutputStream file) throws IOException {
 	    super.dump(file);

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java Sat Dec  5 23:22:46 2009
@@ -39,13 +39,7 @@
     private int[] exception_index_table; // constant pool
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public ExceptionTable(ExceptionTable c) {
-        this(c.getNameIndex(), c.getLength(), c.getExceptionIndexTable(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -107,33 +101,13 @@
     }
 
 
-    /**
-     * @return Array of indices into constant pool of thrown exceptions.
-     */
-    public final int[] getExceptionIndexTable() {
-        return exception_index_table;
-    }
+    
 
 
-    /**
-     * @return Length of exception table.
-     */
-    public final int getNumberOfExceptions() {
-        return number_of_exceptions;
-    }
+    
 
 
-    /**
-     * @return class names of thrown exceptions
-     */
-    public final String[] getExceptionNames() {
-        String[] names = new String[number_of_exceptions];
-        for (int i = 0; i < number_of_exceptions; i++) {
-            names[i] = constant_pool.getConstantString(exception_index_table[i],
-                    Constants.CONSTANT_Class).replace('/', '.');
-        }
-        return names;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Field.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Field.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Field.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Field.java Sat Dec  5 23:22:46 2009
@@ -19,7 +19,6 @@
 import java.io.DataInputStream;
 import java.io.IOException;
 import org.apache.tomcat.util.bcel.Constants;
-import org.apache.tomcat.util.bcel.generic.Type;
 import org.apache.tomcat.util.bcel.util.BCELComparator;
 
 /**
@@ -48,13 +47,7 @@
     };
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Field(Field c) {
-        super(c);
-    }
+    
 
 
     /**
@@ -67,29 +60,10 @@
     }
 
 
-    /**
-     * @param access_flags Access rights of field
-     * @param name_index Points to field name in constant pool
-     * @param signature_index Points to encoded signature
-     * @param attributes Collection of attributes
-     * @param constant_pool Array of constants
-     */
-    public Field(int access_flags, int name_index, int signature_index, Attribute[] attributes,
-            ConstantPool constant_pool) {
-        super(access_flags, name_index, signature_index, attributes, constant_pool);
-    }
+    
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitField(this);
-    }
+    
 
 
     /**
@@ -134,36 +108,16 @@
     }
 
 
-    /**
-     * @return deep copy of this field
-     */
-    public final Field copy( ConstantPool _constant_pool ) {
-        return (Field) copy_(_constant_pool);
-    }
+    
 
 
-    /**
-     * @return type of field
-     */
-    public Type getType() {
-        return Type.getReturnType(getSignature());
-    }
+    
 
 
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
+    
 
 
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java Sat Dec  5 23:22:46 2009
@@ -17,13 +17,9 @@
 package org.apache.tomcat.util.bcel.classfile;
 
 import java.io.DataInputStream;
-import java.io.DataOutputStream;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 import org.apache.tomcat.util.bcel.Constants;
 import org.apache.tomcat.util.bcel.classfile.Attribute;
-import org.apache.tomcat.util.bcel.classfile.Signature;
 
 /** 
  * Abstract super class for fields and methods.
@@ -37,7 +33,7 @@
     protected int signature_index; // Points to encoded signature
     protected int attributes_count; // No. of attributes
     protected Attribute[] attributes; // Collection of attributes
-    protected AnnotationEntry[] annotationEntries; // annotations defined on the field or method 
+    
     protected ConstantPool constant_pool;
 
     private String signatureAttributeString = null;
@@ -51,14 +47,7 @@
     }
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    protected FieldOrMethod(FieldOrMethod c) {
-        this(c.getAccessFlags(), c.getNameIndex(), c.getSignatureIndex(), c.getAttributes(), c
-                .getConstantPool());
-    }
+    
 
 
     /**
@@ -96,29 +85,10 @@
     }
 
 
-    /**
-     * Dump object to file stream on binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(access_flags);
-        file.writeShort(name_index);
-        file.writeShort(signature_index);
-        file.writeShort(attributes_count);
-        for (int i = 0; i < attributes_count; i++) {
-            attributes[i].dump(file);
-        }
-    }
+    
 
 
-    /**
-     * @return Collection of object attributes.
-     */
-    public final Attribute[] getAttributes() {
-        return attributes;
-    }
+    
 
 
     /**
@@ -130,52 +100,22 @@
     }
 
 
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
+    
 
 
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
+    
 
 
-    /**
-     * @return Index in constant pool of object's name.
-     */
-    public final int getNameIndex() {
-        return name_index;
-    }
+    
 
 
-    /**
-     * @param name_index Index in constant pool of object's name.
-     */
-    public final void setNameIndex( int name_index ) {
-        this.name_index = name_index;
-    }
+    
 
 
-    /**
-     * @return Index in constant pool of field signature.
-     */
-    public final int getSignatureIndex() {
-        return signature_index;
-    }
+    
 
 
-    /**
-     * @param signature_index Index in constant pool of field signature.
-     */
-    public final void setSignatureIndex( int signature_index ) {
-        this.signature_index = signature_index;
-    }
+    
 
 
     /**
@@ -198,93 +138,11 @@
     }
 
 
-    /**
-     * @return deep copy of this field
-     */
-    protected FieldOrMethod copy_( ConstantPool _constant_pool ) {
-    	FieldOrMethod c = null;
-
-        try {
-          c = (FieldOrMethod)clone();
-        } catch(CloneNotSupportedException e) {}
+    
 
-        c.constant_pool    = constant_pool;
-        c.attributes       = new Attribute[attributes_count];
+	
 
-        for(int i=0; i < attributes_count; i++)
-          c.attributes[i] = attributes[i].copy(constant_pool);
+	
 
-        return c;
-    }
-    
-    /**
-	 * Ensure we have unpacked any attributes that contain annotations.
-	 * We don't remove these annotation attributes from the attributes list, they
-	 * remain there.
-	 */
-	private void ensureAnnotationsUpToDate()
-	{
-		if (annotationsOutOfDate)
-		{
-			// Find attributes that contain annotation data
-			Attribute[] attrs = getAttributes();
-			List accumulatedAnnotations = new ArrayList();
-			for (int i = 0; i < attrs.length; i++)
-			{
-				Attribute attribute = attrs[i];
-				if (attribute instanceof Annotations)
-				{
-					Annotations annotations = (Annotations) attribute;
-					for (int j = 0; j < annotations.getAnnotationEntries().length; j++)
-					{
-						accumulatedAnnotations.add(annotations
-								.getAnnotationEntries()[j]);
-					}
-				}
-			}
-			annotationEntries = (AnnotationEntry[]) accumulatedAnnotations
-					.toArray(new AnnotationEntry[accumulatedAnnotations.size()]);
-			annotationsOutOfDate = false;
-		}
-	}
-
-	public AnnotationEntry[] getAnnotationEntries()
-	{
-		ensureAnnotationsUpToDate();
-		return annotationEntries;
-	}
-
-	public void addAnnotationEntry(AnnotationEntry a)
-	{
-		ensureAnnotationsUpToDate();
-		int len = annotationEntries.length;
-		AnnotationEntry[] newAnnotations = new AnnotationEntry[len + 1];
-		System.arraycopy(annotationEntries, 0, newAnnotations, 0, len);
-		newAnnotations[len] = a;
-		annotationEntries = newAnnotations;
-	}
-
-	/**
-	 * Hunts for a signature attribute on the member and returns its contents.  So where the 'regular' signature
-	 * may be (Ljava/util/Vector;)V the signature attribute may in fact say 'Ljava/lang/Vector<Ljava/lang/String>;'
-	 * Coded for performance - searches for the attribute only when requested - only searches for it once.
-	 */
-	public final String getGenericSignature()
-	{
-		if (!searchedForSignatureAttribute)
-		{
-			boolean found = false;
-			for (int i = 0; !found && i < attributes_count; i++)
-			{
-				if (attributes[i] instanceof Signature)
-				{
-					signatureAttributeString = ((Signature) attributes[i])
-							.getSignature();
-					found = true;
-				}
-			}
-			searchedForSignatureAttribute = true;
-		}
-		return signatureAttributeString;
-	}
+	
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java Sat Dec  5 23:22:46 2009
@@ -40,13 +40,7 @@
     private int inner_access_flags;
 
 
-    /**
-     * Initialize from another object.
-     */
-    public InnerClass(InnerClass c) {
-        this(c.getInnerClassIndex(), c.getOuterClassIndex(), c.getInnerNameIndex(), c
-                .getInnerAccessFlags());
-    }
+    
 
 
     /**
@@ -75,16 +69,7 @@
     }
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitInnerClass(this);
-    }
+    
 
 
     /**
@@ -101,68 +86,28 @@
     }
 
 
-    /**
-     * @return access flags of inner class.
-     */
-    public final int getInnerAccessFlags() {
-        return inner_access_flags;
-    }
+    
 
 
-    /**
-     * @return class index of inner class.
-     */
-    public final int getInnerClassIndex() {
-        return inner_class_index;
-    }
+    
 
 
-    /**
-     * @return name index of inner class.
-     */
-    public final int getInnerNameIndex() {
-        return inner_name_index;
-    }
+    
 
 
-    /**
-     * @return class index of outer class.
-     */
-    public final int getOuterClassIndex() {
-        return outer_class_index;
-    }
+    
 
 
-    /**
-     * @param inner_access_flags access flags for this inner class
-     */
-    public final void setInnerAccessFlags( int inner_access_flags ) {
-        this.inner_access_flags = inner_access_flags;
-    }
+    
 
 
-    /**
-     * @param inner_class_index index into the constant pool for this class
-     */
-    public final void setInnerClassIndex( int inner_class_index ) {
-        this.inner_class_index = inner_class_index;
-    }
+    
 
 
-    /**
-     * @param inner_name_index index into the constant pool for this class's name
-     */
-    public final void setInnerNameIndex( int inner_name_index ) {
-        this.inner_name_index = inner_name_index;
-    }
+    
 
 
-    /**
-     * @param outer_class_index index into the constant pool for the owning class
-     */
-    public final void setOuterClassIndex( int outer_class_index ) {
-        this.outer_class_index = outer_class_index;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java Sat Dec  5 23:22:46 2009
@@ -37,13 +37,7 @@
     private int number_of_classes;
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public InnerClasses(InnerClasses c) {
-        this(c.getNameIndex(), c.getLength(), c.getInnerClasses(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -106,12 +100,7 @@
     }
 
 
-    /**
-     * @return array of inner class "records"
-     */
-    public final InnerClass[] getInnerClasses() {
-        return inner_classes;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java Sat Dec  5 23:22:46 2009
@@ -16,19 +16,12 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 import java.util.StringTokenizer;
 import java.util.TreeSet;
 import org.apache.tomcat.util.bcel.Constants;
-import org.apache.tomcat.util.bcel.generic.Type;
 import org.apache.tomcat.util.bcel.util.BCELComparator;
 import org.apache.tomcat.util.bcel.util.ClassQueue;
 import org.apache.tomcat.util.bcel.util.SyntheticRepository;
@@ -69,8 +62,8 @@
     public static final byte HEAP = 1;
     public static final byte FILE = 2;
     public static final byte ZIP = 3;
-    static boolean debug = false; // Debugging on/off
-    static char sep = '/'; // directory separator
+    
+    
     
     //  Annotations are collected from certain attributes, don't do it more than necessary!
     private boolean annotationsOutOfDate = true;
@@ -179,153 +172,28 @@
     }
 
 
-    /**
-     * Constructor gets all contents as arguments.
-     *
-     * @param class_name_index Class name
-     * @param superclass_name_index Superclass name
-     * @param file_name File name
-     * @param major Major compiler version
-     * @param minor Minor compiler version
-     * @param access_flags Access rights defined by bit flags
-     * @param constant_pool Array of constants
-     * @param interfaces Implemented interfaces
-     * @param fields Class fields
-     * @param methods Class methods
-     * @param attributes Class attributes
-     */
-    public JavaClass(int class_name_index, int superclass_name_index, String file_name, int major,
-            int minor, int access_flags, ConstantPool constant_pool, int[] interfaces,
-            Field[] fields, Method[] methods, Attribute[] attributes) {
-        this(class_name_index, superclass_name_index, file_name, major, minor, access_flags,
-                constant_pool, interfaces, fields, methods, attributes, HEAP);
-    }
+    
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitJavaClass(this);
-    }
+    
 
 
-    /* Print debug information depending on `JavaClass.debug'
-     */
-    static final void Debug( String str ) {
-        if (debug) {
-            System.out.println(str);
-        }
-    }
+    
 
 
-    /** 
-     * Dump class to a file.
-     *
-     * @param file Output file
-     * @throws IOException
-     */
-    public void dump( File file ) throws IOException {
-        String parent = file.getParent();
-        if (parent != null) {
-            File dir = new File(parent);
-            dir.mkdirs();
-        }
-        DataOutputStream dos = null;
-        try {
-            dos = new DataOutputStream(new FileOutputStream(file));
-            dump(dos);
-        } finally {
-            if (dos != null) {
-                dos.close();
-            }
-        }
-    }
+    
 
 
-    /** 
-     * Dump class to a file named file_name.
-     *
-     * @param _file_name Output file name
-     * @exception IOException
-     */
-    public void dump( String _file_name ) throws IOException {
-        dump(new File(_file_name));
-    }
+    
 
 
-    /**
-     * @return class in binary format
-     */
-    public byte[] getBytes() {
-        ByteArrayOutputStream s = new ByteArrayOutputStream();
-        DataOutputStream ds = new DataOutputStream(s);
-        try {
-            dump(ds);
-        } catch (IOException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                ds.close();
-            } catch (IOException e2) {
-                e2.printStackTrace();
-            }
-        }
-        return s.toByteArray();
-    }
+    
 
 
-    /**
-     * Dump Java class to output stream in binary format.
-     *
-     * @param file Output stream
-     * @exception IOException
-     */
-    public void dump( OutputStream file ) throws IOException {
-        dump(new DataOutputStream(file));
-    }
+    
 
 
-    /**
-     * Dump Java class to output stream in binary format.
-     *
-     * @param file Output stream
-     * @exception IOException
-     */
-    public void dump( DataOutputStream file ) throws IOException {
-        file.writeInt(0xcafebabe);
-        file.writeShort(minor);
-        file.writeShort(major);
-        constant_pool.dump(file);
-        file.writeShort(access_flags);
-        file.writeShort(class_name_index);
-        file.writeShort(superclass_name_index);
-        file.writeShort(interfaces.length);
-        for (int i = 0; i < interfaces.length; i++) {
-            file.writeShort(interfaces[i]);
-        }
-        file.writeShort(fields.length);
-        for (int i = 0; i < fields.length; i++) {
-            fields[i].dump(file);
-        }
-        file.writeShort(methods.length);
-        for (int i = 0; i < methods.length; i++) {
-            methods[i].dump(file);
-        }
-        if (attributes != null) {
-            file.writeShort(attributes.length);
-            for (int i = 0; i < attributes.length; i++) {
-                attributes[i].dump(file);
-            }
-        } else {
-            file.writeShort(0);
-        }
-        file.flush();
-    }
+    
 
 
     /**
@@ -361,46 +229,19 @@
     }
 
 
-    /**
-     * @return Package name.
-     */
-    public String getPackageName() {
-        return package_name;
-    }
+    
 
 
-    /**
-     * @return Class name index.
-     */
-    public int getClassNameIndex() {
-        return class_name_index;
-    }
+    
 
 
-    /**
-     * @return Constant pool.
-     */
-    public ConstantPool getConstantPool() {
-        return constant_pool;
-    }
+    
 
 
-    /**
-     * @return Fields, i.e., variables of the class. Like the JVM spec
-     * mandates for the classfile format, these fields are those specific to
-     * this class, and not those of the superclass or superinterfaces.
-     */
-    public Field[] getFields() {
-        return fields;
-    }
+    
 
 
-    /**
-     * @return File name of class, aka SourceFile attribute value
-     */
-    public String getFileName() {
-        return file_name;
-    }
+    
 
 
     /**
@@ -411,60 +252,22 @@
     }
 
 
-    /**
-     * @return Indices in constant pool of implemented interfaces.
-     */
-    public int[] getInterfaceIndices() {
-        return interfaces;
-    }
+    
 
 
-    /**
-     * @return Major number of class file version.
-     */
-    public int getMajor() {
-        return major;
-    }
+    
 
 
-    /**
-     * @return Methods of the class.
-     */
-    public Method[] getMethods() {
-        return methods;
-    }
+    
 
 
-    /**
-     * @return A org.apache.tomcat.util.bcel.classfile.Method corresponding to
-     * java.lang.reflect.Method if any
-     */
-    public Method getMethod( java.lang.reflect.Method m ) {
-        for (int i = 0; i < methods.length; i++) {
-            Method method = methods[i];
-            if (m.getName().equals(method.getName()) && (m.getModifiers() == method.getModifiers())
-                    && Type.getSignature(m).equals(method.getSignature())) {
-                return method;
-            }
-        }
-        return null;
-    }
+    
 
 
-    /**
-     * @return Minor number of class file version.
-     */
-    public int getMinor() {
-        return minor;
-    }
+    
 
 
-    /**
-     * @return sbsolute path to file where this class was read from
-     */
-    public String getSourceFileName() {
-        return source_file_name;
-    }
+    
 
 
     /**
@@ -476,139 +279,6 @@
 
 
     /**
-     * @return Class name index.
-     */
-    public int getSuperclassNameIndex() {
-        return superclass_name_index;
-    }
-
-    static {
-        // Debugging ... on/off
-        debug = Boolean.getBoolean("JavaClass.debug");
-        // Get path separator either / or \ usually
-        String _sep = System.getProperty("file.separator");
-        if (_sep != null) {
-            try {
-                JavaClass.sep = _sep.charAt(0);
-            } catch (StringIndexOutOfBoundsException e) {
-            } // Never reached
-        }
-    }
-
-
-    /**
-     * @param attributes .
-     */
-    public void setAttributes( Attribute[] attributes ) {
-        this.attributes = attributes;
-    }
-
-
-    /**
-     * @param class_name .
-     */
-    public void setClassName( String class_name ) {
-        this.class_name = class_name;
-    }
-
-
-    /**
-     * @param class_name_index .
-     */
-    public void setClassNameIndex( int class_name_index ) {
-        this.class_name_index = class_name_index;
-    }
-
-
-    /**
-     * @param constant_pool .
-     */
-    public void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * @param fields .
-     */
-    public void setFields( Field[] fields ) {
-        this.fields = fields;
-    }
-
-
-    /**
-     * Set File name of class, aka SourceFile attribute value
-     */
-    public void setFileName( String file_name ) {
-        this.file_name = file_name;
-    }
-
-
-    /**
-     * @param interface_names .
-     */
-    public void setInterfaceNames( String[] interface_names ) {
-        this.interface_names = interface_names;
-    }
-
-
-    /**
-     * @param interfaces .
-     */
-    public void setInterfaces( int[] interfaces ) {
-        this.interfaces = interfaces;
-    }
-
-
-    /**
-     * @param major .
-     */
-    public void setMajor( int major ) {
-        this.major = major;
-    }
-
-
-    /**
-     * @param methods .
-     */
-    public void setMethods( Method[] methods ) {
-        this.methods = methods;
-    }
-
-
-    /**
-     * @param minor .
-     */
-    public void setMinor( int minor ) {
-        this.minor = minor;
-    }
-
-
-    /**
-     * Set absolute path to file this class was read from.
-     */
-    public void setSourceFileName( String source_file_name ) {
-        this.source_file_name = source_file_name;
-    }
-
-
-    /**
-     * @param superclass_name .
-     */
-    public void setSuperclassName( String superclass_name ) {
-        this.superclass_name = superclass_name;
-    }
-
-
-    /**
-     * @param superclass_name_index .
-     */
-    public void setSuperclassNameIndex( int superclass_name_index ) {
-        this.superclass_name_index = superclass_name_index;
-    }
-
-
-    /**
      * @return String representing class contents.
      */
     public String toString() {
@@ -673,32 +343,7 @@
     }
 
 
-    /**
-     * @return deep copy of this class
-     */
-    public JavaClass copy() {
-        JavaClass c = null;
-        try {
-            c = (JavaClass) clone();
-            c.constant_pool = constant_pool.copy();
-            c.interfaces = (int[]) interfaces.clone();
-            c.interface_names = (String[]) interface_names.clone();
-            c.fields = new Field[fields.length];
-            for (int i = 0; i < fields.length; i++) {
-                c.fields[i] = fields[i].copy(c.constant_pool);
-            }
-            c.methods = new Method[methods.length];
-            for (int i = 0; i < methods.length; i++) {
-                c.methods[i] = methods[i].copy(c.constant_pool);
-            }
-            c.attributes = new Attribute[attributes.length];
-            for (int i = 0; i < attributes.length; i++) {
-                c.attributes[i] = attributes[i].copy(c.constant_pool);
-            }
-        } catch (CloneNotSupportedException e) {
-        }
-        return c;
-    }
+    
 
 
     public final boolean isSuper() {
@@ -706,63 +351,12 @@
     }
 
 
-    public final boolean isClass() {
-        return (access_flags & Constants.ACC_INTERFACE) == 0;
-    }
     
-    public final boolean isAnonymous() {
-  	  computeNestedTypeStatus();
-  	  return this.isAnonymous;
-    }
     
-    public final boolean isNested() {
-  	  computeNestedTypeStatus();
-  	  return this.isNested;
-    }
     
-    private final void computeNestedTypeStatus() {
-  	  if (computedNestedTypeStatus) return;
-  	  for (int i = 0; i < this.attributes.length; i++) {
-  			if (this.attributes[i] instanceof InnerClasses) {
-  				InnerClass[] innerClasses = ((InnerClasses) this.attributes[i]).getInnerClasses();
-  				for (int j = 0; j < innerClasses.length; j++) {
-  					boolean innerClassAttributeRefersToMe = false;
-  					String inner_class_name = constant_pool.getConstantString(innerClasses[j].getInnerClassIndex(),
-  						       Constants.CONSTANT_Class);
-  					inner_class_name = Utility.compactClassName(inner_class_name);
-  					if (inner_class_name.equals(getClassName())) {
-  						innerClassAttributeRefersToMe = true;
-  					}
-  					if (innerClassAttributeRefersToMe) {
-  						this.isNested = true;
-  						if (innerClasses[j].getInnerNameIndex() == 0) {
-  							this.isAnonymous = true;
-  						}
-  					}
-  				}
-  			}
-  	  }
-  	  this.computedNestedTypeStatus = true;
-    }
-
-
-    /** @return returns either HEAP (generated), FILE, or ZIP
-     */
-    public final byte getSource() {
-        return source;
-    }
-
-
-    /********************* New repository functionality *********************/
-    /**
-     * Gets the ClassRepository which holds its definition. By default
-     * this is the same as SyntheticRepository.getInstance();
-     */
-    public org.apache.tomcat.util.bcel.util.Repository getRepository() {
-        return repository;
-    }
-
-
+    
+    
+    
     /**
      * Sets the ClassRepository which loaded the JavaClass.
      * Should be called immediately after parsing is done.
@@ -884,20 +478,10 @@
     }
 
 
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
+    
 
 
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java Sat Dec  5 23:22:46 2009
@@ -36,12 +36,7 @@
     private int line_number; // number in source file
 
 
-    /**
-     * Initialize from another object.
-     */
-    public LineNumber(LineNumber c) {
-        this(c.getStartPC(), c.getLineNumber());
-    }
+    
 
 
     /**
@@ -64,16 +59,7 @@
     }
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitLineNumber(this);
-    }
+    
 
 
     /**
@@ -88,36 +74,16 @@
     }
 
 
-    /**
-     * @return Corresponding source line
-     */
-    public final int getLineNumber() {
-        return line_number;
-    }
+    
 
 
-    /**
-     * @return PC in code
-     */
-    public final int getStartPC() {
-        return start_pc;
-    }
+    
 
 
-    /**
-     * @param line_number the source line number
-     */
-    public final void setLineNumber( int line_number ) {
-        this.line_number = line_number;
-    }
+    
 
 
-    /**
-     * @param start_pc the pc for this line number
-     */
-    public final void setStartPC( int start_pc ) {
-        this.start_pc = start_pc;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java Sat Dec  5 23:22:46 2009
@@ -37,13 +37,7 @@
     private LineNumber[] line_number_table; // Table of line/numbers pairs
 
 
-    /*
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public LineNumberTable(LineNumberTable c) {
-        this(c.getNameIndex(), c.getLength(), c.getLineNumberTable(), c.getConstantPool());
-    }
+    
 
 
     /*
@@ -105,12 +99,7 @@
     }
 
 
-    /**
-     * @return Array of (pc offset, line number) pairs.
-     */
-    public final LineNumber[] getLineNumberTable() {
-        return line_number_table;
-    }
+    
 
 
     /**
@@ -145,47 +134,7 @@
     }
 
 
-    /**
-     * Map byte code positions to source code lines.
-     *
-     * @param pos byte code offset
-     * @return corresponding line in source code
-     */
-    public int getSourceLine( int pos ) {
-        int l = 0, r = line_number_table_length - 1;
-        if (r < 0) {
-            return -1;
-        }
-        int min_index = -1, min = -1;
-        /* Do a binary search since the array is ordered.
-         */
-        do {
-            int i = (l + r) / 2;
-            int j = line_number_table[i].getStartPC();
-            if (j == pos) {
-                return line_number_table[i].getLineNumber();
-            } else if (pos < j) {
-                r = i - 1;
-            } else {
-                l = i + 1;
-            }
-            /* If exact match can't be found (which is the most common case)
-             * return the line number that corresponds to the greatest index less
-             * than pos.
-             */
-            if (j < pos && j > min) {
-                min = j;
-                min_index = i;
-            }
-        } while (l <= r);
-        /* It's possible that we did not find any valid entry for the bytecode
-         * offset we were looking for.
-         */
-        if (min_index < 0) {
-            return -1;
-        }
-        return line_number_table[min_index].getLineNumber();
-    }
+    
 
 
     /**
@@ -202,7 +151,5 @@
     }
 
 
-    public final int getTableLength() {
-        return line_number_table_length;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java Sat Dec  5 23:22:46 2009
@@ -43,14 +43,7 @@
     private ConstantPool constant_pool;
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public LocalVariable(LocalVariable c) {
-        this(c.getStartPC(), c.getLength(), c.getNameIndex(), c.getSignatureIndex(), c.getIndex(),
-                c.getConstantPool());
-    }
+    
 
 
     /**
@@ -83,16 +76,7 @@
     }
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitLocalVariable(this);
-    }
+    
 
 
     /**
@@ -110,20 +94,10 @@
     }
 
 
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
+    
 
 
-    /**
-     * @return Variable is valid within getStartPC() .. getStartPC()+getLength()
-     */
-    public final int getLength() {
-        return length;
-    }
+    
 
 
     /**
@@ -136,12 +110,7 @@
     }
 
 
-    /**
-     * @return Index in constant pool of variable name.
-     */
-    public final int getNameIndex() {
-        return name_index;
-    }
+    
 
 
     /**
@@ -154,12 +123,7 @@
     }
 
 
-    /**
-     * @return Index in constant pool of variable signature.
-     */
-    public final int getSignatureIndex() {
-        return signature_index;
-    }
+    
 
 
     /**
@@ -170,60 +134,25 @@
     }
 
 
-    /**
-     * @return Start of range where he variable is valid
-     */
-    public final int getStartPC() {
-        return start_pc;
-    }
+    
 
 
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
+    
 
 
-    /**
-     * @param length the length of this local variable
-     */
-    public final void setLength( int length ) {
-        this.length = length;
-    }
+    
 
 
-    /**
-     * @param name_index the index into the constant pool for the name of this variable
-     */
-    public final void setNameIndex( int name_index ) {
-        this.name_index = name_index;
-    }
+    
 
 
-    /**
-     * @param signature_index the index into the constant pool for the signature of this variable
-     */
-    public final void setSignatureIndex( int signature_index ) {
-        this.signature_index = signature_index;
-    }
+    
 
 
-    /**
-     * @param index the index in the local variable table of this variable
-     */
-    public final void setIndex( int index ) {
-        this.index = index;
-    }
+    
 
 
-    /**
-     * @param start_pc Specify range where the local variable is valid.
-     */
-    public final void setStartPC( int start_pc ) {
-        this.start_pc = start_pc;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java Sat Dec  5 23:22:46 2009
@@ -36,13 +36,7 @@
     private LocalVariable[] local_variable_table; // variables
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public LocalVariableTable(LocalVariableTable c) {
-        this(c.getNameIndex(), c.getLength(), c.getLocalVariableTable(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -104,12 +98,7 @@
     }
 
 
-    /**
-     * @return Array of local variables of method.
-     */
-    public final LocalVariable[] getLocalVariableTable() {
-        return local_variable_table;
-    }
+    
 
 
     /** 
@@ -132,26 +121,7 @@
     }
 
 
-    /** 
-     * @return matching variable using index when variable is used at supplied pc
-     * 
-     * @param index the variable slot
-     * @param pc the current pc that this variable is alive
-     * 
-     * @return the LocalVariable that matches or null if not found
-     */
-    public final LocalVariable getLocalVariable( int index, int pc ) {
-        for (int i = 0; i < local_variable_table_length; i++) {
-            if (local_variable_table[i].getIndex() == index) {
-                int start_pc = local_variable_table[i].getStartPC();
-                int end_pc = start_pc + local_variable_table[i].getLength();
-                if ((pc >= start_pc) && (pc <= end_pc)) {
-                    return local_variable_table[i];
-                }
-            }
-        }
-        return null;
-    }
+    
 
 
     public final void setLocalVariableTable( LocalVariable[] local_variable_table ) {
@@ -191,7 +161,5 @@
     }
 
 
-    public final int getTableLength() {
-        return local_variable_table_length;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java Sat Dec  5 23:22:46 2009
@@ -48,10 +48,7 @@
   private int             local_variable_type_table_length; // Table of local
   private LocalVariable[] local_variable_type_table;        // variables
 
-  public LocalVariableTypeTable(LocalVariableTypeTable c) {
-    this(c.getNameIndex(), c.getLength(), c.getLocalVariableTypeTable(),
-	 c.getConstantPool());
-  }
+  
 
   public LocalVariableTypeTable(int name_index, int length,
 			    LocalVariable[] local_variable_table,
@@ -83,17 +80,9 @@
       local_variable_type_table[i].dump(file);
   }
 
-  public final LocalVariable[] getLocalVariableTypeTable() {
-    return local_variable_type_table;
-  }    
+      
 
-  public final LocalVariable getLocalVariable(int index) {
-    for(int i=0; i < local_variable_type_table_length; i++)
-      if(local_variable_type_table[i].getIndex() == index)
-	return local_variable_type_table[i];
-
-    return null;
-  }
+  
 
   public final void setLocalVariableTable(LocalVariable[] local_variable_table)
   {
@@ -131,5 +120,5 @@
     return c;
   }
 
-  public final int getTableLength() { return local_variable_type_table_length; }
+  
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Method.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Method.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Method.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Method.java Sat Dec  5 23:22:46 2009
@@ -19,7 +19,6 @@
 import java.io.DataInputStream;
 import java.io.IOException;
 import org.apache.tomcat.util.bcel.Constants;
-import org.apache.tomcat.util.bcel.generic.Type;
 import org.apache.tomcat.util.bcel.util.BCELComparator;
 
 /**
@@ -57,13 +56,7 @@
     }
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Method(Method c) {
-        super(c);
-    }
+    
 
 
     /**
@@ -78,29 +71,10 @@
     }
 
 
-    /**
-     * @param access_flags Access rights of method
-     * @param name_index Points to field name in constant pool
-     * @param signature_index Points to encoded signature
-     * @param attributes Collection of attributes
-     * @param constant_pool Array of constants
-     */
-    public Method(int access_flags, int name_index, int signature_index, Attribute[] attributes,
-            ConstantPool constant_pool) {
-        super(access_flags, name_index, signature_index, attributes, constant_pool);
-    }
+    
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitMethod(this);
-    }
+    
 
 
     /**
@@ -142,16 +116,7 @@
     }
 
 
-    /** @return LineNumberTable of code attribute if any, i.e. the call is forwarded
-     * to the Code atribute.
-     */
-    public final LineNumberTable getLineNumberTable() {
-        Code code = getCode();
-        if (code == null) {
-            return null;
-        }
-        return code.getLineNumberTable();
-    }
+    
 
 
     /**
@@ -190,44 +155,19 @@
     }
 
 
-    /**
-     * @return deep copy of this method
-     */
-    public final Method copy( ConstantPool _constant_pool ) {
-        return (Method) copy_(_constant_pool);
-    }
+    
 
 
-    /**
-     * @return return type of method
-     */
-    public Type getReturnType() {
-        return Type.getReturnType(getSignature());
-    }
+    
 
 
-    /**
-     * @return array of method argument types
-     */
-    public Type[] getArgumentTypes() {
-        return Type.getArgumentTypes(getSignature());
-    }
+    
 
 
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
+    
 
 
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Node.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Node.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Node.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Node.java Sat Dec  5 23:22:46 2009
@@ -24,5 +24,5 @@
  */
 public interface Node {
 
-    public void accept( Visitor obj );
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java Sat Dec  5 23:22:46 2009
@@ -35,14 +35,7 @@
     private int pmg_class_index, pmg_index;
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public PMGClass(PMGClass c) {
-        this(c.getNameIndex(), c.getLength(), c.getPMGIndex(), c.getPMGClassIndex(), c
-                .getConstantPool());
-    }
+    
 
 
     /**
@@ -99,36 +92,16 @@
     }
 
 
-    /**
-     * @return Index in constant pool of source file name.
-     */
-    public final int getPMGClassIndex() {
-        return pmg_class_index;
-    }
+    
 
 
-    /**
-     * @param pmg_class_index
-     */
-    public final void setPMGClassIndex( int pmg_class_index ) {
-        this.pmg_class_index = pmg_class_index;
-    }
+    
 
 
-    /**
-     * @return Index in constant pool of source file name.
-     */
-    public final int getPMGIndex() {
-        return pmg_index;
-    }
+    
 
 
-    /**
-     * @param pmg_index
-     */
-    public final void setPMGIndex( int pmg_index ) {
-        this.pmg_index = pmg_index;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java Sat Dec  5 23:22:46 2009
@@ -48,30 +48,11 @@
     }
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        //	    v.visitParameterAnnotationEntry(this);
-    }
+    
 
 
-    /**
-     * @return the number of annotation entries in this parameter annotation
-     */
-    public final int getNumAnnotations() {
-        return annotation_table_length;
-    }
+    
 
 
-    /**
-     * returns the array of annotation entries in this annotation
-     */
-    public AnnotationEntry[] getAnnotationEntries() {
-        return annotation_table;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java Sat Dec  5 23:22:46 2009
@@ -89,26 +89,11 @@
     }
 
 
-    /**
-     * @return the parameter annotation entry table
-     */
-    public final ParameterAnnotationEntry[] getParameterAnnotationTable() {
-        return parameter_annotation_table;
-    }
+    
 
 
-    /**
-     * returns the array of parameter annotation entries in this parameter annotation
-     */
-    public ParameterAnnotationEntry[] getParameterAnnotationEntries() {
-        return parameter_annotation_table;
-    }
+    
 
 
-    /**
-     * @return the number of parameter annotation entries in this parameter annotation
-     */
-    public final int getNumParameterAnnotation() {
-        return num_parameters;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java Sat Dec  5 23:22:46 2009
@@ -36,13 +36,7 @@
     private int signature_index;
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Signature(Signature c) {
-        this(c.getNameIndex(), c.getLength(), c.getSignatureIndex(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -96,20 +90,10 @@
     }
 
 
-    /**
-     * @return Index in constant pool of source file name.
-     */
-    public final int getSignatureIndex() {
-        return signature_index;
-    }
+    
 
 
-    /**
-     * @param signature_index the index info the constant pool of this signature
-     */
-    public final void setSignatureIndex( int signature_index ) {
-        this.signature_index = signature_index;
-    }
+    
 
 
     /**
@@ -129,130 +113,6 @@
         MyByteArrayInputStream(String data) {
             super(data.getBytes());
         }
-
-
-        final int mark() {
-            return pos;
-        }
-
-
-        final String getData() {
-            return new String(buf);
-        }
-
-
-        final void reset( int p ) {
-            pos = p;
-        }
-
-
-        final void unread() {
-            if (pos > 0) {
-                pos--;
-            }
-        }
-    }
-
-
-    private static boolean identStart( int ch ) {
-        return ch == 'T' || ch == 'L';
-    }
-
-
-    private static final void matchIdent( MyByteArrayInputStream in, StringBuffer buf ) {
-        int ch;
-        if ((ch = in.read()) == -1) {
-            throw new RuntimeException("Illegal signature: " + in.getData()
-                    + " no ident, reaching EOF");
-        }
-        //System.out.println("return from ident:" + (char)ch);
-        if (!identStart(ch)) {
-            StringBuffer buf2 = new StringBuffer();
-            int count = 1;
-            while (Character.isJavaIdentifierPart((char) ch)) {
-                buf2.append((char) ch);
-                count++;
-                ch = in.read();
-            }
-            if (ch == ':') { // Ok, formal parameter
-                in.skip("Ljava/lang/Object".length());
-                buf.append(buf2);
-                ch = in.read();
-                in.unread();
-                //System.out.println("so far:" + buf2 + ":next:" +(char)ch);
-            } else {
-                for (int i = 0; i < count; i++) {
-                    in.unread();
-                }
-            }
-            return;
-        }
-        StringBuffer buf2 = new StringBuffer();
-        ch = in.read();
-        do {
-            buf2.append((char) ch);
-            ch = in.read();
-            //System.out.println("within ident:"+ (char)ch);
-        } while ((ch != -1) && (Character.isJavaIdentifierPart((char) ch) || (ch == '/')));
-        buf.append(buf2.toString().replace('/', '.'));
-        //System.out.println("regular return ident:"+ (char)ch + ":" + buf2);
-        if (ch != -1) {
-            in.unread();
-        }
-    }
-
-
-    private static final void matchGJIdent( MyByteArrayInputStream in, StringBuffer buf ) {
-        int ch;
-        matchIdent(in, buf);
-        ch = in.read();
-        if ((ch == '<') || ch == '(') { // Parameterized or method
-            //System.out.println("Enter <");
-            buf.append((char) ch);
-            matchGJIdent(in, buf);
-            while (((ch = in.read()) != '>') && (ch != ')')) { // List of parameters
-                if (ch == -1) {
-                    throw new RuntimeException("Illegal signature: " + in.getData()
-                            + " reaching EOF");
-                }
-                //System.out.println("Still no >");
-                buf.append(", ");
-                in.unread();
-                matchGJIdent(in, buf); // Recursive call
-            }
-            //System.out.println("Exit >");
-            buf.append((char) ch);
-        } else {
-            in.unread();
-        }
-        ch = in.read();
-        if (identStart(ch)) {
-            in.unread();
-            matchGJIdent(in, buf);
-        } else if (ch == ')') {
-            in.unread();
-            return;
-        } else if (ch != ';') {
-            throw new RuntimeException("Illegal signature: " + in.getData() + " read " + (char) ch);
-        }
-    }
-
-
-    public static String translate( String s ) {
-        //System.out.println("Sig:" + s);
-        StringBuffer buf = new StringBuffer();
-        matchGJIdent(new MyByteArrayInputStream(s), buf);
-        return buf.toString();
-    }
-
-
-    public static final boolean isFormalParameterList( String s ) {
-        return s.startsWith("<") && (s.indexOf(':') > 0);
-    }
-
-
-    public static final boolean isActualParameterList( String s ) {
-        return s.startsWith("L") && s.endsWith(">;");
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java Sat Dec  5 23:22:46 2009
@@ -38,10 +38,7 @@
 		return index;
 	}
 
-	public void setIndex(int index)
-	{
-		this.index = index;
-	}
+	
 
 	public String getValueString()
 	{

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java Sat Dec  5 23:22:46 2009
@@ -37,13 +37,7 @@
     private int sourcefile_index;
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public SourceFile(SourceFile c) {
-        this(c.getNameIndex(), c.getLength(), c.getSourceFileIndex(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -103,20 +97,10 @@
     }
 
 
-    /**
-     * @return Index in constant pool of source file name.
-     */
-    public final int getSourceFileIndex() {
-        return sourcefile_index;
-    }
+    
 
 
-    /**
-     * @param sourcefile_index
-     */
-    public final void setSourceFileIndex( int sourcefile_index ) {
-        this.sourcefile_index = sourcefile_index;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMap.java Sat Dec  5 23:22:46 2009
@@ -88,12 +88,7 @@
     }
 
 
-    /**
-     * @return Array of stack map entries
-     */
-    public final StackMapEntry[] getStackMap() {
-        return map;
-    }
+    
 
 
     /**
@@ -147,7 +142,5 @@
     }
 
 
-    public final int getMapLength() {
-        return map_length;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java Sat Dec  5 23:22:46 2009
@@ -121,54 +121,34 @@
     }
 
 
-    public void setByteCodeOffset( int b ) {
-        byte_code_offset = b;
-    }
+    
 
 
-    public int getByteCodeOffset() {
-        return byte_code_offset;
-    }
+    
 
 
-    public void setNumberOfLocals( int n ) {
-        number_of_locals = n;
-    }
+    
 
 
-    public int getNumberOfLocals() {
-        return number_of_locals;
-    }
+    
 
 
-    public void setTypesOfLocals( StackMapType[] t ) {
-        types_of_locals = t;
-    }
+    
 
 
-    public StackMapType[] getTypesOfLocals() {
-        return types_of_locals;
-    }
+    
 
 
-    public void setNumberOfStackItems( int n ) {
-        number_of_stack_items = n;
-    }
+    
 
 
-    public int getNumberOfStackItems() {
-        return number_of_stack_items;
-    }
+    
 
 
-    public void setTypesOfStackItems( StackMapType[] t ) {
-        types_of_stack_items = t;
-    }
+    
 
 
-    public StackMapType[] getTypesOfStackItems() {
-        return types_of_stack_items;
-    }
+    
 
 
     /**
@@ -183,30 +163,11 @@
     }
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitStackMapEntry(this);
-    }
+    
 
 
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
+    
 
 
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java Sat Dec  5 23:22:46 2009
@@ -88,12 +88,7 @@
     }
 
 
-    /**
-     * @return Array of stack map entries
-     */
-    public final StackMapTableEntry[] getStackMapTable() {
-        return map;
-    }
+    
 
 
     /**
@@ -147,7 +142,5 @@
     }
 
 
-    public final int getMapLength() {
-        return map_length;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java Sat Dec  5 23:22:46 2009
@@ -194,54 +194,34 @@
     }
 
 
-    public void setByteCodeOffsetDelta( int b ) {
-        byte_code_offset_delta = b;
-    }
+    
 
 
-    public int getByteCodeOffsetDelta() {
-        return byte_code_offset_delta;
-    }
+    
 
 
-    public void setNumberOfLocals( int n ) {
-        number_of_locals = n;
-    }
+    
 
 
-    public int getNumberOfLocals() {
-        return number_of_locals;
-    }
+    
 
 
-    public void setTypesOfLocals( StackMapType[] t ) {
-        types_of_locals = t;
-    }
+    
 
 
-    public StackMapType[] getTypesOfLocals() {
-        return types_of_locals;
-    }
+    
 
 
-    public void setNumberOfStackItems( int n ) {
-        number_of_stack_items = n;
-    }
+    
 
 
-    public int getNumberOfStackItems() {
-        return number_of_stack_items;
-    }
+    
 
 
-    public void setTypesOfStackItems( StackMapType[] t ) {
-        types_of_stack_items = t;
-    }
+    
 
 
-    public StackMapType[] getTypesOfStackItems() {
-        return types_of_stack_items;
-    }
+    
 
 
     /**
@@ -256,30 +236,11 @@
     }
 
 
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitStackMapTableEntry(this);
-    }
+    
 
 
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
+    
 
 
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
+    
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java Sat Dec  5 23:22:46 2009
@@ -72,9 +72,7 @@
     }
 
 
-    public byte getType() {
-        return type;
-    }
+    
 
 
     public void setIndex( int t ) {
@@ -133,24 +131,10 @@
     }
 
 
-    /**
-     * @return deep copy of this object
-     */
-    public StackMapType copy() {
-        try {
-            return (StackMapType) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
+    
 
 
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java Sat Dec  5 23:22:46 2009
@@ -39,13 +39,7 @@
     private byte[] bytes;
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public Synthetic(Synthetic c) {
-        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -107,20 +101,10 @@
     }
 
 
-    /**
-     * @return data bytes.
-     */
-    public final byte[] getBytes() {
-        return bytes;
-    }
+    
 
 
-    /**
-     * @param bytes
-     */
-    public final void setBytes( byte[] bytes ) {
-        this.bytes = bytes;
-    }
+    
 
 
     /**

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java?rev=887610&r1=887609&r2=887610&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Unknown.java Sat Dec  5 23:22:46 2009
@@ -20,7 +20,6 @@
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 import org.apache.tomcat.util.bcel.Constants;
 
@@ -47,26 +46,10 @@
     private static Map unknown_attributes = new HashMap();
 
 
-    /** @return array of unknown attributes, but just one for each kind.
-     */
-    static Unknown[] getUnknownAttributes() {
-        Unknown[] unknowns = new Unknown[unknown_attributes.size()];
-        Iterator entries = unknown_attributes.values().iterator();
-        for (int i = 0; entries.hasNext(); i++) {
-            unknowns[i] = (Unknown) entries.next();
-        }
-        unknown_attributes.clear();
-        return unknowns;
-    }
+    
 
 
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Unknown(Unknown c) {
-        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
-    }
+    
 
 
     /**
@@ -130,12 +113,7 @@
     }
 
 
-    /**
-     * @return data bytes.
-     */
-    public final byte[] getBytes() {
-        return bytes;
-    }
+    
 
 
     /**
@@ -146,12 +124,7 @@
     }
 
 
-    /**
-     * @param bytes the bytes to set
-     */
-    public final void setBytes( byte[] bytes ) {
-        this.bytes = bytes;
-    }
+    
 
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message