PDBReader extends DefaultChemObjectReader { @Override public boolean accepts(Class<? extends IChemObject> classObject) { Class<?>[] interfaces = classObject.getInterfaces(); for (int i = 0; i < interfaces.length; i++) { if (IChemFile.class.equals(interfaces[i])) return true; } if (IChemFile.class.equals(classObject)) return true; Class superClass = classObject.getSuperclass(); if (superClass != null) return this.accepts(superClass); return false; } PDBReader(InputStream oIn);  PDBReader(Reader oIn);  PDBReader(); @Override IResourceFormat getFormat(); @Override void setReader(Reader input); @Override void setReader(InputStream input); @Override boolean accepts(Class<? extends IChemObject> classObject); @Override T read(T oObj); @Override void close(); void customizeJob();  }
@Test public void testAccepts() { PDBReader reader = new PDBReader(); Assert.assertTrue(reader.accepts(ChemFile.class)); }