org.jboss.xb.builder
Class JBossXBNoSchemaBuilder

java.lang.Object
  extended by org.jboss.xb.builder.JBossXBNoSchemaBuilder

public class JBossXBNoSchemaBuilder
extends Object

JBossXBNoSchemaBuilder.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Constructor Summary
JBossXBNoSchemaBuilder(org.jboss.reflect.spi.ClassInfo root)
          Create a new JBossXBNoSchemaBuilder.
 
Method Summary
 SchemaBinding build()
          Build the schema
protected  void createRootElementBinding(org.jboss.reflect.spi.TypeInfo typeInfo)
          Create a root element binding
protected  void createRootElements()
          Create the root elements
protected  org.jboss.reflect.spi.TypeInfo findActualType(org.jboss.reflect.spi.ClassInfo classInfo, Type genericType, Class reference, int parameter)
           
protected  org.jboss.reflect.spi.TypeInfo findComponentType(org.jboss.reflect.spi.ClassInfo classInfo)
           
 TypeBinding generateAdaptedType(JBossXmlAdaptedType adaptedType)
          Generate an adapted type
 TypeBinding generateAnnotation(org.jboss.reflect.spi.ClassInfo typeInfo)
          Generate an annotation type binding
 TypeBinding generateArray(org.jboss.reflect.spi.ArrayInfo typeInfo)
          Generate an array type binding
 TypeBinding generateBean(org.jboss.reflect.spi.ClassInfo typeInfo)
          Generate a bean type binding
 TypeBinding generateBean(org.jboss.reflect.spi.ClassInfo typeInfo, boolean root)
          Generate a bean type binding
 TypeBinding generateCollection(org.jboss.reflect.spi.ClassInfo typeInfo)
          Generate a collection type binding
 TypeBinding generateEnum(org.jboss.reflect.spi.EnumInfo typeInfo)
          Generate an enum type binding
 TypeBinding generateMap(org.jboss.reflect.spi.ClassInfo typeInfo)
          Generate a map type binding
 TypeBinding generateType(org.jboss.reflect.spi.ClassInfo typeInfo, boolean root)
          Generate a bean type binding
protected  TypeBinding generateTypeBinding(org.jboss.reflect.spi.TypeInfo typeInfo)
          Generate a type binding
protected  QName generateXmlName(String localName, javax.xml.bind.annotation.XmlNsForm form, String namespace, String name)
          Create a new xml name
protected  QName generateXmlName(org.jboss.reflect.spi.TypeInfo typeInfo, javax.xml.bind.annotation.XmlNsForm form, String namespace, String name)
          Create a new xml name
 TypeBinding getSimpleType(org.jboss.reflect.spi.TypeInfo typeInfo)
          Get the simple type
protected  void initSchema()
          Initialise the schema
 TypeBinding isSimpleType(org.jboss.reflect.spi.TypeInfo typeInfo)
          Check whether this is a simple type
protected static Type locateActualType(Class reference, int parameter, Class clazz, Type type)
           
protected  void process(org.jboss.reflect.spi.TypeInfo typeInfo)
          Process a type
protected  TypeBinding resolveTypeBinding(org.jboss.reflect.spi.TypeInfo typeInfo)
          Resolve a type binding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossXBNoSchemaBuilder

public JBossXBNoSchemaBuilder(org.jboss.reflect.spi.ClassInfo root)
Create a new JBossXBNoSchemaBuilder.

Parameters:
root - the root class info
Throws:
IllegalArgumentException - for a null root class info
Method Detail

build

public SchemaBinding build()
Build the schema

Returns:
the schema

initSchema

protected void initSchema()
Initialise the schema


createRootElements

protected void createRootElements()
Create the root elements


createRootElementBinding

protected void createRootElementBinding(org.jboss.reflect.spi.TypeInfo typeInfo)
Create a root element binding

Parameters:
typeInfo - the type info

process

protected void process(org.jboss.reflect.spi.TypeInfo typeInfo)
Process a type

Parameters:
typeInfo - the type info

resolveTypeBinding

protected TypeBinding resolveTypeBinding(org.jboss.reflect.spi.TypeInfo typeInfo)
Resolve a type binding

Parameters:
typeInfo - the type info
Returns:
the type binding

generateTypeBinding

protected TypeBinding generateTypeBinding(org.jboss.reflect.spi.TypeInfo typeInfo)
Generate a type binding

Parameters:
typeInfo - the type info
Returns:
the type binding

generateEnum

public TypeBinding generateEnum(org.jboss.reflect.spi.EnumInfo typeInfo)
Generate an enum type binding

Parameters:
typeInfo - the type info
Returns:
the type binding

generateAdaptedType

public TypeBinding generateAdaptedType(JBossXmlAdaptedType adaptedType)
Generate an adapted type

Parameters:
adaptedType - the information about the adaption
Returns:
the type binding

generateAnnotation

public TypeBinding generateAnnotation(org.jboss.reflect.spi.ClassInfo typeInfo)
Generate an annotation type binding

Parameters:
typeInfo - the type info
Returns:
the type binding

generateArray

public TypeBinding generateArray(org.jboss.reflect.spi.ArrayInfo typeInfo)
Generate an array type binding

Parameters:
typeInfo - the type info
Returns:
the type binding

generateCollection

public TypeBinding generateCollection(org.jboss.reflect.spi.ClassInfo typeInfo)
Generate a collection type binding

Parameters:
typeInfo - the type info
Returns:
the type binding

generateMap

public TypeBinding generateMap(org.jboss.reflect.spi.ClassInfo typeInfo)
Generate a map type binding

Parameters:
typeInfo - the type info
Returns:
the type binding

isSimpleType

public TypeBinding isSimpleType(org.jboss.reflect.spi.TypeInfo typeInfo)
Check whether this is a simple type

Parameters:
typeInfo - the type info
Returns:
the type binding if it is simple

getSimpleType

public TypeBinding getSimpleType(org.jboss.reflect.spi.TypeInfo typeInfo)
Get the simple type

Parameters:
typeInfo - the type info
Returns:
the type binding if it is simple
Throws:
IllegalStateException - if the type is not bound

generateBean

public TypeBinding generateBean(org.jboss.reflect.spi.ClassInfo typeInfo)
Generate a bean type binding

Parameters:
typeInfo - the type info
Returns:
the type binding

generateBean

public TypeBinding generateBean(org.jboss.reflect.spi.ClassInfo typeInfo,
                                boolean root)
Generate a bean type binding

Parameters:
typeInfo - the type info
root - whether to force a root type
Returns:
the type binding

generateType

public TypeBinding generateType(org.jboss.reflect.spi.ClassInfo typeInfo,
                                boolean root)
Generate a bean type binding

Parameters:
typeInfo - the type info
root - whether to force a root type
Returns:
the type binding

generateXmlName

protected QName generateXmlName(org.jboss.reflect.spi.TypeInfo typeInfo,
                                javax.xml.bind.annotation.XmlNsForm form,
                                String namespace,
                                String name)
Create a new xml name

Parameters:
typeInfo - the type info
form - the namespace form
namespace - the override namespace
name - the override name
Returns:
the xml name

generateXmlName

protected QName generateXmlName(String localName,
                                javax.xml.bind.annotation.XmlNsForm form,
                                String namespace,
                                String name)
Create a new xml name

Parameters:
localName - the raw local name
form - the namespace form
namespace - the override namespace
name - the override name
Returns:
the xml name

findComponentType

protected org.jboss.reflect.spi.TypeInfo findComponentType(org.jboss.reflect.spi.ClassInfo classInfo)

findActualType

protected org.jboss.reflect.spi.TypeInfo findActualType(org.jboss.reflect.spi.ClassInfo classInfo,
                                                        Type genericType,
                                                        Class reference,
                                                        int parameter)

locateActualType

protected static Type locateActualType(Class reference,
                                       int parameter,
                                       Class clazz,
                                       Type type)


Copyright © 2007 JBoss Inc.. All Rights Reserved.