View Javadoc
1   package mockit.asm.constantPool;
2   
3   import static mockit.asm.constantPool.TypeTableItem.SpecialType.NORMAL;
4   
5   import edu.umd.cs.findbugs.annotations.NonNull;
6   
7   import org.checkerframework.checker.index.qual.NonNegative;
8   
9   final class NormalTypeTableItem extends TypeTableItem {
10      NormalTypeTableItem() {
11          type = NORMAL;
12      }
13  
14      NormalTypeTableItem(@NonNegative int index, @NonNull NormalTypeTableItem item) {
15          super(index, item);
16      }
17  
18      /**
19       * Sets the type of this normal type table item.
20       *
21       * @param type
22       *            the internal name to be added to the type table.
23       */
24      void set(@NonNull String type) {
25          typeDesc = type;
26          setHashCode(type.hashCode());
27      }
28  
29      @Override
30      boolean isEqualTo(@NonNull Item item) {
31          return ((TypeTableItem) item).typeDesc.equals(typeDesc);
32      }
33  }