FieldRef.java 513 B

12345678910111213141516171819202122
  1. /* (c) copyright John Gough, 2012-2017 */
  2. package j2cps;
  3. public class FieldRef extends Reference {
  4. public FieldRef(ConstantPool thisCp, int classIndex, int ntIndex) {
  5. super(thisCp,classIndex,ntIndex);
  6. }
  7. public String getFieldName() {
  8. return (classRef.GetName() + "." + name);
  9. }
  10. @Override
  11. public String toString() {
  12. this.Resolve();
  13. return ("<FieldReference> " + classIndex + " " + nameAndTypeIndex + " " +
  14. classRef.GetName() + "." + name + " : " + type);
  15. }
  16. }