/** * Factory method to create a new <code>EventType</code>. * * @param localName * @param namespace * @return */ public static EventType create(String localName, Namespace namespace) { if (localName == null || "".equals(localName)) { throw new IllegalArgumentException("null and '' are not valid local names of an event type."); } String key = DomUtil.getExpandedName(localName, namespace); if (eventTypes.containsKey(key)) { return eventTypes.get(key); } else { EventType type = new DefaultEventType(localName, namespace); eventTypes.put(key, type); return type; } }
/** * Factory method to create a new <code>EventType</code>. * * @param localName * @param namespace * @return */ public static EventType create(String localName, Namespace namespace) { if (localName == null || "".equals(localName)) { throw new IllegalArgumentException("null and '' are not valid local names of an event type."); } String key = DomUtil.getQualifiedName(localName, namespace); if (eventTypes.containsKey(key)) { return (EventType) eventTypes.get(key); } else { EventType type = new DefaultEventType(localName, namespace); eventTypes.put(key, type); return type; } }
/** * Factory method to create a new <code>EventType</code>. * * @param localName * @param namespace * @return */ public static EventType create(String localName, Namespace namespace) { if (localName == null || "".equals(localName)) { throw new IllegalArgumentException("null and '' are not valid local names of an event type."); } String key = DomUtil.getExpandedName(localName, namespace); if (eventTypes.containsKey(key)) { return eventTypes.get(key); } else { EventType type = new DefaultEventType(localName, namespace); eventTypes.put(key, type); return type; } }