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
 void adaptType(TypeBinding adaptedType, JBossXmlAdaptedType annotation)
          Generate an adapted type
 SchemaBinding build()
          Build the schema
 void build(SchemaBinding schema)
          Builds schema binding components from the class and adds them to the SchemaBinding passed in the argument.
protected  void createRootElementBinding(org.jboss.reflect.spi.TypeInfo typeInfo)
          Create a root element binding
protected  void createRootElements()
          Create the root elements
 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 initBuilder()
          Initialise the builder
 boolean isSequenceRequirePropOrder()
           
 TypeBinding isSimpleType(org.jboss.reflect.spi.TypeInfo typeInfo)
          Check whether this is a simple type
 boolean isUseUnorderedSequence()
           
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
 void setSequencesRequirePropOrder(boolean sequencesRequirePropOrder)
           
 void setUseUnorderedSequence(boolean useUnorderedSequence)
           
 
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

isUseUnorderedSequence

public boolean isUseUnorderedSequence()

setUseUnorderedSequence

public void setUseUnorderedSequence(boolean useUnorderedSequence)

isSequenceRequirePropOrder

public boolean isSequenceRequirePropOrder()

setSequencesRequirePropOrder

public void setSequencesRequirePropOrder(boolean sequencesRequirePropOrder)

build

public SchemaBinding build()
Build the schema

Returns:
the schema

build

public void build(SchemaBinding schema)
Builds schema binding components from the class and adds them to the SchemaBinding passed in the argument. Note, schema initialization step (processing of schema-related class- and package-level annotations) will be skipped.

Parameters:
schema - SchemaBinding to add the built binding components to

initBuilder

protected void initBuilder()
Initialise the builder


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

adaptType

public void adaptType(TypeBinding adaptedType,
                      JBossXmlAdaptedType annotation)
Generate an adapted type

Parameters:
adaptedType - the information about the adaption

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


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.