Classes | Static Public Member Functions

org.exolab.castor.mapping.loader.CollectionHandlers Class Reference

List of all members.

Classes

class  EmptyEnumerator
class  Info

Static Public Member Functions

static Class getCollectionType (String name) throws MappingException
static boolean hasHandler (Class javaClass)
static String getCollectionName (Class javaClass)
static CollectionHandler getHandler (Class javaClass) throws MappingException
static boolean isGetSetCollection (Class javaClass) throws MappingException

Detailed Description

Utility class for obtaining collection handlers. Based on the configuration and supported classes it will return collections suitable for Java 1.1 and Java 1.2 run times.

Author:
Assaf Arkin
Version:
Revision:
1.2
Date:
2003/03/03 09:57:16
See also:
CollectionHandler

Member Function Documentation

static String org.exolab.castor.mapping.loader.CollectionHandlers.getCollectionName ( Class  javaClass  )  [static]

Returns the associated string name for a given collection.

Parameters:
javaClass the class to search collection handlers for
Returns:
the string name for the given collection type or null if no association has been defined.
static Class org.exolab.castor.mapping.loader.CollectionHandlers.getCollectionType ( String  name  )  throws MappingException [static]

Returns the collection's Java class from the collection name. The collection name may be a short name (e.g. vector) or the collection Java class name (e.g. java.util.Vector). If the collection is not supported, an exception is thrown.

Parameters:
name The collection name
Returns:
The collection Java class
Exceptions:
MappingException The named collection is not supported
static CollectionHandler org.exolab.castor.mapping.loader.CollectionHandlers.getHandler ( Class  javaClass  )  throws MappingException [static]

Returns the collection's handler based on the Java class.

Parameters:
javaClass The collection's Java class
Returns:
The collection handler
Exceptions:
MappingException The collection class is not supported
static boolean org.exolab.castor.mapping.loader.CollectionHandlers.hasHandler ( Class  javaClass  )  [static]

Returns true if the given class has an associated CollectionHandler.

Parameters:
javaClass the class to search collection handlers for
Returns:
true if the given class has an associated CollectionHandler, otherwise false.
static boolean org.exolab.castor.mapping.loader.CollectionHandlers.isGetSetCollection ( Class  javaClass  )  throws MappingException [static]

Returns true if the collection requires get/set methods. java.util collections only require a get method, but an array collection required both get and set methods.

javaClass The collection's java class

Returns:
True if collection requires get/set methods, false if collection requires only get method
Exceptions:
MappingException The collection class is not supported

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties