code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
  
          int cnt = 0;
          if (this.forwardingInfo != null)
              cnt++;
          if (this.callBarringInfo != null)
              cnt++;
          if (this.cugInfo != null)
              cnt++;
          if (this.ssData != null)
              cnt++;
          if (this.emlppInfo != null)
              cnt++;
  
          if (cnt != 1)
              throw new MAPException("Error while encoding " + _PrimitiveName + ": one and only one choice is required.");
  
          if (this.forwardingInfo != null) {
              ((ExtForwInfoImpl) this.forwardingInfo).encodeData(asnOs);
              return;
          }
  
          if (this.callBarringInfo != null) {
              ((ExtCallBarInfoImpl) this.callBarringInfo).encodeData(asnOs);
              return;
          }
  
          if (this.cugInfo != null) {
              ((CUGInfoImpl) this.cugInfo).encodeData(asnOs);
              return;
          }
  
          if (this.ssData != null) {
              ((ExtSSDataImpl) this.ssData).encodeData(asnOs);
              return;
          }
  
          if (this.emlppInfo != null) {
              ((EMLPPInfoImpl) this.emlppInfo).encodeData(asnOs);
              return;
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.map.primitives.MAPAsnPrimitive#encodeData (org.mobicents.protocols.asn.AsnOutputStream)