Skip to content

Add JandexClassMetadataScanner as a replacement for slow reflection scanning #32868

@spbolton

Description

@spbolton

Overview

Introduce Jandex class metadata scanning capabilities to dotCMS core to improve reflection-based operations and enable more efficient class discovery and analysis. This has been pulled out from work required for #32656 so it can be generally used.

Background

dotCMS currently relies on traditional Java reflection for class metadata operations, which can be slow and resource-intensive. Jandex provides a more efficient approach by pre-indexing class metadata at build time, enabling faster runtime operations.

Benefits

  • Performance: Faster class discovery and metadata retrieval
  • Build-time Analysis: Pre-computed class indexes reduce runtime overhead
  • Enhanced Capabilities: Better support for annotation scanning and class hierarchy analysis
  • Foundation for Future Features: Enables advanced features like dependency injection improvements and plugin system enhancements

Acceptance Criteria

  • Implement JandexClassMetadataScanner utility class
  • Add Jandex dependency to core module
  • Create comprehensive documentation for usage patterns
  • Add unit tests for JandexClassMetadataScanner functionality
  • Provide integration examples for common use cases
  • Ensure backward compatibility with existing reflection-based code

Technical Requirements

  • JandexClassMetadataScanner should provide:
    • Class discovery by package
    • Annotation-based class filtering
    • Metadata extraction capabilities
    • Integration with existing dotCMS patterns
  • Documentation should cover:
    • Usage patterns and best practices
    • Integration examples
    • Performance considerations
    • Migration guidance from traditional reflection

Implementation Notes

  • This is a foundational capability that will be used by multiple parts of the system
  • Should be treated as core infrastructure component
  • Design for extensibility to support future enhancements

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions