1 13 14 package org.eclipse.jdt.internal.junit.launcher; 15 16 public class JUnitRuntimeClasspathEntry { 17 private final String fPluginId; 18 19 private final String fPluginRelativePath; 20 21 public JUnitRuntimeClasspathEntry(String pluginId, String jarFile) { 22 fPluginId = pluginId; 23 fPluginRelativePath = jarFile; 24 } 25 26 public String getPluginId() { 27 return fPluginId; 28 } 29 30 public String getPluginRelativePath() { 31 return fPluginRelativePath; 32 } 33 34 public JUnitRuntimeClasspathEntry developmentModeEntry() { 35 return new JUnitRuntimeClasspathEntry(getPluginId(), "bin"); } 37 38 public String toString() { 39 return "ClasspathEntry(" + fPluginId + "/" + fPluginRelativePath + ")"; } 41 42 public boolean equals(Object obj) { 43 if (!(obj instanceof JUnitRuntimeClasspathEntry)) 44 return false; 45 JUnitRuntimeClasspathEntry other = (JUnitRuntimeClasspathEntry) obj; 46 return fPluginId.equals(other.getPluginId()) 47 && ( (fPluginRelativePath == null && other.getPluginRelativePath() == null) 48 || fPluginRelativePath.equals(other.getPluginRelativePath()) ); 49 } 50 51 public int hashCode() { 52 return super.hashCode(); 54 } 55 } 56 | Popular Tags |