1 16 package com.google.gwt.junit.benchmarks; 17 18 21 class MetaData { 22 23 private CategoryImpl category; 24 25 private String className; 26 27 private String methodName; 28 29 private String sourceCode; 30 31 private String testDescription; 32 33 private String testName; 34 35 public MetaData(String className, String methodName, String sourceCode, 36 CategoryImpl category, String testName, String testDescription) { 37 this.className = className; 38 this.methodName = methodName; 39 this.sourceCode = sourceCode; 40 this.category = category; 41 this.testName = testName; 42 this.testDescription = testDescription; 43 } 44 45 public boolean equals(Object obj) { 46 if (! (obj instanceof MetaData)) { 47 return false; 48 } 49 50 MetaData md = (MetaData) obj; 51 52 return md.className.equals(className) && md.methodName.equals(methodName); 53 } 54 55 public CategoryImpl getCategory() { 56 return category; 57 } 58 59 public String getClassName() { 60 return className; 61 } 62 63 public String getMethodName() { 64 return methodName; 65 } 66 67 public String getSourceCode() { 68 return sourceCode; 69 } 70 71 public String getTestDescription() { 72 return testDescription; 73 } 74 75 public String getTestName() { 76 return testName; 77 } 78 79 public int hashCode() { 80 int result; 81 result = (className != null ? className.hashCode() : 0); 82 result = 29 * result + (methodName != null ? methodName.hashCode() : 0); 83 return result; 84 } 85 } 86 87 | Popular Tags |