All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.tools.dip.MorphClassNameModelManipulator
java.lang.Object
|
+----com.ibm.beans.tools.dip.MorphClassNameModelManipulator
- public class MorphClassNameModelManipulator
- extends Object
- implements MorphModelManipulator
The MorphClassNameModelManipulator class gets the information needed from
a ClassNameModel so that a MorphController can use it.
- See Also:
- MorphModelManipulator
-
fMF
- The message formatter used by this MorphModelManipulator.
-
fModel
-
The model that this MorphModelManipulator wraps.
-
MorphClassNameModelManipulator(ClassNameModel)
- Constructs an instance of MorphClassNameModelManipulator.
-
checkNonStringError(Object, String)
- Checks to make sure a generic object is a String.
-
getClass(Object)
- Gets the class associated with an object in the model.
-
getClassName(Object)
- Gets the class name associated with an object in the model.
-
getClassName(String)
- Gets the class name associated with an object in the model.
-
getModel()
- Gets the model associated with this MorphModelManipulator instance.
-
getURLName(String, int)
- Gets the URL name associated with a class name for an object in the
model.
-
isInstanceOf(Object, Class)
- Determines whether an object in the model represents an instance of the
specified class.
-
loadModel(MorphViewEvent)
- Handles the loading of the model.
fModel
protected ClassNameModel fModel
- The model that this MorphModelManipulator wraps.
fMF
protected MessageFormatter fMF
- The message formatter used by this MorphModelManipulator.
MorphClassNameModelManipulator
public MorphClassNameModelManipulator(ClassNameModel model)
- Constructs an instance of MorphClassNameModelManipulator.
- Parameters:
- model - The ClassNameModel to use. Must not be null.
getModel
public Model getModel()
- Gets the model associated with this MorphModelManipulator instance.
- Returns:
- The model associated with this MorphModelManipulator instance.
getClassName
public String getClassName(String str) throws NotAClassObjectException
- Gets the class name associated with an object in the model.
- Parameters:
- str - A String in the model.
- Returns:
- The class name associated with the str.
- Throws: NotAClassObjectException
- if the str is not
the name of a class object.
getClassName
public String getClassName(Object obj) throws NotAClassObjectException
- Gets the class name associated with an object in the model.
- Parameters:
- obj - An object in the model. Must a String name of a class.
- Returns:
- The class name associated with the obj (the class that
the String names).
- Throws: NotAClassObjectException
- if the obj is not
the name of a class that can be loaded.
isInstanceOf
public boolean isInstanceOf(Object obj,
Class cls)
- Determines whether an object in the model represents an instance of the
specified class.
- Parameters:
- obj - The object to be examined (the String name of a class).
- cls - The class used to check the object.
- Returns:
-
true
if obj represents an
instance of (i.e., is the name of) cls;
false
otherwise.
getClass
public Class getClass(Object obj) throws ClassNotFoundException, NotAClassObjectException
- Gets the class associated with an object in the model.
- Parameters:
- obj - An object in the model (the String name of a class).
- Returns:
- The class associated with the obj (the class
named by obj).
- Throws: NotAClassObjectException
- if the obj is not
a class name.
- Throws: ClassNotFoundException
- if the class object could
not be found.
getURLName
public String getURLName(String className,
int classIndex) throws NoRepositoryFoundException
- Gets the URL name associated with a class name for an object in the
model. This implementation always throws a NoRepositoryFoundException
because this model does not support associating URLs with model
elements.
- Parameters:
- className - The class name for an object in the model (not used).
- classIndex - The index for the class name (not used).
- Returns:
- The URL string for the className (not used).
- Throws: NoRepositoryFoundException
- if no URL could be found for
className. This implementation always throws
this exception.
loadModel
public void loadModel(MorphViewEvent evt)
- Handles the loading of the model. The array of class names
contained in the specified MorphViewEvent are added to the model.
- Parameters:
- evt - The MorphViewEvent with the information needed to load
the model.
checkNonStringError
protected void checkNonStringError(Object obj,
String methodName)
- Checks to make sure a generic object is a String. Since
ClassNameModels only hold Strings, it is an error if a
non-String object is passed to any MorphClassNameModelManipulator method
that expects a model element.
- Parameters:
- obj - The generic object to be checked.
- methodName - The MorphClassNameModelManipulator method name calling
this method.
All Packages Class Hierarchy This Package Previous Next Index