com.sun.tools.xjc.reader.xmlschema
public final class ClassSelector extends BindingComponent
This class determines which component is mapped to (or is not mapped to) what types.
Field Summary | |
---|---|
Map<XSComponent,CElementInfo> | boundElements
UGLY HACK.
|
Constructor Summary | |
---|---|
ClassSelector() |
Method Summary | |
---|---|
CTypeInfo | bindToType(XSComponent sc, XSComponent referer)
Checks if the given component is being mapped to a type.
|
CElement | bindToType(XSElementDecl e, XSComponent referer) |
CClass | bindToType(XSComplexType t, XSComponent referer, boolean cannotBeDelayed) |
TypeUse | bindToType(XSType t, XSComponent referer) |
void | executeTasks()
Runs all the pending build tasks. |
CClassInfoParent | getClassScope() Gets the current class scope. |
CClassInfo | getCurrentBean() |
XSComponent | getCurrentRoot() |
JPackage | getPackage(String targetNamespace)
Gets the Java package to which classes from
this namespace should go.
|
CElement | isBound(XSElementDecl x, XSComponent referer)
Checks if the given component is bound to a class. |
void | popClassScope() |
void | pushClassScope(CClassInfoParent clsFctry) |
void | queueBuild(XSComponent sc, CElement bean) |
CTypeInfo | _bindToClass(XSComponent sc, XSComponent referer, boolean cannotBeDelayed)
The real meat of the "bindToType" code.
|
To avoid cyclic dependency between binding elements and types, we need additional markers that tell which elements are definitely not bound to a class.
the cyclic dependency is as follows:
elements need to bind its types first, because otherwise it can't
determine T of JAXBElement
Usually, the getOuterClass method should be used to determine where to put a class.
Parameters: cannotBeDelayed if the binding of the body of the class cannot be defered and needs to be done immediately. If the flag is false, the binding of the body will be done later, to avoid cyclic binding problem. referer The component that refers to sc. This can be null, if figuring out the referer is too hard, in which case the error message might be less user friendly.