org.jibx.ws.wsdl.tools.custom
Class ValueCustom

java.lang.Object
  extended by org.jibx.custom.classes.CustomBase
      extended by org.jibx.ws.wsdl.tools.custom.ValueCustom
Direct Known Subclasses:
CollectionValueCustom

public class ValueCustom
extends CustomBase

Method parameter or return value customization information.

Author:
Dennis M. Sosnoski

Field Summary
private  java.lang.String m_boundType
           
private  java.lang.String m_createType
           
private  java.util.List m_documentation
           
private  java.lang.String m_elementName
           
private  java.lang.String m_factoryMethod
           
private  boolean m_primitive
           
private  java.lang.Boolean m_required
           
private  java.lang.String m_type
           
private  java.lang.String m_valueName
           
static StringArray s_allowedAttributes
          Enumeration of allowed attribute names
private static org.apache.log4j.Logger s_logger
          Logger for class.
 
Fields inherited from class org.jibx.custom.classes.CustomBase
CAMEL_CASE_NAMES, DERIVE_BY_PACKAGE, DERIVE_FIXED, DERIVE_NONE, DOTTED_NAMES, HYPHENATED_NAMES, REQUIRE_ALL, REQUIRE_NONE, REQUIRE_OBJECTS, REQUIRE_PRIMITIVES, s_namespaceStyleEnum, s_nameStyleEnum, s_requireEnum, UNDERSCORED_NAMES, UPPER_CAMEL_CASE_NAMES
 
Constructor Summary
protected ValueCustom(NestingBase parent, java.lang.String name)
          Constructor.
 
Method Summary
private static CollectionValueCustom collectionParameterFactory(IUnmarshallingContext ictx)
          Parameter value unmarshalling factory.
private static CollectionValueCustom collectionReturnFactory(IUnmarshallingContext ictx)
          Return value unmarshalling factory.
(package private)  void complete(java.lang.String type, java.util.List docs, java.lang.Boolean req)
          Complete customization information based on supplied type.
 java.lang.String getBoundType()
          Get value type to be bound.
 java.lang.String getCreateType()
          Get member create type.
 java.util.List getDocumentation()
          Get value documentation node list.
 java.lang.String getElementName()
          Get XML element name.
 java.lang.String getFactoryMethod()
          Get factory method.
 java.lang.String getItemElementName()
          Get name for elements representing items in collection.
 java.lang.String getItemType()
          Get item type for parameterized list collection.
 java.lang.String getType()
          Get value type.
 java.lang.String getValueName()
          Get value name.
 boolean isRequired()
          Check if value is required.
private static ValueCustom parameterFactory(IUnmarshallingContext ictx)
          Parameter value unmarshalling factory.
private  void preSet(IUnmarshallingContext uctx)
          Make sure all attributes are defined.
private static ValueCustom returnFactory(IUnmarshallingContext ictx)
          Return value unmarshalling factory.
 void setElementName(java.lang.String name)
          Set XML element name.
 
Methods inherited from class org.jibx.custom.classes.CustomBase
convertName, deriveItemName, deriveNamespace, getContainingObject, getGlobal, getParent, packageOfType, packageToNamespace, validateAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_logger

private static final org.apache.log4j.Logger s_logger
Logger for class.


s_allowedAttributes

public static final StringArray s_allowedAttributes
Enumeration of allowed attribute names


m_primitive

private boolean m_primitive

m_boundType

private java.lang.String m_boundType

m_valueName

private java.lang.String m_valueName

m_elementName

private java.lang.String m_elementName

m_type

private java.lang.String m_type

m_createType

private java.lang.String m_createType

m_factoryMethod

private java.lang.String m_factoryMethod

m_required

private java.lang.Boolean m_required

m_documentation

private java.util.List m_documentation
Constructor Detail

ValueCustom

protected ValueCustom(NestingBase parent,
                      java.lang.String name)
Constructor.

Parameters:
parent -
name -
Method Detail

preSet

private void preSet(IUnmarshallingContext uctx)
Make sure all attributes are defined.

Parameters:
uctx - unmarshalling context

getValueName

public java.lang.String getValueName()
Get value name.

Returns:
name

getElementName

public java.lang.String getElementName()
Get XML element name.

Returns:
name

setElementName

public void setElementName(java.lang.String name)
Set XML element name.

Parameters:
name -

getType

public java.lang.String getType()
Get value type. This method should only be used after the complete(String, List, Boolean) method is called.

Returns:
value type

getItemType

public java.lang.String getItemType()
Get item type for parameterized list collection. This base class implementation always returns null.

Returns:
null

getBoundType

public java.lang.String getBoundType()
Get value type to be bound. This is the same as the plain value type for a simple (non-collection); for an array value, it's just the array item type; and for a non-array collection it takes the same form as a generic type declaration, with the actual item type enclosed in a less-than/greater-than sign pair following the base type.

Returns:
parmaterized type

getItemElementName

public java.lang.String getItemElementName()
Get name for elements representing items in collection. This base class implementation always returns null.

Returns:
null

getCreateType

public java.lang.String getCreateType()
Get member create type.

Returns:
type used for creating new instance (null if none)

getFactoryMethod

public java.lang.String getFactoryMethod()
Get factory method.

Returns:
method used for creating new instance (null if none)

isRequired

public boolean isRequired()
Check if value is required.

Returns:
true if required, false if not

getDocumentation

public java.util.List getDocumentation()
Get value documentation node list. This method should only be used after the complete(String, List, Boolean) method is called.

Returns:
list of documentation nodes (null if none)

complete

void complete(java.lang.String type,
              java.util.List docs,
              java.lang.Boolean req)
Complete customization information based on supplied type. If the type information has not previously been set, this will set it. It will also derive the appropriate XML name, if not previously set.

Parameters:
type - (null if none available)
docs - default documentation text (null if none)
req - required member flag (null if unknown)

parameterFactory

private static ValueCustom parameterFactory(IUnmarshallingContext ictx)
                                     throws JiBXException
Parameter value unmarshalling factory. This gets the containing element and the name so that the standard constructor can be used.

Parameters:
ictx -
Returns:
created instance
Throws:
JiBXException

returnFactory

private static ValueCustom returnFactory(IUnmarshallingContext ictx)
Return value unmarshalling factory. This gets the containing element so that the standard constructor can be used.

Parameters:
ictx -
Returns:
created instance

collectionParameterFactory

private static CollectionValueCustom collectionParameterFactory(IUnmarshallingContext ictx)
                                                         throws JiBXException
Parameter value unmarshalling factory. This gets the containing element and the name so that the standard constructor can be used.

Parameters:
ictx -
Returns:
created instance
Throws:
JiBXException

collectionReturnFactory

private static CollectionValueCustom collectionReturnFactory(IUnmarshallingContext ictx)
Return value unmarshalling factory. This gets the containing element so that the standard constructor can be used.

Parameters:
ictx -
Returns:
created instance


Project Web Site