1 52 53 package com.go.trove.classfile; 54 55 import java.io.*; 56 57 67 public abstract class ConstantInfo { 68 final static int TAG_UTF8 = 1; 69 final static int TAG_INTEGER = 3; 70 final static int TAG_FLOAT = 4; 71 final static int TAG_LONG = 5; 72 final static int TAG_DOUBLE = 6; 73 final static int TAG_CLASS = 7; 74 final static int TAG_STRING = 8; 75 final static int TAG_FIELD = 9; 76 final static int TAG_METHOD = 10; 77 final static int TAG_INTERFACE_METHOD = 11; 78 final static int TAG_NAME_AND_TYPE = 12; 79 80 int mIndex = -1; 82 private int mTag; 83 84 protected ConstantInfo(int tag) { 85 mTag = tag; 86 } 87 88 93 public int getIndex() { 94 return mIndex; 95 } 96 97 boolean hasPriority() { 98 return false; 99 } 100 101 int getEntryCount() { 102 return 1; 103 } 104 105 public void writeTo(DataOutput dout) throws IOException { 106 dout.writeByte(mTag); 107 } 108 } 109 | Popular Tags |