code: public static void markAromaticRings(IRing ring) {
          // return as soon as the conditions are not met:
          // 1. all atoms are labeled aromatic
          for (IAtom atom : ring.atoms())
              if (!atom.getFlag(CDKConstants.ISAROMATIC)) return;
  
          // 2. all bonds are labeled aromatic
          for (IBond bond : ring.bonds())
              if (!bond.getFlag(CDKConstants.ISAROMATIC)) return;
  
          // OK, all conditions are met, so ring is aromatic
          ring.setFlag(CDKConstants.ISAROMATIC, true);
      }
docs: Marks the ring aromatic if all atoms and all bonds are aromatic.
  
  The method assumes that aromaticity of atoms and bonds have been
  detected beforehand
  
  @param ring The ring to examine