net.sourceforge.xmlfit.data.impl
Enum DataSourceFactoryImpl
java.lang.Object
java.lang.Enum<DataSourceFactoryImpl>
net.sourceforge.xmlfit.data.impl.DataSourceFactoryImpl
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<DataSourceFactoryImpl>, DataSourceFactory
public enum DataSourceFactoryImpl
- extends java.lang.Enum<DataSourceFactoryImpl>
- implements DataSourceFactory
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
INSTANCE
public static final DataSourceFactoryImpl INSTANCE
values
public static final DataSourceFactoryImpl[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(DataSourceFactoryImpl c : DataSourceFactoryImpl.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static DataSourceFactoryImpl valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
createDataSource
public DataSource createDataSource(java.lang.String fileName)
- Description copied from interface:
DataSourceFactory
- Create a DataSource for file, the file extension is used to selected the DataSource.
Example: File with the name *.xml a instance of a XMLDataSourceImpl will be return.
- Specified by:
createDataSource
in interface DataSourceFactory
- Parameters:
fileName
- the name of the DataSource file. For Example a XML File.
- Returns:
- a instance of a DataSource for the given file type.
extractFileExtension
protected java.lang.String extractFileExtension(java.lang.String fileName)
getClassForExension
protected java.lang.Class getClassForExension(java.lang.String extension)
Copyright © 2009. All Rights Reserved.