@Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append('['); for (int i = 0, n = size(); i < n; i++) { if (i > 0) { buf.append(", "); } buf.append(get(i)); } buf.append(']'); return buf.toString(); } }
/** * Generate a .dot file which can be fed into GraphViz for layout and visualization of the class graph. The * returned graph shows inter-class dependencies only. The sizeX and sizeY parameters are the image output size * to use (in inches) when GraphViz is asked to render the .dot file. You must have called * {@link ClassGraph#enableInterClassDependencies()} before scanning to use this method. * * <p> * Equivalent to calling {@link #generateGraphVizDotFileFromInterClassDependencies(float, float, boolean)} with * parameters of (10.5f, 8f, scanSpec.enableExternalClasses), where scanSpec.enableExternalClasses is true if * {@link ClassGraph#enableExternalClasses()} was called before scanning. * * @throws IllegalArgumentException * if this {@link ClassInfoList} is empty or {@link ClassGraph#enableInterClassDependencies()} was * not called before scanning (since there would be nothing to graph). * @return the GraphViz file contents. */ public String generateGraphVizDotFileFromClassDependencies() { if (isEmpty()) { throw new IllegalArgumentException("List is empty"); } final ScanSpec scanSpec = get(0).scanResult.scanSpec; if (!scanSpec.enableInterClassDependencies) { throw new IllegalArgumentException( "Please call ClassGraph#enableInterClassDependencies() before #scan()"); } return GraphvizDotfileGenerator.generateGraphVizDotFileFromInterClassDependencies(this, 10.5f, 8.0f, scanSpec.enableExternalClasses); }
throw new IllegalArgumentException("List is empty"); final ScanSpec scanSpec = get(0).scanResult.scanSpec; if (!scanSpec.enableInterClassDependencies) { throw new IllegalArgumentException(
throw new IllegalArgumentException("List is empty"); final ScanSpec scanSpec = get(0).scanResult.scanSpec; if (!scanSpec.enableClassInfo) { throw new IllegalArgumentException("Please call ClassGraph#enableClassInfo() before #scan()");