< prev index next >

src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java

Print this page




  53     static final String DEFAULIMPL = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
  54 
  55 
  56   /**
  57    * Creates a new instance of the factory in exactly the same manner as the
  58    * {@link #newFactory()} method.
  59    * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
  60    */
  61   public static XMLEventFactory newInstance()
  62     throws FactoryConfigurationError
  63   {
  64     return FactoryFinder.find(XMLEventFactory.class, DEFAULIMPL);
  65   }
  66 
  67   /**
  68    * Create a new instance of the factory.
  69    * <p>
  70    * This static method creates a new factory instance.
  71    * This method uses the following ordered lookup procedure to determine
  72    * the XMLEventFactory implementation class to load:
  73    * <p>
  74    * <ul>
  75    * <li>
  76    *   Use the javax.xml.stream.XMLEventFactory system property.
  77    * </li>
  78    * <li>
  79    *   <p>
  80    *   Use the configuration file "stax.properties". The file is in standard
  81    *   {@link java.util.Properties} format and typically located in the
  82    *   {@code conf} directory of the Java installation. It contains the fully qualified
  83    *   name of the implementation class with the key being the system property
  84    *   defined above.
  85    *
  86    *   <p>
  87    *   The stax.properties file is read only once by the implementation
  88    *   and its values are then cached for future use.  If the file does not exist
  89    *   when the first attempt is made to read from it, no further attempts are
  90    *   made to check for its existence.  It is not possible to change the value
  91    *   of any property in stax.properties after it has been read for the first time.
  92    *
  93    *   <p>


 141    *
 142    * @deprecated  This method has been deprecated to maintain API consistency.
 143    *              All newInstance methods have been replaced with corresponding
 144    *              newFactory methods. The replacement {@link
 145    *              #newFactory(java.lang.String, java.lang.ClassLoader)}
 146    *              method defines no changes in behavior.
 147    */
 148   public static XMLEventFactory newInstance(String factoryId,
 149           ClassLoader classLoader)
 150           throws FactoryConfigurationError {
 151       //do not fallback if given classloader can't find the class, throw exception
 152       return FactoryFinder.find(XMLEventFactory.class, factoryId, classLoader, null);
 153   }
 154 
 155   /**
 156    * Create a new instance of the factory.
 157    * If the classLoader argument is null, then the ContextClassLoader is used.
 158    * <p>
 159    * This method uses the following ordered lookup procedure to determine
 160    * the XMLEventFactory implementation class to load:
 161    * <p>
 162    * <ul>
 163    * <li>
 164    *   Use the value of the system property identified by {@code factoryId}.
 165    * </li>
 166    * <li>
 167    *   <p>
 168    *   Use the configuration file "stax.properties". The file is in standard
 169    *   {@link java.util.Properties} format and typically located in the
 170    *   conf directory of the Java installation. It contains the fully qualified
 171    *   name of the implementation class with the key being the system property
 172    *   defined above.
 173    *
 174    *   <p>
 175    *   The stax.properties file is read only once by the implementation
 176    *   and its values are then cached for future use.  If the file does not exist
 177    *   when the first attempt is made to read from it, no further attempts are
 178    *   made to check for its existence.  It is not possible to change the value
 179    *   of any property in stax.properties after it has been read for the first time.
 180    *
 181    *   <p>




  53     static final String DEFAULIMPL = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
  54 
  55 
  56   /**
  57    * Creates a new instance of the factory in exactly the same manner as the
  58    * {@link #newFactory()} method.
  59    * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
  60    */
  61   public static XMLEventFactory newInstance()
  62     throws FactoryConfigurationError
  63   {
  64     return FactoryFinder.find(XMLEventFactory.class, DEFAULIMPL);
  65   }
  66 
  67   /**
  68    * Create a new instance of the factory.
  69    * <p>
  70    * This static method creates a new factory instance.
  71    * This method uses the following ordered lookup procedure to determine
  72    * the XMLEventFactory implementation class to load:

  73    * <ul>
  74    * <li>
  75    *   Use the javax.xml.stream.XMLEventFactory system property.
  76    * </li>
  77    * <li>
  78    *   <p>
  79    *   Use the configuration file "stax.properties". The file is in standard
  80    *   {@link java.util.Properties} format and typically located in the
  81    *   {@code conf} directory of the Java installation. It contains the fully qualified
  82    *   name of the implementation class with the key being the system property
  83    *   defined above.
  84    *
  85    *   <p>
  86    *   The stax.properties file is read only once by the implementation
  87    *   and its values are then cached for future use.  If the file does not exist
  88    *   when the first attempt is made to read from it, no further attempts are
  89    *   made to check for its existence.  It is not possible to change the value
  90    *   of any property in stax.properties after it has been read for the first time.
  91    *
  92    *   <p>


 140    *
 141    * @deprecated  This method has been deprecated to maintain API consistency.
 142    *              All newInstance methods have been replaced with corresponding
 143    *              newFactory methods. The replacement {@link
 144    *              #newFactory(java.lang.String, java.lang.ClassLoader)}
 145    *              method defines no changes in behavior.
 146    */
 147   public static XMLEventFactory newInstance(String factoryId,
 148           ClassLoader classLoader)
 149           throws FactoryConfigurationError {
 150       //do not fallback if given classloader can't find the class, throw exception
 151       return FactoryFinder.find(XMLEventFactory.class, factoryId, classLoader, null);
 152   }
 153 
 154   /**
 155    * Create a new instance of the factory.
 156    * If the classLoader argument is null, then the ContextClassLoader is used.
 157    * <p>
 158    * This method uses the following ordered lookup procedure to determine
 159    * the XMLEventFactory implementation class to load:

 160    * <ul>
 161    * <li>
 162    *   Use the value of the system property identified by {@code factoryId}.
 163    * </li>
 164    * <li>
 165    *   <p>
 166    *   Use the configuration file "stax.properties". The file is in standard
 167    *   {@link java.util.Properties} format and typically located in the
 168    *   conf directory of the Java installation. It contains the fully qualified
 169    *   name of the implementation class with the key being the system property
 170    *   defined above.
 171    *
 172    *   <p>
 173    *   The stax.properties file is read only once by the implementation
 174    *   and its values are then cached for future use.  If the file does not exist
 175    *   when the first attempt is made to read from it, no further attempts are
 176    *   made to check for its existence.  It is not possible to change the value
 177    *   of any property in stax.properties after it has been read for the first time.
 178    *
 179    *   <p>


< prev index next >