com.sun.xml.ws.model
Class ParameterImpl

java.lang.Object
  extended by 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.


Field Summary
(package private)  TypeInfo itemTypeInfo
           
(package private)  WrapperParameter wrapper
           
 
Constructor Summary
ParameterImpl(JavaMethodImpl parent, TypeInfo type, javax.jws.WebParam.Mode mode, int index)
           
 
Method Summary
(package private)  void fillTypes(List<TypeInfo> types)
           
 ParameterBinding getBinding()
          Returns the binding associated with the parameter.
 com.sun.xml.bind.api.Bridge getBridge()
          Deprecated.  
protected  com.sun.xml.bind.api.Bridge getBridge(com.sun.xml.bind.api.TypeReference typeRef)
          Deprecated.  
 Object getHolderValue(Object obj)
          Gets the holder value if applicable.
 ParameterBinding getInBinding()
          Returns the ParameterBinding associated with the IN mode
 int getIndex()
          Position of a parameter in the method signature.
 XMLBridge getInlinedRepeatedElementBridge()
           
 TypeInfo getItemType()
           
 javax.jws.WebParam.Mode getMode()
           
 QName getName()
           
 ParameterBinding getOutBinding()
          Returns the ParameterBinding associated with the OUT mode
 AbstractSEIModelImpl getOwner()
          Gets the root SEIModel that owns this model.
 JavaMethod getParent()
          Gets the parent JavaMethod to which this parameter belongs.
 String getPartName()
          Gives the wsdl:part@name value
 TypeInfo getTypeInfo()
           
 com.sun.xml.bind.api.TypeReference getTypeReference()
          Deprecated. use getTypeInfo
 XMLBridge getXMLBridge()
           
 boolean isIN()
           
 boolean isINOUT()
           
 boolean isOUT()
           
 boolean isResponse()
          If true, this parameter maps to the return value of a method invocation.
 boolean isReturnValue()
          Returns true if this parameter is bound to the return value from the JavaMethod.
 boolean isWrapperStyle()
           
 void setBinding(ParameterBinding binding)
           
 void setInBinding(ParameterBinding binding)
           
 void setOutBinding(ParameterBinding binding)
           
 void setPartName(String partName)
           
(package private)  void setTypeReference(com.sun.xml.bind.api.TypeReference type)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wrapper

WrapperParameter wrapper

itemTypeInfo

TypeInfo itemTypeInfo
Constructor Detail

ParameterImpl

public ParameterImpl(JavaMethodImpl parent,
                     TypeInfo type,
                     javax.jws.WebParam.Mode mode,
                     int index)
Method Detail

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()

getBridge

public com.sun.xml.bind.api.Bridge getBridge()
Deprecated. 

Description copied from interface: Parameter
Gives the Bridge associated with this Parameter

Specified by:
getBridge in interface Parameter

getBridge

protected com.sun.xml.bind.api.Bridge getBridge(com.sun.xml.bind.api.TypeReference typeRef)
Deprecated. 


getTypeReference

public com.sun.xml.bind.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()

setTypeReference

void setTypeReference(com.sun.xml.bind.api.TypeReference type)
Deprecated. 

Sometimes we need to overwrite the typeReferenc, such as during patching for rpclit

See Also:
AbstractSEIModelImpl#applyParameterBinding(com.sun.xml.ws.model.wsdl.WSDLBoundPortTypeImpl)

getMode

public javax.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)
Parameters:
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
Parameters:
obj -
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)

fillTypes

void fillTypes(List<TypeInfo> types)


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.