com.sun.tools.xjc.generator.bean
Class PackageOutlineImpl

java.lang.Object
  extended by com.sun.tools.xjc.generator.bean.PackageOutlineImpl
All Implemented Interfaces:
PackageOutline

final class PackageOutlineImpl
extends Object
implements PackageOutline

PackageOutline enhanced with schema2java specific information.


Field Summary
(package private)  Set<ClassOutlineImpl> classes
           
 
Constructor Summary
protected PackageOutlineImpl(BeanGenerator outline, Model model, com.sun.codemodel.JPackage _pkg)
           
 
Method Summary
 com.sun.codemodel.JPackage _package()
          The exposed package this context is representing.
 void calcDefaultValues()
          Compute the most common namespace URI in this package (to put into XmlSchema.namespace() and what value we should put into XmlSchema.elementFormDefault().
 Set<ClassOutlineImpl> getClasses()
          Gets ClassOutlines whose ClassOutline._package() points to this object.
 XmlNsForm getElementFormDefault()
          The element form default for this package.
 String getMostUsedNamespaceURI()
          The namespace URI most commonly used in classes in this package.
 com.sun.codemodel.JDefinedClass objectFactory()
          Generated ObjectFactory from package.
 ObjectFactoryGenerator objectFactoryGenerator()
          Generates an ObjectFactory class for this package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classes

final Set<ClassOutlineImpl> classes
Constructor Detail

PackageOutlineImpl

protected PackageOutlineImpl(BeanGenerator outline,
                             Model model,
                             com.sun.codemodel.JPackage _pkg)
Method Detail

getMostUsedNamespaceURI

public String getMostUsedNamespaceURI()
The namespace URI most commonly used in classes in this package. This should be used as the namespace URI for XmlSchema.namespace().

Null if no default

Specified by:
getMostUsedNamespaceURI in interface PackageOutline
See Also:
calcDefaultValues().

getElementFormDefault

public XmlNsForm getElementFormDefault()
The element form default for this package.

The value is computed by examining what would yield the smallest generated code.

Specified by:
getElementFormDefault in interface PackageOutline

_package

public com.sun.codemodel.JPackage _package()
Description copied from interface: PackageOutline
The exposed package this context is representing.

An exposed package is a package visible to users, a package supposed to be used by client applications. Sometime we have another parallel package that's not visible to users.

Specified by:
_package in interface PackageOutline

objectFactoryGenerator

public ObjectFactoryGenerator objectFactoryGenerator()
Description copied from interface: PackageOutline
Generates an ObjectFactory class for this package.

Specified by:
objectFactoryGenerator in interface PackageOutline

getClasses

public Set<ClassOutlineImpl> getClasses()
Description copied from interface: PackageOutline
Gets ClassOutlines whose ClassOutline._package() points to this object.

Specified by:
getClasses in interface PackageOutline
Returns:
can be empty but never null.

objectFactory

public com.sun.codemodel.JDefinedClass objectFactory()
Description copied from interface: PackageOutline
Generated ObjectFactory from package. This method allows a caller to obtain a reference to such ObjectFactory from its package. Must not be null.

Specified by:
objectFactory in interface PackageOutline

calcDefaultValues

public void calcDefaultValues()
Compute the most common namespace URI in this package (to put into XmlSchema.namespace() and what value we should put into XmlSchema.elementFormDefault(). This method is called after classes field is filled up.