code: private static Bond toBeamEdgeLabel(IBond b, int flavour) throws CDKException {
  
          if (SmiFlavor.isSet(flavour, SmiFlavor.UseAromaticSymbols) && b.isAromatic()) {
              if (!b.getBegin().isAromatic() || !b.getEnd().isAromatic())
                  throw new IllegalStateException("Aromatic bond connects non-aromatic atomic atoms");
              return Bond.AROMATIC;
          }
  
          if (b.getOrder() == null) throw new CDKException("A bond had undefined order, possible query bond?");
  
          IBond.Order order = b.getOrder();
  
          switch (order) {
              case SINGLE:
                  return Bond.SINGLE;
              case DOUBLE:
                  return Bond.DOUBLE;
              case TRIPLE:
                  return Bond.TRIPLE;
              case QUADRUPLE:
                  return Bond.QUADRUPLE;
              default:
                  if (!SmiFlavor.isSet(flavour, SmiFlavor.UseAromaticSymbols) && b.isAromatic())
                      throw new CDKException("Cannot write Kekulé SMILES output due to aromatic bond with unset bond order - molecule should be Kekulized");
                  throw new CDKException("Unsupported bond order: " + order);
          }
      }
docs: Convert a CDK {@link IBond} to the Beam edge label type.
  
  @param b cdk bond
  @return the edge label for the Beam edge
  @throws NullPointerException     the bond order was null and the bond was
  not-aromatic
  @throws IllegalArgumentException the bond order could not be converted