Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java
java
// A Java 5 Annotation
public @interface Asynchronous {
    int timeout() default 05;
    String label();
}

// A Java 5 annotated method
@Asynchronous(timeout=5, label="will run for a while")
public Object someMethod() {
    ...
}

...

Code Block
java
java
// A Java 1.3/1.4 Annotation with backport175
public interface Asynchronous {
    /**
     * Default value is supported
     *
     * @org.codehaus.backport175.DefaultValue(5)
     */
    int timeout();

    String label();
}

// A Java 1.3/1.4 annotated method
/**
 * @Asynchronous(timeout=5, label="will run for a while")
 */
public Object someMethod() {
    ...
}

...