org.codehaus.enunciate.contract.jaxws
Class WebParam

java.lang.Object
  extended by net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
      extended by net.sf.jelly.apt.decorations.declaration.DecoratedParameterDeclaration
          extended by org.codehaus.enunciate.contract.jaxws.WebParam
All Implemented Interfaces:
com.sun.mirror.declaration.Declaration, com.sun.mirror.declaration.ParameterDeclaration, Adaptable, ImplicitChildElement, ImplicitSchemaElement, WebMessage, WebMessagePart

public class WebParam
extends net.sf.jelly.apt.decorations.declaration.DecoratedParameterDeclaration
implements Adaptable, WebMessage, WebMessagePart, ImplicitChildElement

Author:
Ryan Heaton

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.codehaus.enunciate.contract.jaxws.WebMessagePart
WebMessagePart.ParticleType
 
Field Summary
 
Fields inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
delegate, javaDoc
 
Constructor Summary
protected WebParam(com.sun.mirror.declaration.ParameterDeclaration delegate, WebMethod method, int parameterIndex)
           
 
Method Summary
 AdapterType getAdapterType()
          The class type of the adaptor.
 java.lang.String getBaseParamName()
          The base param name.
 java.lang.String getClientSimpleName()
          The simple name for client-side code generation.
 java.lang.String getElementDocs()
          The doc comment associated with this web param.
 java.lang.String getElementName()
          The element name of this web param.
 java.lang.String getMaxOccurs()
          The max occurs of this parameter as a child element.
 java.lang.String getMessageDocs()
          There is only message documentation if this web parameter is BARE.
 java.lang.String getMessageName()
          The message name of the message for this parameter, if this is a BARE web param.
 java.lang.String getMimeType()
          The mime type for this child element (for binary data), or null if not applicable.
 int getMinOccurs()
          The min occurs of this parameter as a child element.
 javax.jws.WebParam.Mode getMode()
          The mode of this web param.
 java.lang.String getPartDocs()
          There is only part documentation if this web parameter is not BARE.
 javax.xml.namespace.QName getParticleQName()
          The qname of the particle for this parameter.
 WebMessagePart.ParticleType getParticleType()
          If the web method style is RPC, the particle type is TYPE.
 java.lang.String getPartName()
          The part name of the message for this parameter.
 java.util.Collection<WebMessagePart> getParts()
          If this web param is complex, it will only have one part: itself.
 java.lang.String getTargetNamespace()
          The target namespace of this web param.
 com.sun.mirror.type.TypeMirror getType()
          Gets the java type for this child element.
 javax.xml.namespace.QName getTypeQName()
          The qname of the xml type type of this parameter.
 WebMethod getWebMethod()
          The web method for this web param.
 XmlType getXmlType()
          Gets the xml type for this web parameter.
 boolean isAdapted()
          Whether this element is adapted according to the JAXB spec.
 boolean isFault()
          Whether this message is a web fault.
 boolean isHeader()
          Whether this is a header param.
 boolean isHolder()
          Whether the parameter type is a holder.
 boolean isImplicitSchemaElement()
          This web parameter defines an implicit schema element if it is DOCUMENT binding style and either BARE or a header.
 boolean isInput()
          Whether this is an input message depends on its mode.
 boolean isOutput()
          Whether this is an output message depends on its mode.
 boolean isSwaRef()
          Whether this child element is an attachment ref.
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedParameterDeclaration
accept, getDocComment
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
constructJavaDoc, equals, getAnnotation, getAnnotationMirrors, getAnnotations, getDelegate, getDocValue, getJavaDoc, getModifiers, getPosition, getSimpleName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.codehaus.enunciate.contract.jaxb.ImplicitSchemaElement
getPosition
 
Methods inherited from interface com.sun.mirror.declaration.Declaration
equals, getAnnotation, getAnnotationMirrors, getModifiers, getPosition, getSimpleName
 

Constructor Detail

WebParam

protected WebParam(com.sun.mirror.declaration.ParameterDeclaration delegate,
                   WebMethod method,
                   int parameterIndex)
Method Detail

getBaseParamName

public java.lang.String getBaseParamName()
The base param name.

Returns:
The base param name.

getWebMethod

public WebMethod getWebMethod()
The web method for this web param.

Specified by:
getWebMethod in interface WebMessagePart
Returns:
The web method for this web param.

getElementName

public java.lang.String getElementName()
The element name of this web param.

Specified by:
getElementName in interface ImplicitSchemaElement
Returns:
The element name of this web param.

getTargetNamespace

public java.lang.String getTargetNamespace()
The target namespace of this web param.

Specified by:
getTargetNamespace in interface ImplicitSchemaElement
Returns:
The target namespace of this web param.

getClientSimpleName

public java.lang.String getClientSimpleName()
The simple name for client-side code generation.

Returns:
The simple name for client-side code generation.

getElementDocs

public java.lang.String getElementDocs()
The doc comment associated with this web param.

Specified by:
getElementDocs in interface ImplicitSchemaElement
Returns:
The doc comment associated with this web param.

getPartName

public java.lang.String getPartName()
The part name of the message for this parameter.

Specified by:
getPartName in interface WebMessagePart
Returns:
The part name of the message for this parameter.

getMessageName

public java.lang.String getMessageName()
The message name of the message for this parameter, if this is a BARE web param.

Specified by:
getMessageName in interface WebMessage
Returns:
The message name of the message for this parameter, or null if this is not a BARE web param.

getMessageDocs

public java.lang.String getMessageDocs()
There is only message documentation if this web parameter is BARE.

Specified by:
getMessageDocs in interface WebMessage
Returns:
The documentation if BARE, null otherwise.

getPartDocs

public java.lang.String getPartDocs()
There is only part documentation if this web parameter is not BARE.

Specified by:
getPartDocs in interface WebMessagePart
Returns:
null if BARE, the documantation otherwise.

getParticleType

public WebMessagePart.ParticleType getParticleType()
If the web method style is RPC, the particle type is TYPE. Otherwise, it's ELEMENT.

Specified by:
getParticleType in interface WebMessagePart
Returns:
The particle type.

getParticleQName

public javax.xml.namespace.QName getParticleQName()
The qname of the particle for this parameter. If the particle type is TYPE then it's the qname of the xml type. Otherwise, it's the qname of the implicit schema element.

Specified by:
getParticleQName in interface WebMessagePart
Returns:
The qname of the particle for this part.

isImplicitSchemaElement

public boolean isImplicitSchemaElement()
This web parameter defines an implicit schema element if it is DOCUMENT binding style and either BARE or a header.

Specified by:
isImplicitSchemaElement in interface WebMessagePart
Returns:
Whether this web parameter is an implicit schema element.

getTypeQName

public javax.xml.namespace.QName getTypeQName()
The qname of the xml type type of this parameter.

Specified by:
getTypeQName in interface ImplicitChildElement
Specified by:
getTypeQName in interface ImplicitSchemaElement
Returns:
The qname of the type of this parameter.
Throws:
ValidationException - If the type is anonymous or otherwise problematic.

getType

public com.sun.mirror.type.TypeMirror getType()
Description copied from interface: ImplicitChildElement
Gets the java type for this child element.

Specified by:
getType in interface com.sun.mirror.declaration.ParameterDeclaration
Specified by:
getType in interface ImplicitChildElement
Overrides:
getType in class net.sf.jelly.apt.decorations.declaration.DecoratedParameterDeclaration
Returns:
The xml type.

getXmlType

public XmlType getXmlType()
Gets the xml type for this web parameter.

Specified by:
getXmlType in interface ImplicitChildElement
Returns:
The xml type.

getMimeType

public java.lang.String getMimeType()
Description copied from interface: ImplicitChildElement
The mime type for this child element (for binary data), or null if not applicable.

Specified by:
getMimeType in interface ImplicitChildElement
Returns:
The mime type or null.

isSwaRef

public boolean isSwaRef()
Description copied from interface: ImplicitChildElement
Whether this child element is an attachment ref.

Specified by:
isSwaRef in interface ImplicitChildElement
Returns:
Whether this child element is an attachment ref.

getMinOccurs

public int getMinOccurs()
The min occurs of this parameter as a child element.

Specified by:
getMinOccurs in interface ImplicitChildElement
Returns:
1 if primitive. 0 otherwise.

getMaxOccurs

public java.lang.String getMaxOccurs()
The max occurs of this parameter as a child element.

Specified by:
getMaxOccurs in interface ImplicitChildElement
Returns:
The max occurs of this parameter as a child element.

getMode

public javax.jws.WebParam.Mode getMode()
The mode of this web param.

Returns:
The mode of this web param.

isHeader

public boolean isHeader()
Whether this is a header param.

Specified by:
isHeader in interface WebMessage
Returns:
Whether this is a header param.

isInput

public boolean isInput()
Whether this is an input message depends on its mode.

Specified by:
isInput in interface WebMessage
Returns:
Whether this is an input message depends on its mode.

isOutput

public boolean isOutput()
Whether this is an output message depends on its mode.

Specified by:
isOutput in interface WebMessage
Returns:
Whether this is an output message depends on its mode.

isHolder

public boolean isHolder()
Whether the parameter type is a holder.

Returns:
Whether the parameter type is a holder.

isFault

public boolean isFault()
Description copied from interface: WebMessage
Whether this message is a web fault.

Specified by:
isFault in interface WebMessage
Returns:
false

getParts

public java.util.Collection<WebMessagePart> getParts()
If this web param is complex, it will only have one part: itself.

Specified by:
getParts in interface WebMessage
Returns:
this.
Throws:
java.lang.UnsupportedOperationException - if this web param isn't complex.

isAdapted

public boolean isAdapted()
Description copied from interface: Adaptable
Whether this element is adapted according to the JAXB spec.

Specified by:
isAdapted in interface Adaptable
Returns:
Whether the element is adapted.

getAdapterType

public AdapterType getAdapterType()
Description copied from interface: Adaptable
The class type of the adaptor.

Specified by:
getAdapterType in interface Adaptable
Returns:
The class type of the adaptor.