All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.mb.MBElementFactory
java.lang.Object
|
+----com.ibm.beans.mb.MBElementFactory
- public class MBElementFactory
- extends Object
This helper class builds MBElements and performs miscellaneous
functions pertaining to the building and classification
of MBElements.
- See Also:
- MBElement
-
MBElementFactory()
-
-
copyMBElement(Class, MBElement, ManagedBean)
- Copies the specified MBElement into a new MBElement of the specified
type.
-
createCommonMBElement(Class, MBMoniker, byte[], ManagedBean)
- Creates an MBElement and adds it to
the specified ManagedBean as a common MBElement.
-
createCommonMBElement(Class, MBMoniker, File, ManagedBean)
- Creates an MBElement and adds it to
the specified ManagedBean as a common MBElement.
-
createCommonMBElement(Class, String, byte[], ManagedBean)
- Creates an MBElement and adds it to
the specified ManagedBean as a common MBElement.
Deprecated.
-
createCommonMBElement(Class, String, File, ManagedBean)
- Creates an MBElement and adds it to
the specified ManagedBean as a common MBElement.
Deprecated.
-
createMBElement(Class, MBMoniker, byte[], ManagedBean)
- Creates an MBElement and adds it to the specified
ManagedBean.
-
createMBElement(Class, MBMoniker, File, ManagedBean)
- Creates an MBElement and adds it to the specified
ManagedBean.
-
createMBElement(Class, String, byte[], ManagedBean)
- Creates an MBElement and adds it to the specified
ManagedBean.
Deprecated.
-
createMBElement(Class, String, File, ManagedBean)
- Creates an MBElement and adds it to the specified
ManagedBean.
Deprecated.
-
guessBeanNameFromFiles(Vector)
- Guesses the name of a bean.
-
guessBeanNameFromStrings(Vector)
- Guesses the name of a bean.
-
guessMBElementSubclass(File)
- Guesses,
based on the file name, what kind of MBElement subclass is
associated with a file of this name.
-
guessMBElementSubclass(String)
- Guesses, based
on name, what kind of MBElement subclass is associated with a file of
this name.
-
passthroughProperties(MBElement, MBManifestSection)
- Initializes an MBElement with passthrough properties from a
MBManifestSection.
-
quickSortVector(Vector, int, int)
- QuickSorts the contents of a Vector of Strings, based on the
String values.
-
setBeanName(String)
- Sets beanName for use in guessing MBElement
subclasses.
MBElementFactory
public MBElementFactory()
createMBElement
public MBElement createMBElement(Class c,
MBMoniker moniker,
File elementFile,
ManagedBean mb) throws InstantiationException, IllegalAccessException, FileNotFoundException, IOException, InstantiationError
- Creates an MBElement and adds it to the specified
ManagedBean.
- Parameters:
- c - The MBElement subclass to be instantiated.
- moniker - The moniker of this new MBElement subclass.
- elementFile - The File associated with this MBElement.
- mb - The ManagedBean with which this MBElement will be associated.
This can be null. If not null, and the instantiated MBElement
is a MBBeanClass or a MBBeanSer, the moniker of the ManagedBean will be
made to match the moniker of the created MBElement.
- Returns:
- The instantiated MBElement subclass.
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- Throws: FileNotFoundException
- Thrown if the MBElement file cannot be
found.
- Throws: IOException
- Thrown if an IO problem occurs while reading
the MBElement file.
- See Also:
- MBElement
createMBElement
public MBElement createMBElement(Class c,
MBMoniker moniker,
byte b[],
ManagedBean mb) throws InstantiationException, IllegalAccessException, InstantiationError
- Creates an MBElement and adds it to the specified
ManagedBean.
- Parameters:
- c - The MBElement subclass to be instantiated.
- moniker - The moniker of this new MBElement subclass.
- b - The ByteArray associated with this MBElement.
- mb - The ManagedBean with which this MBElement will be associated.
This can be null. If not null, and the instantiated MBElement
is a MBBeanClass or a MBBeanSer, the moniker of the ManagedBean will be
made to match the moniker of the created MBElement.
- Returns:
- The instantiated MBElement subclass.
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- See Also:
- MBElement
createCommonMBElement
public MBElement createCommonMBElement(Class c,
MBMoniker moniker,
File elementFile,
ManagedBean mb) throws InstantiationException, IllegalAccessException, FileNotFoundException, IOException, InstantiationError
- Creates an MBElement and adds it to
the specified ManagedBean as a common MBElement.
- Parameters:
- c - The MBElement subclass to be instantiated.
- moniker - The moniker of this new MBElement subclass.
- elementFile - The File associated with this MBElement.
- mb - The ManagedBean with which this MBElement will be associated.
This can be null, although it doesn't make much sense.
- Returns:
- The instantiated MBElement subclass.
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- Throws: FileNotFoundException
- Thrown if the MBElement file cannot be
found.
- Throws: IOException
- Thrown if an IO problem occurs while reading
the MBElement file.
- See Also:
- MBElement
createCommonMBElement
public MBElement createCommonMBElement(Class c,
MBMoniker moniker,
byte b[],
ManagedBean mb) throws InstantiationException, IllegalAccessException, InstantiationError
- Creates an MBElement and adds it to
the specified ManagedBean as a common MBElement.
- Parameters:
- c - The MBElement subclass to be instantiated.
- moniker - The moniker of this new MBElement subclass.
- b - The ByteArray associated with this MBElement.
- mb - The ManagedBean with which this MBElement will be associated.
This can be null, although it doesn't make much sense.
- Returns:
- The instantiated MBElement subclass.
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- See Also:
- MBElement
createMBElement
public MBElement createMBElement(Class c,
String moniker,
File elementFile,
ManagedBean mb) throws InstantiationException, IllegalAccessException, FileNotFoundException, IOException, InstantiationError
- Note: createMBElement() is deprecated.
- Creates an MBElement and adds it to the specified
ManagedBean.
- Parameters:
- c - The MBElement subclass to be instantiated.
- moniker - The moniker of this new MBElement subclass.
- elementFile - The File associated with this MBElement.
- mb - The ManagedBean with which this MBElement will be associated.
- Returns:
- The instantiated MBElement subclass.
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- Throws: FileNotFoundException
- Thrown if the MBElement file cannot be
found.
- Throws: IOException
- Thrown if an IO problem occurs while reading
the MBElement file.
- See Also:
- MBElement
createMBElement
public MBElement createMBElement(Class c,
String moniker,
byte b[],
ManagedBean mb) throws InstantiationException, IllegalAccessException, InstantiationError
- Note: createMBElement() is deprecated.
- Creates an MBElement and adds it to the specified
ManagedBean.
- Parameters:
- c - The MBElement subclass to be instantiated.
- moniker - The moniker of this new MBElement subclass.
- b - The ByteArray associated with this MBElement.
- mb - The ManagedBean with which this MBElement will be associated.
- Returns:
- The instantiated MBElement subclass.
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- See Also:
- MBElement
createCommonMBElement
public MBElement createCommonMBElement(Class c,
String moniker,
File elementFile,
ManagedBean mb) throws InstantiationException, IllegalAccessException, FileNotFoundException, IOException, InstantiationError
- Note: createCommonMBElement() is deprecated.
- Creates an MBElement and adds it to
the specified ManagedBean as a common MBElement.
- Parameters:
- c - The MBElement subclass to be instantiated.
- moniker - The moniker of this new MBElement subclass.
- elementFile - The File associated with this BMElement.
- mb - The ManagedBean with which this MBElement will be associated.
- Returns:
- The instantiated MBElement subclass.
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- Throws: FileNotFoundException
- Thrown if the MBElement file cannot be
found.
- Throws: IOException
- Thrown if an IO problem occurs while reading
the MBElement file.
- See Also:
- MBElement
createCommonMBElement
public MBElement createCommonMBElement(Class c,
String moniker,
byte b[],
ManagedBean mb) throws InstantiationException, IllegalAccessException, InstantiationError
- Note: createCommonMBElement() is deprecated.
- Creates an MBElement and adds it to
the specified ManagedBean as a common MBElement.
- Parameters:
- c - The MBElement subclass to be instantiated.
- moniker - The moniker of this new MBElement subclass.
- b - The ByteArray associated with this MBElement.
- mb - The ManagedBean with which this MBElement will be associated.
- Returns:
- The instantiated MBElement subclass.
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- See Also:
- MBElement
copyMBElement
public MBElement copyMBElement(Class c,
MBElement mbe,
ManagedBean mb) throws InstantiationException, IllegalAccessException, InstantiationError
- Copies the specified MBElement into a new MBElement of the specified
type. This new MBElement is affiliated with ManagedBean mb.
MBElement properties are not copied.
- Parameters:
- c - The MBElement subclass to be instantiated.
- mbe - The MBElement to be copied.
- mb - The ManagedBean with which this MBElement will be affiliated.
- Returns:
- The instantiated MBElement subclass
- Throws: InstantiationException
- Thrown if newInstance() fails.
- Throws: IllegalAccessException
- Thrown if newInstance() fails.
- Throws: InstantiationError
- Thrown if argument c is not a valid
subclass of MBElement.
- See Also:
- MBElement
guessMBElementSubclass
public Class guessMBElementSubclass(String name)
- Guesses, based
on name, what kind of MBElement subclass is associated with a file of
this name. Information provided by the setBeanName() method is used
to assist in the guess.
- Parameters:
- name - The name that is used to generate the guess.
- Returns:
- The Class to which this name probably belongs.
guessMBElementSubclass
public Class guessMBElementSubclass(File f)
- Guesses,
based on the file name, what kind of MBElement subclass is
associated with a file of this name. Information provided by
the setBeanName() method is used to assist in the guessing.
- Parameters:
- f - The File that is used to generate the guess.
- Returns:
- The Class to which this File probably belongs.
setBeanName
public void setBeanName(String beanName)
- Sets beanName for use in guessing MBElement
subclasses.
- Parameters:
- beanName - The name to be used when name
guesses are made.
guessBeanNameFromStrings
public String guessBeanNameFromStrings(Vector sv)
- Guesses the name of a bean.
- Parameters:
- sv - The Vector of Strings containing the names used
to make a guess.
- Returns:
- The guessed bean name.
guessBeanNameFromFiles
public String guessBeanNameFromFiles(Vector fv)
- Guesses the name of a bean.
- Parameters:
- sv - The Vector of Files containing the names used
using to make a guess.
- Returns:
- The guessed bean name.
passthroughProperties
protected void passthroughProperties(MBElement mbe,
MBManifestSection section)
- Initializes an MBElement with passthrough properties from a
MBManifestSection.
- Parameters:
- mbe - MBElement to be initialized.
- section - MBManifestSection that provides the properties.
quickSortVector
public void quickSortVector(Vector v,
int first,
int last)
- QuickSorts the contents of a Vector of Strings, based on the
String values.
- Parameters:
- v - The Vector to be sorted.
- first - Index of the first element in the Vector to be sorted.
- last - Index of the last element in the Vector to be sorted.
All Packages Class Hierarchy This Package Previous Next Index