View Javadoc
1 package jrre.classloader.classfile.attributes; 2 3 public class ConstantValueAttribute extends Attribute { 4 5 6 private int nameIndex; 7 private int attributesLength; 8 private int constantValueIndex; 9 10 public ConstantValueAttribute(){} 11 12 public ConstantValueAttribute(int nameIndex, int attributesLength, int constantValueIndex){ 13 this.nameIndex = nameIndex; 14 this.attributesLength = attributesLength; 15 this.constantValueIndex = constantValueIndex; 16 } 17 18 public void setConstantValueIndex(int constantValueIndex){ 19 this.constantValueIndex = constantValueIndex; 20 } 21 22 public void setNameIndex(int nameIndex){ this.nameIndex = nameIndex; } 23 public void setAttributesLength(int attributesLength){ this.attributesLength = attributesLength; } 24 25 public String toString(){ 26 27 StringBuffer toReturn = new StringBuffer(); 28 toReturn.append("Constant Value Attrubute:"); 29 toReturn.append("\n\t\tName Index: "+nameIndex); 30 toReturn.append("\n\t\tAttributes Length: "+attributesLength); 31 toReturn.append("\n\t\tConstant Value Index: "+constantValueIndex); 32 33 return toReturn.toString(); 34 } 35 }

This page was automatically generated by Maven