com.sun.tools.xjc.reader.xmlschema
Class ClassSelector

java.lang.Object
  extended by com.sun.tools.xjc.reader.xmlschema.BindingComponent
      extended by com.sun.tools.xjc.reader.xmlschema.ClassSelector

public final class ClassSelector
extends BindingComponent

Manages association between XSComponents and generated CTypeInfos.

This class determines which component is mapped to (or is not mapped to) what types.


Constructor Summary
ClassSelector()
           
 
Method Summary
 CClass bindToType(com.sun.xml.xsom.XSComplexType t, com.sun.xml.xsom.XSComponent referer, boolean cannotBeDelayed)
           
 CTypeInfo bindToType(com.sun.xml.xsom.XSComponent sc, com.sun.xml.xsom.XSComponent referer)
          Checks if the given component is being mapped to a type.
 CElement bindToType(com.sun.xml.xsom.XSElementDecl e, com.sun.xml.xsom.XSComponent referer)
           
 TypeUse bindToType(com.sun.xml.xsom.XSType t, com.sun.xml.xsom.XSComponent referer)
           
 void executeTasks()
          Runs all the pending build tasks.
 CClassInfoParent getClassScope()
          Gets the current class scope.
 CClassInfo getCurrentBean()
           
 com.sun.xml.xsom.XSComponent getCurrentRoot()
           
 com.sun.codemodel.JPackage getPackage(java.lang.String targetNamespace)
          Gets the Java package to which classes from this namespace should go.
 CElement isBound(com.sun.xml.xsom.XSElementDecl x, com.sun.xml.xsom.XSComponent referer)
          Checks if the given component is bound to a class.
 void popClassScope()
           
 void pushClassScope(CClassInfoParent clsFctry)
           
 void queueBuild(com.sun.xml.xsom.XSComponent sc, CElement bean)
           
 
Methods inherited from class com.sun.tools.xjc.reader.xmlschema.BindingComponent
getClassSelector, getErrorReporter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassSelector

public ClassSelector()
Method Detail

getClassScope

public final CClassInfoParent getClassScope()
Gets the current class scope.


pushClassScope

public final void pushClassScope(CClassInfoParent clsFctry)

popClassScope

public final void popClassScope()

getCurrentRoot

public com.sun.xml.xsom.XSComponent getCurrentRoot()

getCurrentBean

public CClassInfo getCurrentBean()

isBound

public final CElement isBound(com.sun.xml.xsom.XSElementDecl x,
                              com.sun.xml.xsom.XSComponent referer)
Checks if the given component is bound to a class.


bindToType

public CTypeInfo bindToType(com.sun.xml.xsom.XSComponent sc,
                            com.sun.xml.xsom.XSComponent referer)
Checks if the given component is being mapped to a type. If so, build that type and return that object. If it is not being mapped to a type item, return null.


bindToType

public CElement bindToType(com.sun.xml.xsom.XSElementDecl e,
                           com.sun.xml.xsom.XSComponent referer)

bindToType

public CClass bindToType(com.sun.xml.xsom.XSComplexType t,
                         com.sun.xml.xsom.XSComponent referer,
                         boolean cannotBeDelayed)

bindToType

public TypeUse bindToType(com.sun.xml.xsom.XSType t,
                          com.sun.xml.xsom.XSComponent referer)

executeTasks

public void executeTasks()
Runs all the pending build tasks.


queueBuild

public void queueBuild(com.sun.xml.xsom.XSComponent sc,
                       CElement bean)

getPackage

public com.sun.codemodel.JPackage getPackage(java.lang.String targetNamespace)
Gets the Java package to which classes from this namespace should go.

Usually, the getOuterClass method should be used to determine where to put a class.