incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spo...@apache.org
Subject svn commit: r800562 - /incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/ImageFactory.java
Date Mon, 03 Aug 2009 21:03:43 GMT
Author: spoole
Date: Mon Aug  3 21:03:42 2009
New Revision: 800562

URL: http://svn.apache.org/viewvc?rev=800562&view=rev
Log:
updated  ImageFactory  javadoc

Modified:
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/ImageFactory.java

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/ImageFactory.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/ImageFactory.java?rev=800562&r1=800561&r2=800562&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/ImageFactory.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/ImageFactory.java
Mon Aug  3 21:03:42 2009
@@ -17,92 +17,94 @@
 import java.io.IOException;
 
 /**
+ * <p>
  * This interface is used for classes which can produce instances of Image
  * implementors.
- * 
- * Classes which implement this interface should provide a zero argument, public
- * constructor so that they can be created using newInstance().
- * 
- * e.g.
- * 
- * <pre>
- * Image image;
- * try {
- *   Class factoryClass = Class.forName(&quot;org.example.image.ImageFactory&quot;);
- * 	 ImageFactory factory = (ImageFactory) factoryClass.newInstance();
- * 	 image = factory.getImage(new File(coreFileName), new File(xmlFileName));
- * } catch (ClassNotFoundException e) {
- * 	 System.err.println(&quot;Could not find Kato factory class:&quot;);
- * 	 e.printStackTrace(System.err);
- * } catch (IllegalAccessException e) {
- * 	 System.err.println(&quot;Could not instantiate Kato factory class:&quot;);
- * 	 e.printStackTrace(System.err);
- * } catch (InstantiationException e) {
- * 	 System.err.println(&quot;Could not instantiate Kato factory class:&quot;);
- * 	 e.printStackTrace(System.err);
- * } catch (IOException e) {
- * 	 System.err.println(&quot;Could not find file required for bootstrapping:&quot;);
- * 	 e.printStackTrace(System.err);
- * }
- * </pre>
- * 
+ * <p>
+ * Note that this interface forms the contract between the {@link javax.tools.diagnostics.FactoryRegistry}
+ * and an implementation.   The methods on this interface are only intended to be called
by the  {@link javax.tools.diagnostics.FactoryRegistry}
+ *  
  */
 
 public interface ImageFactory {
 	
 	/**
+	 * <p>
 	 * The major version number of the current API.
-	 * 
+	 * <p>
 	 * Note that this value will be inlined so users can reference it directly
-	 * (ie:  factory.getKatoMajorVersion() >= ImageFactory.KATO_MAJOR_VERSION)
+	 * (ie:  factory.getMajorVersion() >= ImageFactory.MAJOR_VERSION)
 	 */
-	public static final int KATO_MAJOR_VERSION = 1;
+	public static final int MAJOR_VERSION = 0;
 	
 	/**
+	 * <p>
 	 * The minor version number of the current API
-	 * 
+	 * <p?
 	 * Note that this value will be inlined so users can reference it directly
-	 * (ie:  factory.getKatoMinorVersion() >= ImageFactory.KATO_MINOR_VERSION)
+	 * (ie:  factory.getKatoMinorVersion() >= ImageFactory.MINOR_VERSION)
 	 */
-	public static final int KATO_MINOR_VERSION = 3;
+	public static final int MINOR_VERSION = 1;
 	
 	/**
-	 * Creates a new Image object based on the contents of imageFile
+	 * <p>
+	 * Creates a new Image object based on the contents of imageFile.
+	 * <p>
+	 * Note that this method is only intended to be called by the {@link javax.tools.diagnostics.FactoryRegistry}
 	 * 
 	 * @param imageFile a file with Image information, typically a core file
 	 * @return an instance of Image
-	 * @throws IOException
+	 * @throws IOException if unable to create an image from the provided file 
 	 */
 	Image getImage(File imageFile) throws IOException;
 
 	/**
+	 * <p>
 	 * Creates a new Image object based on the contents of imageFile and metadata
-	 * 
+	 * <p>
+	 * Note that this method is only intended to be called by the {@link javax.tools.diagnostics.FactoryRegistry}
 	 * @param imageFile a file with Image information, typically a core file
 	 * @param metadata a file with additional Image information. This is an implementation defined
file
 	 * @return an instance of Image
-	 * @throws IOException
+	 * @throws IOException if unable to create an image from the provided file
 	 */
 	Image getImage(File imageFile, File metadata) throws IOException;
 	
 	/**
-	 * Fetch the Kato major version number
-	 * @return An integer corresponding to the Kato API major version number
+	 * <p>
+	 * Fetch the major version number
+	 * @return An integer corresponding to the API major version number
 	 */
-	public int getKatoMajorVersion();
+	public int getMajorVersion();
 	
 	/**
-	 * Fetch the Kato minor version number
-	 * @return An integer corresponding to the Kato API minor version number
+	 * <p>
+	 * Fetch the minor version number
+	 * @return An integer corresponding to the API minor version number
 	 */
-	public int getKatoMinorVersion();
+	public int getMinorVersion();
 	
 	/**
-	 * Fetch the Kato modification level
-	 * @return An integer corresponding to the Kato API modification level
-	 * @since Kato version 1.0
+	 * <p>
+	 * Fetch the modification level
+	 * @return An integer corresponding to the  API modification level
+	 * 
 	 */	
 	public int getKatoModificationLevel();
 
+	/**
+	 * <p>
+	 * Returns a list of file extensions that the {@link javax.tools.diagnostics.FactoryRegistry}
can use
+	 * to determine if an file can be processed by this Image Factory implementation.
+	 * <p>File extensions are the part of a file name after the last '.'. 
+	 * <p>
+	 * The returned array is treated as a case insensitive collection of file extensions.
+	 * <p>
+	 * The returned list is expected to contain at least one entry.
+ 	 * <p>
+	 * Note that this method is only intended to be called by the {@link javax.tools.diagnostics.FactoryRegistry}
+
+	 * @return an array of case insensitive file extension names.
+	 */
 	public String[] getValidFileExtensions();
 }



Mime
View raw message