org.jvnet.jaxb.reflection
Class JAXBModelFactory

java.lang.Object
  extended by org.jvnet.jaxb.reflection.JAXBModelFactory

public abstract class JAXBModelFactory
extends java.lang.Object

Factory methods to build JAXB models.


Method Summary
static
<T,C,F,M> TypeInfoSet<T,C,F,M>
create(AnnotationReader<T,C,F,M> reader, Navigator<T,C,F,M> navigator, ErrorHandler errorHandler, java.util.Collection<C> classes)
          Creates a new JAXB model from classes represented in arbitrary reflection library.
static RuntimeTypeInfoSet create(java.lang.Class... classes)
          Creates a new JAXB model from classes represented in java.lang.reflect.
static RuntimeTypeInfoSet create(ErrorHandler errorHandler, java.lang.Class... classes)
          Creates a new JAXB model from classes represented in java.lang.reflect.
static RuntimeTypeInfoSet create(RuntimeAnnotationReader reader, ErrorHandler errorHandler, java.lang.Class... classes)
          Creates a new JAXB model from classes represented in java.lang.reflect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static <T,C,F,M> TypeInfoSet<T,C,F,M> create(AnnotationReader<T,C,F,M> reader,
                                                    Navigator<T,C,F,M> navigator,
                                                    ErrorHandler errorHandler,
                                                    java.util.Collection<C> classes)
Creates a new JAXB model from classes represented in arbitrary reflection library.

Parameters:
reader - used to read annotations from classes. must not be null.
navigator - abstraction layer of the underlying Java reflection library. must not be null.
errorHandler - Receives errors found during the processing.
Returns:
null if any error was reported during the processing. If no error is reported, a non-null valid object.

create

public static RuntimeTypeInfoSet create(RuntimeAnnotationReader reader,
                                        ErrorHandler errorHandler,
                                        java.lang.Class... classes)
Creates a new JAXB model from classes represented in java.lang.reflect.

Parameters:
reader - used to read annotations from classes. must not be null.
errorHandler - Receives errors found during the processing.
Returns:
null if any error was reported during the processing. If no error is reported, a non-null valid object.

create

public static RuntimeTypeInfoSet create(ErrorHandler errorHandler,
                                        java.lang.Class... classes)
Creates a new JAXB model from classes represented in java.lang.reflect.

This version reads annotations from the classes directly.

Parameters:
errorHandler - Receives errors found during the processing.
Returns:
null if any error was reported during the processing. If no error is reported, a non-null valid object.

create

public static RuntimeTypeInfoSet create(java.lang.Class... classes)
                                 throws IllegalAnnotationsException
Creates a new JAXB model from classes represented in java.lang.reflect.

This version reads annotations from the classes directly, and throw any error reported as an exception

Returns:
null if any error was reported during the processing. If no error is reported, a non-null valid object.
Throws:
IllegalAnnotationsException - if there was any incorrect use of annotations in the specified set of classes.