org.knime.core.eclipseUtil
Class GlobalClassCreator

java.lang.Object
  extended by org.knime.core.eclipseUtil.GlobalClassCreator

public final class GlobalClassCreator
extends Object

Eclipse workaround to create new Classes through one, global gateway. We can now plugin an Eclipse hack that knows about all plugins and can create classes using the appropriate class loader. If no creator is specified the usual Java class loader will be used.

Author:
Michael Berthold, University of Konstanz

Method Summary
static void addClassReplacementPair(String oldClassName, String replacedClassName)
          Adds a replacement string for obsolete class names.
static Class<?> createClass(String className)
          return Class specified name - using either normal classloader or special one if it was given before.
static void setClassCreator(ClassCreator cc)
          overwrite ClassCreator to be used by everybody.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setClassCreator

public static void setClassCreator(ClassCreator cc)
overwrite ClassCreator to be used by everybody.

Parameters:
cc - new ClassCreator.

addClassReplacementPair

public static void addClassReplacementPair(String oldClassName,
                                           String replacedClassName)
Adds a replacement string for obsolete class names. This is used primarily by data cell class implementations, which were moved from specific vendor plugins to KNIME core (mostly in a org.knime.chem.types). The replaced class is supposed to use the same internals (e.g. a similar persistor) as the replacing class.

This method is not intended for public use; if you want to replace an obsolete class by a KNIME core class, contact the KNIME team.

Parameters:
oldClassName - The old, to be replaced class
replacedClassName - The new class replacing oldClassName
Throws:
NullPointerException - If either argument is null
IllegalStateException - If there is already an entry for the old class name.

createClass

public static Class<?> createClass(String className)
                            throws ClassNotFoundException
return Class specified name - using either normal classloader or special one if it was given before.

Parameters:
className - qualified class name
Returns:
Class of specified name
Throws:
ClassNotFoundException - Class not found.


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.