com.sun.xml.ws.api.model.wsdl
Interface WSDLExtensible

All Superinterfaces:
WSDLObject
All Known Subinterfaces:
WSDLBoundFault, WSDLBoundOperation, WSDLBoundPortType, WSDLFault, WSDLInput, WSDLMessage, WSDLModel, WSDLOperation, WSDLOutput, WSDLPort, WSDLPortType, WSDLService
All Known Implementing Classes:
AbstractExtensibleImpl, AbstractFeaturedObjectImpl, WSDLBoundFaultImpl, WSDLBoundOperationImpl, WSDLBoundPortTypeImpl, WSDLFaultImpl, WSDLInputImpl, WSDLMessageImpl, WSDLModelImpl, WSDLOperationImpl, WSDLOutputImpl, WSDLPortImpl, WSDLPortTypeImpl, WSDLServiceImpl

public interface WSDLExtensible
extends WSDLObject

Interface that represents WSDL concepts that can have extensions.


Method Summary
 void addExtension(WSDLExtension extension)
          Adds a new WSDLExtension to this object.
<T extends WSDLExtension>
T
getExtension(Class<T> type)
          Gets the extension that is assignable to the given type.
 Iterable<WSDLExtension> getExtensions()
          Gets all the WSDLExtensions added through addExtension(WSDLExtension).
<T extends WSDLExtension>
Iterable<T>
getExtensions(Class<T> type)
          Gets all the extensions that is assignable to the given type.
 
Methods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLObject
getLocation
 

Method Detail

getExtensions

Iterable<WSDLExtension> getExtensions()
Gets all the WSDLExtensions added through addExtension(WSDLExtension).

Returns:
never null.

getExtensions

<T extends WSDLExtension> Iterable<T> getExtensions(Class<T> type)
Gets all the extensions that is assignable to the given type.

This allows clients to find specific extensions in a type-safe and convenient way.

Parameters:
type - The type of the extension to obtain. Must not be null.
Returns:
Can be an empty fromjava.collection but never null.

getExtension

<T extends WSDLExtension> T getExtension(Class<T> type)
Gets the extension that is assignable to the given type.

This is just a convenient version that does

 Iterator itr = getExtensions(type);
 if(itr.hasNext())  return itr.next();
 else               return null;
 

Returns:
null if the extension was not found.

addExtension

void addExtension(WSDLExtension extension)
Adds a new WSDLExtension to this object.

Parameters:
extension - must not be null.