1 32 33 package com.jeantessier.classreader; 34 35 import java.io.*; 36 37 public class Class_info extends ConstantPoolEntry { 38 private int nameIndex; 39 40 public Class_info(ConstantPool constantPool, DataInputStream in) throws IOException { 41 super(constantPool); 42 43 nameIndex = in.readUnsignedShort(); 44 } 45 46 public int getNameIndex() { 47 return nameIndex; 48 } 49 50 public UTF8_info getRawName() { 51 return (UTF8_info) getConstantPool().get(getNameIndex()); 52 } 53 54 public String getName() { 55 return SignatureHelper.path2ClassName(getRawName().toString()); 56 } 57 58 public String toString() { 59 return getName(); 60 } 61 62 public void accept(Visitor visitor) { 63 visitor.visitClass_info(this); 64 } 65 } 66 | Popular Tags |