com.bluemarsh.jswat.util
Class ClassUtils
java.lang.Object
|
+--com.bluemarsh.jswat.util.ClassUtils
- All Implemented Interfaces:
- com.bluemarsh.config.ConfigureListener, java.util.EventListener
- public class ClassUtils
- extends java.lang.Object
- implements com.bluemarsh.config.ConfigureListener
Class ClassUtils provides a set of utility functions for dealing
with classes.
- Version:
- 1.0 5/19/01
- Author:
- Nathan Fiedler
Field Summary |
protected static ClassUtils |
instance
Reference to the single instance of this class. |
protected static boolean |
trimClassNames
Indicates whether we shoud trim class names or not. |
Constructor Summary |
protected |
ClassUtils()
Constructor that sets up the instance to listen for configuration
changes. |
Method Summary |
void |
configurationChanged()
Invoked when the configuration has been accepted by the user. |
static ClassUtils |
instanceOf()
Returns the reference to the single instance of this class. |
static java.lang.String |
justTheName(java.lang.String cname)
Returns just the name of the class, without the package name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
protected static ClassUtils instance
- Reference to the single instance of this class.
trimClassNames
protected static boolean trimClassNames
- Indicates whether we shoud trim class names or not.
ClassUtils
protected ClassUtils()
- Constructor that sets up the instance to listen for configuration
changes.
configurationChanged
public void configurationChanged()
- Invoked when the configuration has been accepted by the user.
- Specified by:
configurationChanged
in interface com.bluemarsh.config.ConfigureListener
instanceOf
public static ClassUtils instanceOf()
- Returns the reference to the single instance of this class.
If an instance does not exist it will be created.
- Returns:
- the instance of this class.
justTheName
public static java.lang.String justTheName(java.lang.String cname)
- Returns just the name of the class, without the package name.
- Parameters:
cname
- Name of class, possibly fully-qualified.- Returns:
- Just the class name.