/** * Returns <code>true</code> if class contains {@link #bytecodeSignatureOfType(Class) type signature}. * It searches the class content for bytecode signature. This is the fastest way of finding if come * class uses some type. Please note that if signature exists it still doesn't means that class uses * it in expected way, therefore, class should be loaded to complete the scan. */ public boolean isTypeSignatureInUse(final byte[] bytes) { try { final byte[] data = readBytes(); final int index = ArraysUtil.indexOf(data, bytes); return index != -1; } catch (IOException ioex) { throw new FindFileException("Read error", ioex); } }
/** * Returns <code>true</code> if class contains {@link #bytecodeSignatureOfType(Class) type signature}. * It searches the class content for bytecode signature. This is the fastest way of finding if come * class uses some type. Please note that if signature exists it still doesn't means that class uses * it in expected way, therefore, class should be loaded to complete the scan. */ public boolean isTypeSignatureInUse(final byte[] bytes) { try { final byte[] data = readBytes(); final int index = ArraysUtil.indexOf(data, bytes); return index != -1; } catch (IOException ioex) { throw new FindFileException("Read error", ioex); } }