Class XrefBuilder


  • public class XrefBuilder
    extends Object
    A builder for a cross-reference database over every class in a ClassPool, recording call, field access, instantiation, cast and inheritance references.
    • Constructor Detail

      • XrefBuilder

        public XrefBuilder​(ClassPool classPool)
        Creates a builder that will scan the given pool into a fresh database.
        Parameters:
        classPool - the pool whose classes are scanned
    • Method Detail

      • getDatabase

        public XrefDatabase getDatabase()
        Returns:
        the database being built, readable before the scan completes
      • setProgressCallback

        public void setProgressCallback​(Consumer<String> callback)
        Sets a callback invoked with progress messages during the scan.
        Parameters:
        callback - the progress sink, or null to disable reporting
      • build

        public XrefDatabase build()
        Clears the database and rescans every class in the pool.
        Returns:
        the populated database