public final class ElementFactory
extends java.lang.Object
ElementFactory class is responsible for creating
  intances of Elements.
  The type of Element that gets created depends on the
  object identifier that is passed into the 
  findOrCreate(URL, Project). The ElementFactory
  makes use of registered ElementRecognizer instances to determine
  what Element class corresponds to a particular URL.
  Element instances created by the ElementFactory
  are generally not cached. It is up to a ElementRecognizer
  to determine if the instances it creates should be cached or not.
Element, 
ElementRecognizer| Constructor and Description | 
|---|
ElementFactory()  | 
| Modifier and Type | Method and Description | 
|---|---|
static void | 
addRecognizer(ElementRecognizer recognizer)
Registers a  
ElementRecognizer, appending it to the end
  of the list of recognizers. | 
static Element | 
findOrCreate(java.net.URL url,
            Project project)
Returns an  
Element associated with the identifier.  
  This method requests the ElementRecognizer that recoginizes
  the element identifier to create or find the associated
  element instance. | 
static void | 
removeRecognizer(ElementRecognizer recognizer)
Unregisters a  
ElementRecognizer. | 
public static Element findOrCreate(java.net.URL url, Project project) throws java.lang.IllegalAccessException, java.lang.InstantiationException
Element associated with the identifier.  
  This method requests the ElementRecognizer that recoginizes
  the element identifier to create or find the associated
  element instance. It is left to the recognizer to decide whether
  created elements should be cached. A recognizer that does not
  cache newly created elements may return a new element instance
  every time this method is called.url - unique url identifier.project - the project within which the element should be created.java.lang.IllegalAccessException - if the Element class or
  its initializer is not accessible.java.lang.InstantiationException - if the Element class is
  an abstract class, an interface, an array class, a primitive type,
  or void; or if the instantiation fails for some other reason.public static void addRecognizer(ElementRecognizer recognizer)
ElementRecognizer, appending it to the end
  of the list of recognizers.recognizer - instance of a ElementRecognizer
  implementation.public static void removeRecognizer(ElementRecognizer recognizer)
ElementRecognizer.recognizer - instance of a ElementRecognizer
  implemenation.