Annotation File Utilities Changelog
This is the changelog for the
Annotation File Utilities.
-
Version 3.6.12 (released January 30, 2015):
-
Adds support for lambda expressions, member references, and type arguments of static method calls and member references.
-
Version 3.6.11 (released December 19, 2014):
-
Fixes more insertion logic bugs, including errors in handling generic arrays.
-
Version 3.6.10 (released November 26, 2014):
-
Fixes many bugs, mostly in AST path-based insertion logic.
-
Version 3.6.9 (released October 30, 2014):
-
Minor bug fixes and improvements.
-
Version 3.6.8 (released September 24, 2014):
-
Fixes numerous bugs in AST path-based insertion logic.
-
Version 3.6.7 (released August 1, 2014):
-
Improves Java 9 support.
-
Fills in some previously missing cases for AST path-based insertion specifications.
-
Version 3.6.6 (released July 1, 2014):
-
Fixes bug affecting inner array types of new[] expressions in the AST path-based insertion logic.
-
Fixes JAIF generation bugs involving insert-annotation and insert typecast within methods and fields.
-
Version 3.6.5 (released June 2, 2014):
-
Generates extends bounds when necessary for annotation insertion.
-
Fixes assorted bugs in the AST path-based insertion logic.
-
Version 3.6.4 (released May 1, 2014):
-
Expands AST path support to cover every AST node within a class declaration.
-
Abbreviates enum tags for annotations if
--abbreviate
is selected.
-
Generates explicit default constructors when necessary for annotation insertion.
-
Version 3.6.3 (released Apr 2, 2014):
-
Eliminates insert-annotation problems with handling Java 8 class files.
-
Corrects annotation placement within a qualified type name.
-
Fills in gaps in AST Path API. All (Java 7) non-declaration nodes can now be identified by a path from an enclosing declaration.
-
Expands scene-lib API with visitor framework and new class
APIIndex
, which provides a cache that maps Java abstract syntax tree nodes to AST paths as defined in the annotation file format specification.
-
Version 3.6.2 (released Mar 5, 2014):
-
Expands scene-lib API with visitor framework and new class
APIIndex
, which provides a cache that maps Java abstract syntax tree nodes to AST paths as defined in the annotation file format specification.
-
Version 3.6.1 (released Feb 19, 2014):
-
Adds missing cases for AST path-based annotation/cast insertion.
-
Version 3.5.9 (released Jan 2, 2014):
-
Fixes assorted minor bugs.
-
Version 3.5.8 (released Dec 9, 2013):
-
Creates output directory in current working directory (by default), rather than relative to input pathname.
-
Recognizes "instanceinit" keyword in JAIF for adding annotations inside instance initializers.
-
Corrects syntax of results of inserting annotations on bare array literals.
-
More fully treats enum, interface, and annotation declarations in accordance with the rules for class declarations.
-
Version 3.5.7 (released Nov 15, 2013):
-
Handles type paths with INNER_TYPE.
-
Disallows annotations on generic array type bounds and on wildcard bounds in "instanceof" expressions, since Java 8 prohibits type bounds in those locations.
-
Vastly improves performance when index file covers numerous source files, by filtering out irrelevant insertions at an earlier stage.
-
Avoids stack overflow during regex matching.
-
Version 3.5.6 (released Oct 23, 2013):
-
Adds "insert-annotation" to JAIF format, allowing the use of AST paths to specify source locations for annotation insertion (which previously was possible only for typecast insertions).
-
For consistency with
extract-annotations
, insert-annotations-to-source
now matches generic method types in the source with JAIF specifications for their least upper bounds.
-
Allows annotations on inner type declarations of parameterized types.
-
Avoids spurious code location matches on anonymous inner subclasses of an outer class.
-
Works around Java regex bug that on some input causes an infinite loop in the Matcher.
-
Fixes many other bugs, most involving receiver insertions.
-
No longer aborts on (non-fatal) warnings found during the
javac
type-checking phase of insert-annotations-to-source
.
-
Version 3.5.5 (released Aug 28, 2013):
-
Allows annotation insertion at constructor "return type" as per the specification.
-
Fixes assorted bugs dealing with type qualification, inner classes, and receiver insertion.
-
Version 3.5.4 (released Aug 1, 2013):
-
Allow the use of command-line argument files. Argument file rules are identical to those of javac.
-
The Annotation File Utilities now appropriately handles vararg parameters.
-
Minor documentation improvements.
-
Version 3.5.3 (released May 1, 2013):
-
Don't depend on bootstrap javac files.
-
Other minor improvements.
-
Version 3.5.2 (released April 4, 2013):
-
Allow annotations on compound types of a cast insertion.
-
Added
--print_error_stack
command-line option to
insert-annotations-to-source
tool to print a stack trace on
an error.
-
Various bug fixes.
-
Improvements to the Annotation File Format manual.
-
Clarified "Grammar" section by reordering and adding more details.
-
Added "Design and Implementation Details" section.
-
Version 3.5.1 (released March 1, 2013):
-
Small improvements to error messages when parsing JAIF files and for
illegal source code insertions.
-
Installation instruction and manual improvements.
-
Better handling of source code insertions in anonymous and local
classes.
-
Allow source code insertions in a local class (a class defined
within a method).
-
Bug fixes for anonymous and local class indexes.
-
Don't traverse into nested classes when calculating a source code
index.
-
Improved support for source code method declaration receiver parameter
insertions.
-
Use the full type name (Outer.Inner1.Inner2) for receiver insertions
in inner classes.
-
Allow annotation insertions on compound types of method declaration
receiver parameters.
-
Insert source code annotations in the semantically correct place for
qualified types.
-
For bytecode annotation extraction and insertion read and put "local"
type annotations in the Code attribute, not the Method attribute.
-
Version 3.5 (released February 1, 2013):
-
Updated to JSR308 bytecode representation and receiver parameter syntax.
-
Support source code insertion of annotated casts.
-
Support adding annotations to bytecode for type casts with intersection
types.
-
Version 3.4 (released September 11, 2012):
-
Adapted to underlying changes in JSR 308.
-
Support .class literals as annotation attributes.
-
Version 3.3 (released September 20, 2011):
-
Improved support for annotations on array creation expressions.
-
Small tweaks to the code and documentation.
-
Version 3.2 (released June 18, 2011):
-
Support source code indexes, in contrast to the bytecode
centric indexes supported so far, which makes it easier for
source code centric tools to emit AFU files.
See Section "Support for source code indexes" in the
manual.
-
Support annotating the bounds of class and method type
parameters and of wildcards, in particular also support
implicit bounds and make them explicit.
Also support adding declaration annotations on type parameters.
-
Better support for anonymous inner classes.
-
Improve handling of already existing annotations, in
particular for generic types.
-
Consistently do matching on methods using the erased signature.
-
Specify annotations on extends and implements clauses.
-
Handle interfaces, enums, etc. like classes.
-
Numerous small bug fixes and improvements.
-
Version 3.1 (released September 18, 2010):
-
Don't duplicate annotations that are in the source already.
-
Add --omit-annotation option to omit a given annotation
(example: @ThisMutable, which is the default and need not be
inserted in source files).
-
Bug fixes related to inner classes, array levels, multiple methods
with same signature but different return type (impossible in Java
code, but can occur in class files), parameter indices.
-
Switch from utilMDE library to
plume-lib.
-
Version 3.0 (released December 21, 2009):
-
Handle meta-annotations.
Previously, the Annotation File Utilities didn't handle meta-annotations
(annotations that are written on an annotation type declaration); in fact,
AFU simply fabricated retention information. Now, meta-annotations are
handled uniformly with other annotations.
-
Distinguish type annotations from declaration annotations.
Previously, AFU assumed that all annotations were type annotations. Now,
this information is looked up from the meta-annotations and is
distinguished in the file format (see below).
-
Read annotations from classfiles.
Previously, AFU created partial information for annotations in an ad hoc
way, and classfile reading did not work. (The focus was on inserting
annotations in class files, not reading annotations from class files.)
Now, classfile reading is operational, and it is often not necessary to
declare annotations in an annotation file. However, if the annotation is
declared in the annotation file, it should be consistent with its
declaration in the class file.
- Changes to annotation file format.
- Indicating meta-annotations
annotation visible @Nullable:
becomes
annotation @Nullable: @Retention(value=RUNTIME)
and if it's a type annotation, it should be
annotation @Nullable: @Retention(value=RUNTIME) @java.lang.annotation.Target(value={TYPE_USE})
- Locations for type and declaration annotations.
If p2.B is a declaration annotation on a method, it is written as before:
method foo(Ljava/util/Set;)V: @p2.B
If p2.B is a type annotation on a method return type, it is written in a
new location:
method foo(Ljava/util/Set;)V:
return: @p2.B
Fields and method parameters are treated similarly, but with
type marker instead of return. So if p2.A is a
declaration annotation targeting the field, while p2.B is a type
annotation on the field, the field would be declared as:
field s: @p2.A
type: @p2.B
Furthermore, inner-type: is permitted only after a keyword
that introduces a type, such as type, return, and
receiver, to prevent confusion (though the file format
becomes slightly more verbose).
- Permit qualified names in several places that only identifiers were
permitted before. This enables use of names that contain periods, such
as inner classes, and also fully-qualified names.
- Permit two shorthands in annotation uses, as in Java. If there is a
single field named "value", then its name may be omitted: @A(1) instead
of @A(value=1). If an array has only one element, the braces may be
omitted: @B(value=1) instead of @B(value={1}). Both
shorthands may be combined: @B(1) instead of @B(value={1}).
-
Version 2.3.3 (released August 18, 2009):
-
Version 2.3.2 (released August 14, 2009):
- Relax file format: receiver may precede parameters (in spec &
implementation), parameters may omit "#" (in implementation only)
-
Version 2.3.1 (released August 12, 2009):
-
Version 2.3 (released July 29, 2009):
- Support -i --in-place argument.
- Fix incorrect array brackets in tests.
- Fix inserting annotations on receivers.
- Improve documentation.
- Improve error handling.
-
Version 2.2 (released December 7, 2008):
- Permit Main to process multiple files at a time.
- Don't re-insert annotations that are already present.
- Add a space before annotation if there isn't one there.
- Fix problems with array syntax; now adheres to the current JSR
308 syntax.
- Improve error handling.
- Code reorganization: remove subdirectories and classes that
added complexity without commensurate functionality.
-
Version 2.1.2 (released April 28, 2008):
Minor updates to the “Annotation File Format Specification” (PDF, HTML).
-
Version 2.1.1 (released May 31, 2007):
Added support for two new annotation target_types; consult the
classfile specification (PDF,
HTML).
-
Version 2.1 (released May 4, 2007):
Modified overall setup of distribution to be easier to understand.
-
Version 2.0 (released May 1, 2007):
Initial public release.
-
Version 1.0 (released March 19, 2007):
Preliminary release.
The
insert-to-annotations-source
tool only
operates on class, field and method signatures.
The original developer (through version 2.1.2) was Jaime Quinonez.