1 19 20 package org.netbeans.api.db.explorer; 21 22 import java.beans.PropertyChangeListener ; 23 import java.beans.PropertyChangeSupport ; 24 import java.net.URL ; 25 import java.util.Arrays ; 26 27 30 public final class JDBCDriver { 31 32 private URL [] urls; 33 private String clazz; 34 private String displayName; 35 private String name; 36 37 JDBCDriver(String name, String displayName, String clazz, URL [] urls) { 38 assert name != null && displayName != null && clazz != null && urls != null; 39 this.name = name; 40 this.displayName = displayName; 41 this.clazz = clazz; 42 this.urls = urls; 43 } 44 45 55 public static JDBCDriver create(String name, String displayName, String clazz, URL [] urls) { 56 if (name == null || displayName == null || clazz == null || urls == null) { 57 throw new NullPointerException (); 58 } 59 return new JDBCDriver(name, displayName, clazz, urls); 60 } 61 62 67 public URL [] getURLs() { 68 return urls; 69 } 70 71 76 public String getClassName() { 77 return clazz; 78 } 79 80 85 public String getDisplayName() { 86 return displayName; 87 } 88 89 94 public String getName() { 95 return name; 96 } 97 98 public String toString() { 99 return "JDBCDriver[name='" + name + "',displayName='" + displayName + "',className='" + clazz + "',urls=" + Arrays.asList(urls) + "]"; } 104 } 105 | Popular Tags |