Java Class.hashCode Examples

Java Class.hashCode - 30 examples found. These are the top rated real world Java examples of Class.hashCode extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 private void createHashCode() {
   int result = annotation != null ? annotation.hashCode() : 0;
   result = 31 * result + (provider ? 1 : 0);
   result = 31 * result + (name != null ? name.hashCode() : 0);
   result = 31 * result + (serviceDefinition != null ? serviceDefinition.hashCode() : 0);
   hashCode = result;
 }
Example #2
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((classFrom == null) ? 0 : classFrom.hashCode());
   result = prime * result + ((classTo == null) ? 0 : classTo.hashCode());
   return result;
 }
Example #3
0
 /** {@inheritDoc} */
 @Override
 public int hashCode() {
   int result = -1845873496;
   result += mClass.hashCode();
   if (mName != null) {
     result += mName.hashCode();
   }
   if (mAnnotation != null) {
     result += mAnnotation.hashCode();
   }
   return result;
 }
 public int hashCode() {
   if (j == 0) {
     j = b.hashCode();
     j = (j * 31 + g.hashCode());
     j = (j * 31 + c);
     j = (j * 31 + d);
     j = (j * 31 + h.hashCode());
     j = (j * 31 + e.hashCode());
     j = (j * 31 + f.hashCode());
     j = (j * 31 + i.hashCode());
   }
   return j;
 }
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((annotated == null) ? 0 : annotated.hashCode());
   return result;
 }
Example #6
0
 public static int methodKey(Method m) {
   int key = ShaDigest.shortDigest(m.getName());
   for (Class c : m.getParameterTypes()) {
     key += c.hashCode();
   }
   return key;
 }