/** Create a new handle for an service. * @param ex the service to store a handle for */ public Handle(ServiceType ex) { name = ex.getName(); className = ex.getClass().getName(); serviceType = ex; }
return (ServiceType) clone(); } catch (CloneNotSupportedException ex) { anEx = ex;
/** Get the name of the service type. * The default value is given by {@link #displayName}. * @return a human-presentable name for the service type */ public String getName() { return (name == null) ? displayName() : name; }
isServiceType = true; ServiceType sr = (ServiceType) obj; name = name == null? sr.getName(): name; String stName = name; ServiceType.Registry r = (ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class); append(name).append('_').append(i).toString(); if (!stName.equals(sr.getName())) { sr = sr.createClone(); obj = sr; sr.setName(stName);
/** Find a service type of a supplied name in the registry. * <P> * This could be used during (de-)serialization * of a service type: only store its name * and then try to find the type later. * * @param name (display) name of service type to find * @return the desired type or <code>null</code> if it does not exist */ public ServiceType find(String name) { Enumeration en = services(); while (en.hasMoreElements()) { ServiceType o = (ServiceType) en.nextElement(); if (name.equals(o.getName())) { return o; } } return null; } }
/** Get the name of the service type. * The default value is given by {@link #displayName}. * @return a human-presentable name for the service type */ public String getName() { return (name == null) ? displayName() : name; }
return (ServiceType) clone(); } catch (CloneNotSupportedException ex) { anEx = ex;
String n = t.getName();
/** Get the name of the service type. * The default value is given by {@link #displayName}. * @return a human-presentable name for the service type */ public String getName() { return (name == null) ? displayName() : name; }
return (ServiceType) clone(); } catch (CloneNotSupportedException ex) { anEx = ex;
/** Create a new handle for an service. * @param ex the service to store a handle for */ public Handle(ServiceType ex) { name = ex.getName(); className = ex.getClass().getName(); serviceType = ex; }
/** Get the name of the service type. * The default value is given by {@link #displayName}. * @return a human-presentable name for the service type */ public String getName () { return name == null ? displayName () : name; }
return (ServiceType) clone(); } catch (CloneNotSupportedException ex) { anEx = ex;
/** Find a service type of a supplied name in the registry. * <P> * This could be used during (de-)serialization * of a service type: only store its name * and then try to find the type later. * * @param name (display) name of service type to find * @return the desired type or <code>null</code> if it does not exist */ public ServiceType find(String name) { Enumeration en = services(); while (en.hasMoreElements()) { ServiceType o = (ServiceType) en.nextElement(); if (name.equals(o.getName())) { return o; } } return null; } }
/** Get the name of the service type. * The default value is given by {@link #displayName}. * @return a human-presentable name for the service type */ public String getName() { return (name == null) ? displayName() : name; }
return (ServiceType)clone (); } catch (CloneNotSupportedException ex) { anEx = ex;
String n = t.getName();
/** Get the name of the service type. * The default value is given by {@link #displayName}. * @return a human-presentable name for the service type */ public String getName () { return name == null ? displayName () : name; }
return (ServiceType)clone (); } catch (CloneNotSupportedException ex) { anEx = ex;
/** Create a new handle for an service. * @param ex the service to store a handle for */ public Handle(ServiceType ex) { name = ex.getName(); className = ex.getClass().getName(); serviceType = ex; }