コード例 #1
0
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (this.getClass() != obj.getClass()) return false;
   final CPClass other = (CPClass) obj;
   return utf8.equals(other.utf8);
 }
コード例 #2
0
 /**
  * Creates a new CPClass
  *
  * @param name
  * @param globalIndex index in CpBands
  * @throws NullPointerException if name is null
  */
 public CPClass(CPUTF8 name, int globalIndex) {
   super(ConstantPoolEntry.CP_Class, globalIndex);
   if (name == null) {
     throw new NullPointerException("Null arguments are not allowed");
   }
   this.name = name.underlyingString();
   this.utf8 = name;
 }
コード例 #3
0
 private void generateHashCode() {
   hashcodeComputed = true;
   cachedHashCode = utf8.hashCode();
 }