IBM DB2 UDB
Plugin Interface
for Extending the Control Center

com.ibm.db2.tools.cc.navigator
Class CCTypeFactory

java.lang.Object
  extended bycom.ibm.db2.tools.cc.navigator.CCTypeFactory

public final class CCTypeFactory
extends java.lang.Object

The purpose of this class is to prevent different plugin objects from using the same type number. This class provides a unique type for a plugin so that it can be identified uniquely by the Control Center.

The following example shows a call to getTypeNumber(java.lang.String). The result is returned by the CCObject.getType() method.

    public int getType () {
        return CCTypeFactory.getTypeNumber(this.getClass().getName()); }
  


Method Summary
static int getTypeNumber(java.lang.String ccObjectClass)
          Obtains the unique type number for the given class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTypeNumber

public static int getTypeNumber(java.lang.String ccObjectClass)
Obtains the unique type number for the given class name. Call this method in the getType method of CCObject and pass the class name (this.getClass().getName()) to it.

Parameters:
ccObjectClass - The class name (this.getClass().getName()) of the CCObject to retrieve a unique type number for.
Returns:
the unique type number

IBM DB2 UDB
Plugin Interface
for Extending the Control Center

(C)Copyright IBM Corp. 2002, 2004. All rights reserved.

Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.