63 64 /** 65 * Called by objects that are traversing the nodes of the tree implicitly 66 * defined by the contents of a Java class. I.e., the hierarchy of methods, 67 * fields, attributes, etc. spawns a tree of objects. 68 * 69 * @param v Visitor object 70 */ 71 @Override 72 public void accept( final Visitor v ) { 73 v.visitConstantDynamic(this); 74 } 75 76 /** 77 * @return Reference (index) to bootstrap method this constant refers to. 78 * 79 * Note that this method is a functional duplicate of getClassIndex 80 * for use by ConstantInvokeDynamic. 81 * @since 6.0 82 */ 83 public final int getBootstrapMethodAttrIndex() { 84 return super.getClassIndex(); // AKA bootstrap_method_attr_index 85 } 86 87 /** 88 * @return String representation 89 */ 90 @Override 91 public final String toString() { 92 return super.toString().replace("class_index", "bootstrap_method_attr_index"); 93 } 94 } | 63 64 /** 65 * Called by objects that are traversing the nodes of the tree implicitly 66 * defined by the contents of a Java class. I.e., the hierarchy of methods, 67 * fields, attributes, etc. spawns a tree of objects. 68 * 69 * @param v Visitor object 70 */ 71 @Override 72 public void accept( final Visitor v ) { 73 v.visitConstantDynamic(this); 74 } 75 76 /** 77 * @return Reference (index) to bootstrap method this constant refers to. 78 * 79 * Note that this method is a functional duplicate of getClassIndex 80 * for use by ConstantInvokeDynamic. 81 * @since 6.0 82 */ 83 public int getBootstrapMethodAttrIndex() { 84 return super.getClassIndex(); // AKA bootstrap_method_attr_index 85 } 86 87 /** 88 * @return String representation 89 */ 90 @Override 91 public String toString() { 92 return super.toString().replace("class_index", "bootstrap_method_attr_index"); 93 } 94 } |