Angular Modernizer
    Preparing search index...
    • Analyzes a method to determine its responsibilities based on:

      1. Method name pattern matching (using RESPONSIBILITY_PATTERNS)
      2. Method body analysis (RxJS, JSON operations)

      Parameters

      • methodName: string

        The name of the method to analyze

      • methodBody: string | undefined

        Optional method body source code for deeper analysis

      Returns Set<string>

      Set of responsibility identifiers (e.g., 'event-handling', 'data-retrieval')

      // Detect from method name only
      analyzeMethodResponsibility('getUsers', undefined);
      // Returns: Set(['data-retrieval'])

      // Detect from method body
      analyzeMethodResponsibility('notifyChange', 'this.subject.next(data);');
      // Returns: Set(['event-handling'])

      // Detect multiple responsibilities
      analyzeMethodResponsibility('processData', 'this.subject.next(JSON.parse(data));');
      // Returns: Set(['event-handling', 'transformation'])