Top Fields Constructors Methods
com.sun.tools.xjc.reader.relaxng

public final Class RELAXNGCompiler

extends Object
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .List, .Map, .Set, javax.xml.namespace.QName, com.sun.codemodel.JCodeModel, .JPackage, com.sun.tools.xjc.Options, com.sun.tools.xjc.model.CBuiltinLeafInfo, .CClassInfo, .CClassInfoParent, .CEnumConstant, .CEnumLeafInfo, .CNonElement, .CTypeInfo, .Model, .TypeUse, com.sun.tools.xjc.reader.Ring, org.glassfish.jaxb.core.api.impl.NameConverter, com.sun.tools.rngom.digested.DChoicePattern, .DDefine, .DElementPattern, .DPattern, .DPatternWalker, .DRefPattern, .DValuePattern, com.sun.tools.rngom.nc.NameClass, com.sun.tools.rngom.xml.util.WellKnownNamespaces

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
pack-priv final Map<CClassInfo, DPattern>
bindQueue

Classes that need to be bound.

pack-priv final Map<DPattern, CTypeInfo[]>
classes

Patterns that are mapped to Java concepts.

pack-priv final Map<String, DatatypeLib>
pack-priv final Set<DDefine>
defs

All named patterns in this schema.

pack-priv final DPattern
grammar

Schema to compile.

pack-priv final Model
pack-priv final Options
pack-priv final JPackage
pkg

The package to which we generate the code into.

pack-priv final TypeUseBinder

Constructor Summary

AccessConstructor and Description
public
RELAXNGCompiler(DPattern grammar, JCodeModel codeModel, Options opts)

Method Summary

Modifier and TypeMethod and Description
private void
public static Model
build(DPattern grammar, JCodeModel codeModel, Options opts)

private void
private void
private void
private void
promoteTypePatternsToClasses()

Looks for named patterns that are not bound to classes so far, but that can be bound to classes.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bindQueueback to summary
pack-priv final Map<CClassInfo, DPattern> bindQueue

Classes that need to be bound. The value is the content model to be bound.

classesback to summary
pack-priv final Map<DPattern, CTypeInfo[]> classes

Patterns that are mapped to Java concepts.

The value is an array because we map elements with finite names to multiple classes.

Todo

depending on the type of the key, the type of the values can be further restricted. Make this into its own class to represent those constraints better.

datatypesback to summary
pack-priv final Map<String, DatatypeLib> datatypes
defsback to summary
pack-priv final Set<DDefine> defs

All named patterns in this schema.

grammarback to summary
pack-priv final DPattern grammar

Schema to compile.

modelback to summary
pack-priv final Model model
optsback to summary
pack-priv final Options opts
pkgback to summary
pack-priv final JPackage pkg

The package to which we generate the code into.

typeUseBinderback to summary
pack-priv final TypeUseBinder typeUseBinder

Constructor Detail

RELAXNGCompilerback to summary
public RELAXNGCompiler(DPattern grammar, JCodeModel codeModel, Options opts)

Method Detail

bindContentModelback to summary
private void bindContentModel(CClassInfo clazz, DPattern pattern)
buildback to summary
public static Model build(DPattern grammar, JCodeModel codeModel, Options opts)
compileback to summary
private void compile()
mapToClassback to summary
private void mapToClass(DElementPattern p)
promoteElementDefsToClassesback to summary
private void promoteElementDefsToClasses()
promoteTypePatternsToClassesback to summary
private void promoteTypePatternsToClasses()

Looks for named patterns that are not bound to classes so far, but that can be bound to classes.

promoteTypeSafeEnumsback to summary
private void promoteTypeSafeEnums()