Author: sebb Date: Fri Sep 11 12:30:43 2015 New Revision: 1702445 URL: http://svn.apache.org/r1702445 Log: Move methods to correct class
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantCP.java commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInvokeDynamic.java Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantCP.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantCP.java?rev=1702445&r1=1702444&r2=1702445&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantCP.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantCP.java Fri Sep 11 12:30:43 2015 @@ -107,18 +107,6 @@ public abstract class ConstantCP extends /** - * @return Reference (index) to bootstrap method this constant refers to. - * - * Note that this method is a functional duplicate of getClassIndex - * for use by ConstantInvokeDynamic. - * @since 6.0 - */ - public final int getBootstrapMethodAttrIndex() { - return class_index; // AKA bootstrap_method_attr_index - } - - - /** * @param class_index points to Constant_class */ public final void setClassIndex( int class_index ) { @@ -126,18 +114,6 @@ public abstract class ConstantCP extends } - /** - * @param bootstrap_method_attr_index points to a BootstrapMethod. - * - * Note that this method is a functional duplicate of setClassIndex - * for use by ConstantInvokeDynamic. - * @since 6.0 - */ - public final void setBootstrapMethodAttrIndex(int bootstrap_method_attr_index) { - this.class_index = bootstrap_method_attr_index; - } - - /** * @return Reference (index) to signature of the field. */ Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInvokeDynamic.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInvokeDynamic.java?rev=1702445&r1=1702444&r2=1702445&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInvokeDynamic.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/classfile/ConstantInvokeDynamic.java Fri Sep 11 12:30:43 2015 @@ -69,13 +69,22 @@ public final class ConstantInvokeDynamic v.visitConstantInvokeDynamic(this); } + /** + * @return Reference (index) to bootstrap method this constant refers to. + * + * Note that this method is a functional duplicate of getClassIndex + * for use by ConstantInvokeDynamic. + * @since 6.0 + */ + public final int getBootstrapMethodAttrIndex() { + return super.getClassIndex(); // AKA bootstrap_method_attr_index + } /** * @return String representation */ @Override public final String toString() { - // UNDONE: need to string replace "class_index" with "bootstrap_method_attr_index" - return super.toString(); + return super.toString().replace("class_index", "bootstrap_method_attr_index"); } }