|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.xjc.model.TypeUseImpl
final class TypeUseImpl
General-purpose TypeUse
implementation.
Constructor Summary | |
---|---|
TypeUseImpl(CNonElement itemType,
boolean collection,
ID id,
javax.activation.MimeType expectedMimeType,
CAdapter adapter)
|
Method Summary | |
---|---|
com.sun.codemodel.JExpression |
createConstant(Outline outline,
XmlString lexical)
Creates a constant for the given lexical value. |
boolean |
equals(Object o)
|
CAdapter |
getAdapterUse()
If this type use is adapting the type, returns the adapter. |
javax.activation.MimeType |
getExpectedMimeType()
A TypeUse can have an associated MIME type. |
CNonElement |
getInfo()
Individual item type. |
int |
hashCode()
|
ID |
idUse()
Whether the referenced type (individual item type in case of collection) is ID/IDREF. |
boolean |
isCollection()
If the use can hold multiple values of the specified type. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeUseImpl(CNonElement itemType, boolean collection, ID id, javax.activation.MimeType expectedMimeType, CAdapter adapter)
Method Detail |
---|
public boolean isCollection()
TypeUse
isCollection
in interface TypeUse
public CNonElement getInfo()
TypeUse
getInfo
in interface TypeUse
public CAdapter getAdapterUse()
TypeUse
getAdapterUse
in interface TypeUse
public ID idUse()
TypeUse
ID is a property of a relationship. When a bean Foo has an ID property called 'bar' whose type is String, Foo isn't an ID, String isn't an ID, but this relationship is an ID (in the sense that Foo uses this String as an ID.)
The same thing can be said with IDREF. When Foo refers to Bar by means of IDREF, neither Foo nor Bar is IDREF.
That's why we have this method in TypeUse
.
idUse
in interface TypeUse
public javax.activation.MimeType getExpectedMimeType()
TypeUse
TypeUse
can have an associated MIME type.
getExpectedMimeType
in interface TypeUse
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public com.sun.codemodel.JExpression createConstant(Outline outline, XmlString lexical)
TypeUse
For example, to create a constant 1 for xs:int, you'd do:
CBuiltinLeafInfo.INT.createConstant( codeModel, "1", null );
This method is invoked at the backend as a part of the code generation process.
createConstant
in interface TypeUse
TypeUse
(such as when it's a collection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |