public ServiceRefType<WebAppDescriptor> getOrCreateServiceRef()
   {
      List<Node> nodeList = model.get("service-ref");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ServiceRefTypeImpl<WebAppDescriptor>(this, "service-ref", model, nodeList.get(0));
      }
      return createServiceRef();
   }
public ServiceRefType < WebAppDescriptor > getOrCreateServiceRef ( ) { List < Node > nodeList = model . get ( "service-ref" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new ServiceRefTypeImpl < WebAppDescriptor > ( this , "service-ref" , model , nodeList . get ( 0 ) ) ; } return createServiceRef ( ) ; }
If not already created, a new <code>service-ref</code> element will be created and returned.
Otherwise, the first existing <code>service-ref</code> element will be returned.
@return the instance defined for the element <code>service-ref</code>