Author: colen
Date: Tue Apr 22 15:24:03 2014
New Revision: 1589167
URL: http://svn.apache.org/r1589167
Log:
OPENNLP-674 Added javadoc comment regarding the capability of getting the
singleton instance of a class if it implements the singleton pattern (INSTANCE
static field)
Modified:
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/ext/ExtensionLoader.java
Modified:
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/ext/ExtensionLoader.java
URL:
http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/ext/ExtensionLoader.java?rev=1589167&r1=1589166&r2=1589167&view=diff
==============================================================================
---
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/ext/ExtensionLoader.java
(original)
+++
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/util/ext/ExtensionLoader.java
Tue Apr 22 15:24:03 2014
@@ -45,7 +45,12 @@ public class ExtensionLoader {
* <p>
* The extension is either loaded from the class path or if running
* inside an OSGi environment via an OSGi service.
- *
+ * <p>
+ * Initially it tries using the public default
+ * constructor. If it is not found, it will check if the class follows the
singleton
+ * pattern: a static field named <code>INSTANCE</code> that returns an
object of the type
+ * <code>T</code>.
+ *
* @param clazz
* @param extensionClassName
*