|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.xjc.reader.xmlschema.BindingComponent
com.sun.tools.xjc.reader.xmlschema.ClassSelector
public final class ClassSelector
Manages association between XSComponent
s and generated
CTypeInfo
s.
This class determines which component is mapped to (or is not mapped to) what types.
Field Summary | |
---|---|
(package private) Map<XSComponent,CElementInfo> |
boundElements
UGLY HACK. |
Constructor Summary | |
---|---|
ClassSelector()
|
Method Summary | |
---|---|
(package private) CTypeInfo |
_bindToClass(XSComponent sc,
XSComponent referer,
boolean cannotBeDelayed)
The real meat of the "bindToType" code. |
CClass |
bindToType(XSComplexType t,
XSComponent referer,
boolean cannotBeDelayed)
|
CTypeInfo |
bindToType(XSComponent sc,
XSComponent referer)
Checks if the given component is being mapped to a type. |
CElement |
bindToType(XSElementDecl e,
XSComponent referer)
|
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()
|
com.sun.codemodel.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)
|
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 |
Field Detail |
---|
final Map<XSComponent,CElementInfo> boundElements
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
Constructor Detail |
---|
public ClassSelector()
Method Detail |
---|
public final CClassInfoParent getClassScope()
public final void pushClassScope(CClassInfoParent clsFctry)
public final void popClassScope()
public XSComponent getCurrentRoot()
public CClassInfo getCurrentBean()
public final CElement isBound(XSElementDecl x, XSComponent referer)
public CTypeInfo bindToType(XSComponent sc, XSComponent referer)
public CElement bindToType(XSElementDecl e, XSComponent referer)
public CClass bindToType(XSComplexType t, XSComponent referer, boolean cannotBeDelayed)
public TypeUse bindToType(XSType t, XSComponent referer)
CTypeInfo _bindToClass(@NotNull XSComponent sc, XSComponent referer, boolean cannotBeDelayed)
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.public void executeTasks()
public void queueBuild(XSComponent sc, CElement bean)
public com.sun.codemodel.JPackage getPackage(String targetNamespace)
Usually, the getOuterClass method should be used to determine where to put a class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |