< prev index next >

src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/TypeUse.java

Print this page




  71      * as an ID.)
  72      *
  73      * <p>
  74      * The same thing can be said with IDREF. When Foo refers to Bar by means of
  75      * IDREF, neither Foo nor Bar is IDREF.
  76      *
  77      * <p>
  78      * That's why we have this method in {@link TypeUse}.
  79      */
  80     ID idUse();
  81 
  82     /**
  83      * A {@link TypeUse} can have an associated MIME type.
  84      */
  85     MimeType getExpectedMimeType();
  86 
  87     /**
  88      * Creates a constant for the given lexical value.
  89      *
  90      * <p>
  91      * For example, to create a constant 1 for <tt>xs:int</tt>, you'd do:
  92      * <pre>
  93      * CBuiltinLeafInfo.INT.createConstant( codeModel, "1", null );
  94      * </pre>
  95      *
  96      * <p>
  97      * This method is invoked at the backend as a part of the code generation process.
  98      *
  99      * @throws IllegalStateException
 100      *      if the type isn't bound to a text in XML.
 101      *
 102      * @return null
 103      *      if the constant cannot be created for this {@link TypeUse}
 104      *      (such as when it's a collection)
 105      */
 106     JExpression createConstant(Outline outline, XmlString lexical);
 107 }


  71      * as an ID.)
  72      *
  73      * <p>
  74      * The same thing can be said with IDREF. When Foo refers to Bar by means of
  75      * IDREF, neither Foo nor Bar is IDREF.
  76      *
  77      * <p>
  78      * That's why we have this method in {@link TypeUse}.
  79      */
  80     ID idUse();
  81 
  82     /**
  83      * A {@link TypeUse} can have an associated MIME type.
  84      */
  85     MimeType getExpectedMimeType();
  86 
  87     /**
  88      * Creates a constant for the given lexical value.
  89      *
  90      * <p>
  91      * For example, to create a constant 1 for {@code xs:int}, you'd do:
  92      * <pre>
  93      * CBuiltinLeafInfo.INT.createConstant( codeModel, "1", null );
  94      * </pre>
  95      *
  96      * <p>
  97      * This method is invoked at the backend as a part of the code generation process.
  98      *
  99      * @throws IllegalStateException
 100      *      if the type isn't bound to a text in XML.
 101      *
 102      * @return null
 103      *      if the constant cannot be created for this {@link TypeUse}
 104      *      (such as when it's a collection)
 105      */
 106     JExpression createConstant(Outline outline, XmlString lexical);
 107 }
< prev index next >