IP Library Granted Patent US 7,565,364
Granted Patent B1
US 7,565,364 · App. 11/137,727 · Granted Jul 21, 2009

Annotation processor discovery

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,565,364
App. No.
11/137,727
Granted
Jul 21, 2009
Kind
B1
Abstract

Methods for discovering and accessing annotation processors are provided. The method initiates with identifying an annotation present in a source file and identifying factories available for processing annotations. The method includes determining annotations supported by each of the available factories. Then, one of the available factories is assigned to process the annotation based on the annotation present in the source file being supported by the one of the available factories. A computer readable medium is also provided.

Claims (52)

1. A computer implemented method for accessing annotation processors, comprising method operations of:

identifying an annotation present in a source file;

partially compiling the source file;

identifying factories available for processing annotations;

determining annotations supported by each of the available factories; and

assigning one of the available factories to process the annotation based on the annotation present in the source file being supported by the one of the available factories.

2. The method of claim 1 , wherein the method operation of assigning one of the available factories to process the annotation based on the annotation present in the source file being supported by the one of the available factories includes,

matching the annotation present in the source file with an annotation supported by one of the available factories.

3. The method of claim 2 , wherein the method operation of matching the annotation present in the source file with the annotation supported by one of the available factories includes,

comparing names representing the annotation present in the source file with the annotation supported by one of the available factories.

4. The method of claim 1 , wherein the method operation of identifying factories available for processing annotations includes;

locating a service associated with an interface through a .jar file.

5. The method of claim 1 , further comprising:

repeating each of the method operations for a next annotation of the source file.

6. The method of claim 5 , wherein the one of the available factories is recalled for the next annotation when the one of the available factories does not support the next annotation.

7. The method of claim 1 , wherein the method operation of identifying factories available for processing annotations includes,

arranging the available factories in a determined order.

8. A computer readable storage medium having program instructions for providing annotation processors stored thereon, comprising:

program instructions for identifying an annotation present in a source file;

program instructions for partially compiling the source file;

program instructions for identifying factories available for processing annotations;

program instructions for determining annotations supported by each of the available factories; and

program instructions for assigning one of the available factories to process the annotation based on the annotation present in the source file being supported by the one of the available factories.

9. The computer readable storage medium of claim 8 , wherein the program instructions for assigning one of the available factories to process the annotation based on the annotation present in the source file being supported by the one of the available factories includes,

program instructions for matching the annotation present in the source file with an annotation supported by one of the available factories.

10. The computer readable storage medium of claim 9 , wherein the program instructions for matching the annotation present in the source file with an annotation supported by one of the available factories includes,

program instructions for comparing names representing the annotation present in the source file the annotation supported by one of the available factories.

11. The computer readable storage medium of claim 8 , wherein the program instructions for identifying an annotation present in a source file includes,

program instructions for analyzing the partially compiled source file.

12. The computer readable storage medium of claim 8 , wherein the program instructions for identifying factories available for processing annotations includes;

program instructions for locating a service associated with an interface through a .jar file.

13. The computer readable storage medium of claim 8 , further comprising:

program instructions for repeating each of the method operations for a next annotation of the source file.

14. The computer readable storage medium of claim 13 , wherein the one of the available factories is recalled for the next annotation when the one of the available factories does not support the next annotation.

15. The computer readable storage medium of claim 8 , wherein the program instructions for identifying factories available for processing annotations includes,

program instructions for arranging the available factories in a determined order.

16. An annotation processing tool stored in memory of a computing device for identifying annotation processors based on annotations present in a source file, the annotation processing tool discovering annotation processors according to computer implemented method operations comprising:

receiving the source file;

partially compiling the source file:

analyzing the source file to identify an annotation present in the source file;

searching for available factories;

extracting supported annotations for each of the available factories; and

matching the annotation present in the source file with one of the factories, wherein the one of the factories supports the annotation.

17. The annotation processing tool of claim 16 , further comprising:

arranging each of the available factories in a determined order such that conflicts between factories having different versions of a processor supporting the annotation present are resolved through the determined order.

18. The annotation processing tool of claim 16 , further comprising:

invoking an annotation processor supporting the annotation;

determining if a next annotation is present in the source file;

if the next annotation is present, then the method includes,

matching the next annotation with one of the factories; and

invoking the next annotation processor.

19. The annotation processing tool of claim 18 , wherein the invoking of the annotation processor causes the annotation processor to be registered for a subsequent processing round to maintain a consistent state.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037304/0183 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 24, 2005
From: DARCY, JOSEPH D.; SELIGMAN, SCOTT
To: SUN MICROSYSTEMS, INC.
Reel/Frame 016637/0284 →