Deterministic Annotation Processor Selection in Java Modules

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing annotation processing technologies face challenges in efficiently selecting and ordering annotation processors, particularly when dealing with both module-defined and non-module-defined processors, which can lead to suboptimal processing of annotations.

Innovation Solution

A deterministic process is implemented to search and select annotation processors, allowing for predefined ordering and prioritization of processors based on their definitions within a module system or as non-module code, ensuring that the appropriate processor is chosen for processing annotations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If annotation processors are selected without a deterministic process, then the selection process is simpler, but the processing accuracy and reliability of annotations deteriorates

Engineering Contradiction:
Improveannotation processing reliabilityVSAvoidprocessor selection complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by establishing a deterministic selection process that pre-defines the ordering and prioritization rules for annotation processors before actual annotation processing occurs. This ensures that when annotations need to be processed, the correct processor is already identified and selected according to predetermined criteria, improving reliability without adding runtime complexity.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the selection parameter from arbitrary or simple first-match ordering to a deterministic multi-criteria evaluation system. This involves changing how processors are compared and selected by introducing predefined ordering rules and prioritization parameters that consider both module-defined and non-module-defined processors, thereby improving processing accuracy.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If a deterministic process is implemented to search and select annotation processors, then the processing accuracy improves, but the processing time increases

Engineering Contradiction:
Improveprocessor selection precisionVSAvoidannotation processing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

By pre-establishing the deterministic selection criteria and processor ordering rules before compilation or processing begins, the system avoids performing complex evaluations during actual annotation processing. The selection logic is prepared in advance, allowing quick application of the rules when processors need to be selected, thus maintaining precision while minimizing time loss.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces dynamic adaptability in the selection process by allowing the deterministic process to handle different scenarios (module-defined vs. non-module-defined processors) with appropriate prioritization. This dynamic approach enables the system to efficiently navigate different processing contexts without requiring exhaustive search in each case, balancing precision with processing speed.

Inventive Principle:
Principle #15Dynamics

3Adaptability or versatility

If both module-defined and non-module-defined annotation processors are supported, then the system versatility improves, but the device complexity increases

Engineering Contradiction:
Improveprocessor compatibilityVSAvoidselection mechanism complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent applies universality by designing a single deterministic selection process that can handle both module-defined and non-module-defined annotation processors through a unified mechanism. This universal approach allows the same selection logic to work across different processor types and sourcing methods, improving versatility without proportionally increasing complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent applies local quality by implementing different prioritization rules for different processor types within the unified selection framework. Module-defined processors may receive different ordering treatment compared to non-module-defined processors, allowing each type to be handled with appropriate local optimization while maintaining overall system unity and avoiding excessive complexity.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10387142B2Using annotation processors defined by modules with annotation processors defined by non-module code
Publication Date: 2019.08.20 ORACLE INT CORP
  • US10387142B2 patent drawing
  • US10387142B2 patent drawing
  • US10387142B2 patent drawing

AI summary

Annotation processors defined by a module of a module system are used for processing annotations. Annotation processors defined by a module of a module system may be used with annotation processors defined by non-module code. A predefined deterministic process is used to select annotation processors for processing annotations. The predefined deterministic process imposes an order for searching and/or using annotation processors.