Incremental modification detector, and methods, systems, and apparatus for implementing the same
First Claim
1. A method for selecting an annotation processor associated with an annotation for reprocessing, the annotation being included in a computer software source code, the method comprising:
- capturing an annotation snapshot of an annotation within an object-oriented program, wherein the annotation is defined to associate an attribute with a declaration within the object-oriented program, and wherein the annotation snapshot represents a current state of only structural information of the annotation;
calculating a hash value for the captured annotation snapshot such that the hash value is based on only structural information of the annotation, such that a change in non-structural information of the annotation does not cause a change in the hash value calculated for the captured annotation snapshot, wherein the hash value for the captured annotation snapshot is a sum of hash values of structural source members within the captured annotation snapshot, and wherein the hash value of a given structural source member is calculated as an exclusive-or of a first hash value of a name of the given structural source member with a second hash value of a value of the given structural source member;
comparing the calculated hash value for the captured annotation snapshot with a hash value of a previous captured instance of the annotation snapshot; and
marking the annotation processor associated with the annotation for reprocessing if the hash value for the captured annotation snapshot is different from the hash value of the previous captured instance of the annotation snapshot.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for selecting an annotation processor associated with an annotation for reprocessing is provided. The annotation is included in a computer software source code. An annotation snapshot is captured and a hash value is generated for the annotation snapshot. The annotation snapshot hash value is compared with a hash value of a previous annotation snapshot. The annotation processor associated with the annotation is marked for reprocessing when the annotation snapshot hash value is different from the hash value of the previous annotation snapshot.
-
Citations
14 Claims
-
1. A method for selecting an annotation processor associated with an annotation for reprocessing, the annotation being included in a computer software source code, the method comprising:
-
capturing an annotation snapshot of an annotation within an object-oriented program, wherein the annotation is defined to associate an attribute with a declaration within the object-oriented program, and wherein the annotation snapshot represents a current state of only structural information of the annotation; calculating a hash value for the captured annotation snapshot such that the hash value is based on only structural information of the annotation, such that a change in non-structural information of the annotation does not cause a change in the hash value calculated for the captured annotation snapshot, wherein the hash value for the captured annotation snapshot is a sum of hash values of structural source members within the captured annotation snapshot, and wherein the hash value of a given structural source member is calculated as an exclusive-or of a first hash value of a name of the given structural source member with a second hash value of a value of the given structural source member; comparing the calculated hash value for the captured annotation snapshot with a hash value of a previous captured instance of the annotation snapshot; and marking the annotation processor associated with the annotation for reprocessing if the hash value for the captured annotation snapshot is different from the hash value of the previous captured instance of the annotation snapshot. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for limiting regeneration of a computer software source code, the method comprising:
-
capturing a source code snapshot representing a current state of only structural information of a source code; capturing an annotation snapshot representing a current state of only structural information of an annotation within the source code; repeating the capturing of the annotation snapshot for each annotation within the source code; calculating a source code hash value for the captured source code snapshot such that the source code hash value is based on only structural information of the source code, such that a change in non-structural information of the source code does not cause a change in the source code hash value; for each captured annotation snapshot, calculating a respective annotation hash value for the captured annotation snapshot such that the annotation hash value is based on only structural information of the annotation, such that a change in non-structural information of the annotation does not cause a change in the respective annotation hash value, wherein the respective annotation hash value is a sum of hash values of structural source members within the corresponding captured annotation snapshot, and wherein the hash value of a given structural source member is calculated as an exclusive-or of a first hash value of a name of the given structural source member with a second hash value of a value of the given structural source member; comparing the calculated source code hash value with a previously calculated source code hash value; marking the source code for regeneration when the calculated source code hash value is different from the previously calculated source code hash value; comparing the calculated annotation hash values with corresponding previously calculated annotation hash values; and marking a given annotation for regeneration when the calculated annotation hash value of the given annotation is different from the previously calculated annotation hash value of the given annotation. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A computer readable storage device including program instructions for an incremental source code processing system, comprising:
-
an incremental modification detecting tool (IMDT) including; a snapshot generator defined to capture respective annotation snapshots for each of a number of annotations present within a source code, wherein each of the annotation snapshots represent a current state of only structural information within its respective annotation, a hash generator defined to calculate a respective annotation hash value for each annotation snapshot, whereby each annotation hash value is based on only structural information within its respective annotation, such that changes in non-structural information of a given annotation do not cause a change in the annotation hash value of the given annotation, wherein the respective annotation hash value is a sum of hash values of structural source members within the corresponding annotation snapshot, and wherein the hash value of a given structural source member is calculated as an exclusive-or of a first hash value of a name of the given structural source member with a second hash value of a value of the given structural source member, an evaluator defined to identify a change between any annotation hash value and its respective previously calculated annotation hash value, an annotation marker defined to mark an annotation processor of a given annotation within the source code for execution when the evaluator identifies a change between the calculated annotation hash value of the given annotation and its previously calculated annotation hash value; and an annotation processing tool (APT) defined to execute each marked annotation processor. - View Dependent Claims (14)
-
Specification