Stumbled upon this dead code in CatalogFactory /Impl . Should we just remove it?
CatalogFactory :
/**
* Extensible factory method.
*
* <p>This method should lookup the appropritae instance of {@link Extension} to create the
* object. The lookup mechanism is specific to the runtime environement.
*
* @param clazz The class of object to create.
* @return The new object.
*/
<T extends Object> T create(Class<T> clazz);
/** Factory extension. */
interface Extension {
/**
* Determines if the extension can create objects of the specified class.
*
* @param clazz The class of object to create.
*/
<T extends Object> boolean canCreate(Class<T> clazz);
/**
* Creates an instance of the specified class.
*
* <p>This method is only called if {@link #canCreate(Class)} returns <code>true</code>.
*
* @param clazz The class of object to create.
* @param context A context to initialize the object.
* @return The new object.
*/
<T extends Object> T create(Class<T> clazz, Map<Object, Object> context);
}
CatalogFactoryImpl :
public <T extends Object> T create(Class<T> clazz) {
return null;
}
|