Class ParameterImpl

java.lang.Object
com.sun.xml.ws.model.ParameterImpl
All Implemented Interfaces:
Parameter
Direct Known Subclasses:
WrapperParameter

public class ParameterImpl extends Object implements Parameter
runtime Parameter that abstracts the annotated java parameter

A parameter may be bound to a header, a body, or an attachment. Note that when it's bound to a body, it's bound to a body, it binds to the whole payload.

Sometimes multiple Java parameters are packed into the payload, in which case the subclass WrapperParameter is used.

Author:
Vivek Pandey
  • Constructor Details

    • ParameterImpl

      public ParameterImpl(JavaMethodImpl parent, TypeInfo type, jakarta.jws.WebParam.Mode mode, int index)
  • Method Details

    • getOwner

      public AbstractSEIModelImpl getOwner()
      Description copied from interface: Parameter
      Gets the root SEIModel that owns this model.
      Specified by:
      getOwner in interface Parameter
    • getParent

      public JavaMethod getParent()
      Description copied from interface: Parameter
      Gets the parent JavaMethod to which this parameter belongs.
      Specified by:
      getParent in interface Parameter
    • getName

      public QName getName()
      Specified by:
      getName in interface Parameter
      Returns:
      Returns the name.
    • getXMLBridge

      public XMLBridge getXMLBridge()
    • getInlinedRepeatedElementBridge

      public XMLBridge getInlinedRepeatedElementBridge()
    • getItemType

      public TypeInfo getItemType()
    • getTypeReference

      @Deprecated public org.glassfish.jaxb.runtime.api.TypeReference getTypeReference()
      Deprecated.
      use getTypeInfo
      TODO: once the model gets JAXBContext, shouldn't Bridges be made available from model objects?
      Returns:
      Returns the TypeReference associated with this Parameter
    • getTypeInfo

      public TypeInfo getTypeInfo()
    • getMode

      public jakarta.jws.WebParam.Mode getMode()
      Specified by:
      getMode in interface Parameter
      Returns:
      Returns the mode, such as IN, OUT or INOUT.
    • getIndex

      public int getIndex()
      Description copied from interface: Parameter
      Position of a parameter in the method signature. It would be -1 if the parameter is a return.
      Specified by:
      getIndex in interface Parameter
      Returns:
      Returns the index.
    • isWrapperStyle

      public boolean isWrapperStyle()
      Specified by:
      isWrapperStyle in interface Parameter
      Returns:
      true if this instanceof WrapperParameter.
    • isReturnValue

      public boolean isReturnValue()
      Description copied from interface: Parameter
      Returns true if this parameter is bound to the return value from the JavaMethod.

      Just the convenience method for getIndex()==-1

      Specified by:
      isReturnValue in interface Parameter
    • getBinding

      public ParameterBinding getBinding()
      Description copied from interface: Parameter
      Returns the binding associated with the parameter. For IN parameter the binding will be same as Parameter.getInBinding(), for OUT parameter the binding will be same as Parameter.getOutBinding() and for INOUT parameter the binding will be same as calling Parameter.getInBinding()
      Specified by:
      getBinding in interface Parameter
      Returns:
      the Binding for this Parameter
    • setBinding

      public void setBinding(ParameterBinding binding)
    • setInBinding

      public void setInBinding(ParameterBinding binding)
    • setOutBinding

      public void setOutBinding(ParameterBinding binding)
    • getInBinding

      public ParameterBinding getInBinding()
      Description copied from interface: Parameter
      Returns the ParameterBinding associated with the IN mode
      Specified by:
      getInBinding in interface Parameter
      Returns:
      the binding
    • getOutBinding

      public ParameterBinding getOutBinding()
      Description copied from interface: Parameter
      Returns the ParameterBinding associated with the OUT mode
      Specified by:
      getOutBinding in interface Parameter
      Returns:
      the binding
    • isIN

      public boolean isIN()
      Specified by:
      isIN in interface Parameter
      Returns:
      true if the WebParam.Mode associated with the parameter is WebParam.Mode.IN and false otherwise.
    • isOUT

      public boolean isOUT()
      Specified by:
      isOUT in interface Parameter
      Returns:
      true if the WebParam.Mode associated with the parameter is WebParam.Mode.OUT and false otherwise.
    • isINOUT

      public boolean isINOUT()
      Specified by:
      isINOUT in interface Parameter
      Returns:
      true if the WebParam.Mode associated with the parameter is WebParam.Mode.INOUT and false otherwise.
    • isResponse

      public boolean isResponse()
      If true, this parameter maps to the return value of a method invocation.

      JavaMethodImpl.getResponseParameters() is guaranteed to have at most one such ParameterImpl. Note that there coule be none, in which case the method returns void.

      Specified by:
      isResponse in interface Parameter
    • getHolderValue

      public Object getHolderValue(Object obj)
      Gets the holder value if applicable. To be called for inbound client side message.
      Specified by:
      getHolderValue in interface Parameter
      Returns:
      the holder value if applicable.
    • getPartName

      public String getPartName()
      Description copied from interface: Parameter
      Gives the wsdl:part@name value
      Specified by:
      getPartName in interface Parameter
      Returns:
      Value of WebParam.partName() annotation if present, otherwise its the localname of the infoset associated with the parameter
    • setPartName

      public void setPartName(String partName)