|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.jaxme.generator.sg.impl.SimpleTypeSGImpl
| Constructor Summary | |
SimpleTypeSGImpl(SimpleTypeSGChain o)
|
|
| Method Summary | |
void |
addValidation(JavaMethod pMethod,
DirectAccessible pValue)
Adds code for validating the value pValue to the "add" or
"set" method pMethod. |
void |
forAllNonNullValues(JavaMethod pMethod,
java.lang.Object pValue,
SGlet pSGlet)
Invokes the given SGlet on any non null value. |
void |
forAllValues(JavaMethod pMethod,
java.lang.Object pValue,
SGlet pSGlet)
Invokes the given SGlet on any value, assuming they
are non null. |
void |
generate()
Generates helper classes required by the simple type. |
void |
generate(JavaSource pSource)
Generates helper classes required by the simple type. |
AtomicTypeSG |
getAtomicType()
If the simple type is atomic: Returns its atomic type details. |
TypedValue |
getCastFromString(JavaMethod pMethod,
java.lang.Object pValue,
java.lang.Object pData)
Returns a piece of Java code converting the string pValue
into the runtime type. |
TypedValue |
getCastFromString(java.lang.String pValue)
Returns a piece of Java code converting the string pValue
into the runtime type. |
TypedValue |
getCastToString(JavaMethod pMethod,
java.lang.Object pValue,
DirectAccessible pData)
Returns a piece of Java code converting the runtime type pValue into a string. |
java.lang.String |
getCollectionType()
Returns the collection type, which is either of "indexed" (an array) or a list implementation, as specified by JAXB's property tag. |
java.lang.Object |
getEqualsCheck(JavaMethod pMethod,
java.lang.Object pValue1,
java.lang.Object pValue2)
Returns code creating a boolean value indicating whether the given values are equal. |
Facet |
getFacet(Facet.Type pType)
Returns the simple types facets with the given type or null, if no such facet exists. |
Facet[] |
getFacets()
Returns all of the simple types facets. |
SGFactory |
getFactory()
Returns the factory that created this item. |
SimpleTypeSGChain |
getHeadOfChain()
|
java.lang.Object |
getInitialValue(JavaSource pSource)
Returns the types initial value, as created by the constructor. |
ListTypeSG |
getListType()
If the simple type is a list: Returns its item type details. |
org.xml.sax.Locator |
getLocator()
Returns the items location in the schema; useful for error messages. |
JavaQName |
getRuntimeType()
Returns the data types runtime type. |
SchemaSG |
getSchema()
Returns the items schema. |
UnionTypeSG |
getUnionType()
If the simple type is a union: Returns its union type details. |
JavaMethod |
getXMLSetMethod(JavaSource pSource,
java.lang.String pFieldName,
java.lang.String pParamName,
java.lang.String pMethodName)
Generates a set method for the simple type. |
boolean |
hasSetMethod()
Returns whether the simple type does have a "set" method. |
void |
init()
Initializes the item. |
boolean |
isAtomic()
Returns whether the simple type is atomic. |
boolean |
isCausingParseConversionEvent()
Returns whether converting this type from a string can cause a ParseConversionEvent. |
boolean |
isList()
Returns whether the simple type is a list. |
boolean |
isNullable()
Returns whether the simple type is nullable. |
boolean |
isUnion()
Returns whether the simple type is a union. |
void |
setNullable(boolean pNullable)
Sets whether the simple type is nullable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleTypeSGImpl(SimpleTypeSGChain o)
| Method Detail |
public boolean isAtomic()
SimpleTypeSGReturns whether the simple type is atomic.
isAtomic in interface SimpleTypeSGpublic boolean isList()
SimpleTypeSGReturns whether the simple type is a list.
isList in interface SimpleTypeSGpublic boolean isUnion()
SimpleTypeSGReturns whether the simple type is a union.
isUnion in interface SimpleTypeSGpublic boolean isNullable()
SimpleTypeSGReturns whether the simple type is nullable.
isNullable in interface SimpleTypeSGpublic void setNullable(boolean pNullable)
SimpleTypeSGSets whether the simple type is nullable.
setNullable in interface SimpleTypeSGpublic AtomicTypeSG getAtomicType()
SimpleTypeSGIf the simple type is atomic: Returns its atomic type details.
getAtomicType in interface SimpleTypeSGpublic ListTypeSG getListType()
SimpleTypeSGIf the simple type is a list: Returns its item type details.
getListType in interface SimpleTypeSGpublic UnionTypeSG getUnionType()
SimpleTypeSGIf the simple type is a union: Returns its union type details.
getUnionType in interface SimpleTypeSGpublic JavaQName getRuntimeType()
SimpleTypeSGReturns the data types runtime type.
getRuntimeType in interface SimpleTypeSGpublic boolean isCausingParseConversionEvent()
SimpleTypeSGParseConversionEvent.
isCausingParseConversionEvent in interface SimpleTypeSG
public TypedValue getCastFromString(JavaMethod pMethod,
java.lang.Object pValue,
java.lang.Object pData)
throws org.xml.sax.SAXException
SimpleTypeSGReturns a piece of Java code converting the string pValue
into the runtime type. Conversion occurs at runtime, using the
given instance of JMUnmarshallerHandler.
getCastFromString in interface SimpleTypeSGpMethod - The method performing the type convertion.pValue - The value being castedpData - A piece of Java code holding an instance of
JMUnmarshallerHandler;
may be used to support the conversion.
org.xml.sax.SAXException
public TypedValue getCastToString(JavaMethod pMethod,
java.lang.Object pValue,
DirectAccessible pData)
throws org.xml.sax.SAXException
SimpleTypeSGReturns a piece of Java code converting the runtime type
pValue into a string. Conversion occurs at runtime, using the
given instance of JMUnmarshallerHandlerImpl.
getCastToString in interface SimpleTypeSGorg.xml.sax.SAXException
public TypedValue getCastFromString(java.lang.String pValue)
throws org.xml.sax.SAXException
SimpleTypeSGReturns a piece of Java code converting the string pValue
into the runtime type. Conversion occurs at compile time.
getCastFromString in interface SimpleTypeSGorg.xml.sax.SAXException
public boolean hasSetMethod()
throws org.xml.sax.SAXException
SimpleTypeSGReturns whether the simple type does have a "set" method.
hasSetMethod in interface SimpleTypeSGorg.xml.sax.SAXExceptionpublic java.lang.String getCollectionType()
SimpleTypeSGReturns the collection type, which is either of "indexed" (an array) or a list implementation, as specified by JAXB's property tag.
getCollectionType in interface SimpleTypeSGpublic Facet[] getFacets()
SimpleTypeSGReturns all of the simple types facets.
getFacets in interface SimpleTypeSGpublic Facet getFacet(Facet.Type pType)
SimpleTypeSGReturns the simple types facets with the given type or null, if no such facet exists.
getFacet in interface SimpleTypeSG
public void forAllValues(JavaMethod pMethod,
java.lang.Object pValue,
SGlet pSGlet)
throws org.xml.sax.SAXException
SimpleTypeSGInvokes the given SGlet on any value, assuming they
are non null.
forAllValues in interface SimpleTypeSGorg.xml.sax.SAXException
public void forAllNonNullValues(JavaMethod pMethod,
java.lang.Object pValue,
SGlet pSGlet)
throws org.xml.sax.SAXException
SimpleTypeSGInvokes the given SGlet on any non null value.
forAllNonNullValues in interface SimpleTypeSGorg.xml.sax.SAXException
public void generate()
throws org.xml.sax.SAXException
SimpleTypeSGGenerates helper classes required by the simple type.
generate in interface SimpleTypeSGorg.xml.sax.SAXException
public void generate(JavaSource pSource)
throws org.xml.sax.SAXException
SimpleTypeSGGenerates helper classes required by the simple type. The generated classes are inner classes of the given.
generate in interface SimpleTypeSGorg.xml.sax.SAXException
public java.lang.Object getEqualsCheck(JavaMethod pMethod,
java.lang.Object pValue1,
java.lang.Object pValue2)
throws org.xml.sax.SAXException
SimpleTypeSGReturns code creating a boolean value indicating whether the given values are equal.
getEqualsCheck in interface SimpleTypeSGorg.xml.sax.SAXException
public java.lang.Object getInitialValue(JavaSource pSource)
throws org.xml.sax.SAXException
SimpleTypeSGReturns the types initial value, as created by the constructor.
getInitialValue in interface SimpleTypeSGorg.xml.sax.SAXException
public JavaMethod getXMLSetMethod(JavaSource pSource,
java.lang.String pFieldName,
java.lang.String pParamName,
java.lang.String pMethodName)
throws org.xml.sax.SAXException
SimpleTypeSGGenerates a set method for the simple type.
getXMLSetMethod in interface SimpleTypeSGorg.xml.sax.SAXException
public void addValidation(JavaMethod pMethod,
DirectAccessible pValue)
throws org.xml.sax.SAXException
SimpleTypeSGAdds code for validating the value pValue to the "add" or
"set" method pMethod.
addValidation in interface SimpleTypeSGorg.xml.sax.SAXExceptionpublic SGFactory getFactory()
SGItemReturns the factory that created this item.
getFactory in interface SGItempublic SchemaSG getSchema()
SGItemReturns the items schema.
getSchema in interface SGItempublic org.xml.sax.Locator getLocator()
SGItemReturns the items location in the schema; useful for error messages.
getLocator in interface SGItem
public void init()
throws org.xml.sax.SAXException
SGItemInitializes the item.
init in interface SGItemorg.xml.sax.SAXExceptionpublic SimpleTypeSGChain getHeadOfChain()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||