A class of endonucleases that cleaves DNA after recognizing a specific sequence, such as BamH1 (GGATCC), EcoRI (GAATTC), and HindIII (AAGCTT). Type I. Cuts nonspecifically a distance greater than 1000 bp from its recognition sequence and contains both restriction and methylation activities. Type II. Cuts at or near a short, and often symmetrical, recognition sequence. A separate enzyme methylates the same recognition sequence. Type III. Cuts 24-26 bp downstream from a short, asymmetrical recognition sequence. Requires ATP and contains both restriction and methylation activities.