Download
RECODER is LGPL'ed software. Check the license if you are not familiar with it.
As RECODER is still in its infancy, do not expect industrial strength
in terms of usability, reliability, or efficiency. RECODER is not yet
mature and parts of the API might change rather frequently.
License
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU
Lesser General Public License
as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
For further licensing questions, please contact one of the project gurus.
Setup Instructions
There is no dedicated install program, but setup and installation are
easily done.
System Requirements
A complete installation of RECODER requires approximately 25 MB HD space.
To run, RECODER requires a Java Virtual Machine Version 1.1 or higher, and
a good bunch of memory, depending on your project. As a rule of thumb,
RECODER requires less memory than one needs to create the JavaDoc pages
for the target system.
Installation Procedure
Step 1: Download the current RECODER distribution.
Step 2: Add recoder.jar to your CLASSPATH.
Step 3: If you are new to RECODER, you may want to check out the
examples.
Software Archive
Public releases are available at
sourceforge.
The "core" distribution archive does not contain the API documentation or
developer files, but it does include all the documentation materials from
this site.
To unpack the bzip2'ed versions, you need the corresponding
bunzip2 tool, which is
available
for most platforms.
To access the latest version, you must use the anonymous CVS access; please
consult the corresponding pages on sourceforge for instructions.
Releases prior to 0.70 are available from the COMPOST archive.
Version History
Release notes for 0.82 (of September 27, 2007)
This is a maintenance release. Update is recommended but not required if you do not experience any problems.
- Bug fixes
- under MacOS, recoder.util.FileUtils correctly finds the runtime-jar file.
- recoder.io.DefaultProjectFileIO no longer throws NullPointerException when
specifying file in current directory
- recoder.convenience.Naming.toCanonicalName(CompilationUnit) now allows CUs
without any type declaration. Needed for package-info.java.
- Changes and Additions
- ClassType.getConstructors now returns List extends Constructor> instead of List.
Unlike methods, constructors are not inherited, so this makes the API a little bit more
flexible (subclasses use covariant return types)
- small enhancement: static accesses to non-static members are now detected and reported
as errors if the reference prefix is a type reference
Release notes for 0.81 (of May 8th, 2006)
- Bug fixes
- Lots of bugs concerning java 5 features have been fixed since 0.80beta. AN UPDATE IS HIGHLY RECOMMENDED
- Changes
- VariableDeclaration.getVariables() is not modifiable any more due to implementation of ParameterDeclaration.
- The type-specific lists in the recoder.list package have been replaced with a clean java 5 generic
collections-based implementation.
- Additions
- recoder.kit.transformation.java5to4 contains a set of transformations that convert Java 5 code and make it
complient to Java 1.4. There are still some bugs in the transformations dealing with generics and co-variant
return types.
- ClassFile now stores its original data location, readable with ClassFile.getLocation()
Release notes for 0.8beta (of February 2nd, 2006)
-
Additions
- Java 5 support, including
- support for static imports
- support for variable number of arguments (vararg)
- support for autoboxing
- support for enhanced for loops
- support for annotations
- support for enums
- support for generics
- Added project settings:
- JAVA_5 to enable java 5 support
- TABSIZE to manually set the tab size when parsing files; defaults to 8.
Note that this must be set before parsing to have any meaning.
- API Changes
- support for static imports required that the parent type of Identifier
was changed from NamedProgramElement to NonTerminalProgramElement; see Coding and Porting
- instead of Modifiers, members now have DeclarationSpecifiers, meaning annotations + modifiers;
see Coding and Porting
- Other Changes
- java.lang.Object is now always a direct superclass for interfaces,
not only if no other supertypes were present (this is the behaviour as it is in bytecode class files)
While this is not compliant with java language spec, it's the desired behaviour for bytecode types,
and we think that types provided in sourcecode should behave as closely as possible to those
provided in bytecode
- incorporated some improvements from the original Java 1.5 grammar for JavaCC
(i.e., improved unicode support)
- types available as source in .jar files will not be loaded any more. This was only done
when looking for types after having loaded all other source files.
We can't think of any value in loading them delayed, as it usually leads to unresolvable
type references
-
Changes in Progress
- referencing a non-static member from a static context is now reported as an error; this doesn't
work entirely, yet.
-
Bugs Fixed
- Fixed a bug in JavaProgramFactory.initialize()
- Reset caches on changes of model element "extends"
- Fixed parser bug #1218730: "super" not accepted as a PrimarySuffix
- Constructors of static member classes may not have been parsed correctly by bytecode parser
- fixed a bug in JavaProgramFactory.parseLong(String)
- Known issues
- "Reflection import" is untested for annotations/enums and may not be complete.
For instance, generic field/method information is not read.
- Naming of local/anonymous types is not compliant with JLS of any version (note that
1.5 and 1.4 have different naming conventions for them, too). Also note that names of such types may vary from run to run, therefore
not producing deterministic results when querying them. This may or may not be changed
in later versions, depending on demand and time available on our account.
- semantics of annotations such as @Override are not evaluated.
Changes in 0.75 (of April 28th, 2005)
- Renamed Debug.assert()-Methods for Java 1.4 compatibility
- If writing back a compilation unit with no primary type, the original filename is kept
- Comments are attached to better matching model elements
- Deprecated NonTerminalProgramElement.getIndexOfChild(int) - see there for explanation
- JUnit is now used as testing framework
- Fixed bug: DefaultNameInfo was not updated on type renames
- Fixed bug when loading bytecode types with static initializer (Max Gensthaler)
- All constructors now validate parent roles
- Incomplete sources are being handled much better
- Fixed a bug in FileUtils
- Better handling for filenames under Windows
Changes in 0.73 (of May 10th, 2004)
- Fixed two bugs in DefaultConstantEvaluator
- Fixed bug in PrettyPrinter
- Fixed bug in getType method in DefaultSourceInfo
- Fixed bug in ClassInitializer
- Fixed bug in AbstractArrayList
- Fixed naming conflict of files "x.html" and "X.html" in converter-html and
converter-obfuscated-html examples.
Changes in 0.72 (of March 19th, 2002)
- Added contributors list.
- Added a lot of bells and whistles to the Sourcerer demo program.
- Added full subtype reporting.
- Added source element end coordinate assignment.
- Added internal data structures needed for incremental updates.
- Added extension classes localization auxiliary.
- Added further debug formatting options.
- Added transformations to remove certain garbage code.
- Added progress propagation to some relevant services and transformations.
- Added ant buildfile.
- Fixed byte code outer class parameter in member class constructors problem.
- Fixed fake default constructor bug.
- Fixed constructor full name issue.
- Fixed a package-related model update bug.
- Fixed a variable-versus-package resolution bug.
- Fixed a class cast problem concerning the New-operator prefix.
- Fixed some erroneous error handling situations.
- Fixed name concatenation reentrance.
- Fixed behavior of project initialization auxiliary classes.
- Fixed transitive inheritance problem when renaming methods.
Changes in 0.71 (of July 26th, 2001)
- Added
jdk1.4 property to turn assert
statement handling on and off. For now, default is
jdk1.4=false.
- Added error handler and resume ability. In certain cases, it can be
admissible to accept unknown references (e.g. analysis of incomplete
code, analysis and transformation of template code).
- Added compile-time control flow analysis to the SourceInfo
service and the StatementKit (new ControlFlowWalker and reachability
test).
- Added transformation to remove unused imports.
- Added a new Swing-based example application.
- Added toArray() functionality to lists.
- Fixed source element position setting in the pretty printer when
overwriteParsePositions property was set.
Correct positions are important for graphical frontends.
- Fixed parenthesized expression: was not a statement.
- Fixed semicolon problem after class initializers.
- Fixed pretty printer to accept multiple statements in a line.
- Added ProgramElementWalker interface.
- Added new source for type informations: the reflection mode queries the
current class objects of the running Java machine. Added new
class.search.mode property.
- Added RemoveUnusedImports transformation.
- Fixed RenamePackage transformation: index problem when full package
name was given.
- Fixed behavior of overriding properties with environment variables.
- Fixed custom doclet to work with JDK 1.3.1.
- Some refactorings done in PrettyPrinter and NameInfo.
- Fixed a model reset issue.
- Improved HTML generator example.
- Added a starters tour.
Changes in 0.70 (of May 31st, 2001)
Changes in 0.63 (of May 3rd, 2001)
- Added one pass transformation interface, an interface for project
data import, and the pretty printer became an instance of a general
visitor.
- Fixed some minor issues: ModelElement.setName removed,
more empty lists are returned instead of null.
- Rearranged services: merged
TypeSystemInfo into
ProgramModelInfo and SourceInfo,
made the CrossReferencer into a subclass of
SourceInfo .
- Fixed some minor issues involving expressions as prefixes for
new, manual addition of compilation units,
error reporting.
- New
SourceVisitor class as parent of the
PrettyPrinter.
- Some minor additions to the kit classes.
- Fixed, improved and augmented example programs.
- Removed a lot of dead code.
Changes in 0.62 (of March 30th, 2001)
- Bug fixes (Windows paths in examples were broken, problems
with overwritten local type and variable declarations fixed,
inner types now have unambiguous names).
- Issue list has been updated and numbered.
Changes in 0.61 (of January 5th, 2001)
- Small but significant bug fixes (hash table deletion, package object
initialization).
- Archives define a top level directory.
- Examples available for download (shipped with the API documentation).
- Size of API Documentation reduced (no "use" index).
Changes in 0.60 (of December 8th, 2000)
- COMPOST got a manual.
- Some bug fixes, mostly related to inner classes.
- New transformation framework (not yet finished).
- Undo support.
- Improved source element position interface.
- Improved project setting handling.
- Some restructuring.
- Examples are nearly done.
Changes in 0.52 (of June 27th, 2000)
- Minor bug fixes.
- Minor improvements and additions.
Changes in 0.51 (of April 26th, 2000)
- Minor bug fixes.
- Minor improvements and additions in several kit classes.
Changes in 0.5 (of April 7th, 2000)
- Improved performance (250%) and reduced memory profile (70%).
- Much more features, much less bugs.
- More consistent, readable and maintainable interfaces and
implementations.
- New services and configurations
ChangeHistory,
CrossReferencer
- New transformation base package
compost.kit
- Redesigned composition model of
Composables.
Changes in 0.4