Small Open Source Java Tools and Libraries


Use annotations

Don't like the XML configuration? No problem, you can use the @Archived Internal link outside layout  annotation to mark your old classes.

Here is an example of an archived class marked with @Deprecated and @Archived:
package my.test.old.address.v1;

@Archived(clasz = my.test.Address.class, converter = my.test.old.address.v1.AddressConverter.class)
public class Address implements Serializable {
The ArchivedHistoryBuilder Internal link outside layout  will create a ClassesHistory Internal link outside layout  by collecting all classes marked with the annotation:
ClassesHistory history = ArchivedHistoryBuilder.create("versionUID", new SimpleConverterFactory(), "my.test.old");

Keep archived classes separated

It's a good idea to move the old classes into an separate project and create an "old-versions.jar" file. This way you can keep your code free from informations about the old classes.