View Javadoc

1   package com.atlassian.plugin.parsers;
2   
3   import com.atlassian.plugin.Application;
4   import com.atlassian.plugin.PluginParseException;
5   
6   import java.io.InputStream;
7   
8   /**
9    * Creates XML descriptor parser instances.
10   *
11   * @see XmlDescriptorParser
12   * @see DescriptorParserFactory
13   */
14  public class XmlDescriptorParserFactory implements DescriptorParserFactory
15  {
16      /**
17       *
18       * @param source the stream of data which represents the descriptor. The stream will
19       * only be read once, so it need not be resettable.
20       * @param applications the identifier of the current application to use to match modules, if specified.  Null to
21       * match only modules with no application key.
22       * @return
23       * @throws PluginParseException
24       */
25      public DescriptorParser getInstance(InputStream source, Application... applications) throws PluginParseException
26      {
27          return new XmlDescriptorParser(source, applications);
28      }
29  }