Package com.jbstrap.core.cache
Enum Class DataDescriptorTypeCache
- All Implemented Interfaces:
Serializable
,Comparable<DataDescriptorTypeCache>
,Constable
- Since:
- 4.0
- Author:
- JBStrap
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(String name, Class<? extends DataDescriptor> dataDescriptorClass) fromClass
(Class<? extends DataDescriptor> dataDescriptorClass) static DataDescriptorTypeCache
Returns the enum constant of this class with the specified name.static DataDescriptorTypeCache[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
add
- Parameters:
name
- Unique DataDescriptor name You can specify any text name here that should be unique within the application. Use the specified name to reference the DataDescriptor type in the program logic or in the XML file’sconnectorType
attribute in the <dataSource> tag.dataDescriptorClass
- Class implementing the DataDescriptor to be added- Throws:
NullPointerException
- Thrown if the specified DataDescriptor name or class isnull
IllegalArgumentException
- Thrown if the specified class does not contain a constructor that the framework uses to instantiate the DataDescriptor or if there already a DataDescriptor type with that name in the framework.
-
fromName
- Parameters:
name
- DataDescriptor type name- Returns:
- DataDescriptor type name or
null
if there is no DataDescriptor with the specified name in the framework
-
fromClass
- Parameters:
dataDescriptorClass
- The DataDescriptor’s implementing class that also contains the DataDescriptor type- Returns:
- DataDescriptor type for the specified class, or
null
, if there is no corresponding DataDescriptor type for the specified class
-