Class ReferenceCollector


  • public class ReferenceCollector
    extends Object
    LinkedHashMap is used for reference map to guarantee a deterministic order of iteration, so that bytecode generated based on it would also be deterministic.
    • Constructor Detail

      • ReferenceCollector

        public ReferenceCollector()
    • Method Detail

      • collectReferencesFrom

        public void collectReferencesFrom​(String adviceClassName)
        Traverse a graph of classes starting from adviceClassName and collect all references to both internal (instrumentation) and external classes.

        The graph of classes is traversed until a non-instrumentation (external) class is encountered.

        This class is only called at compile time by the MuzzleCodeGenerationPlugin ByteBuddy plugin.

        Parameters:
        adviceClassName - Starting point for generating references.
        See Also:
        InstrumentationClassPredicate
      • getSortedHelperClasses

        public List<String> getSortedHelperClasses()