Versions Compared

Key

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

...

Code Block
java
java
package demo;
/**
 * @demo.Target$OneWay
 */
public class Target {
  public static classinterface OneWay {}
}

or (with dot)

Code Block
java
java
package demo;
/**
 * @demo.Target.OneWay
 */
public class Target {
  public static classinterface OneWay {}
}

Annotation default values

JSR-175 annotation support default values. This is supported in backport175 with the org.codehaus.backport175.DefaultValue special annotation, that only accepts one single anonymous value whose type must match the one of the annotation element which has this default value :

Code Block
java
java

package demo;
/**
 * @demo.Target.OneWayDefaulted
 */
public class TargetUsingDefaultValue {

  public static interface OneWayDefaulted {
    /**
     * @org.codehaus.backport175.DefaultValue("default message")
     */
    String message();
  }
}

/**
 * @demo.Target.OneWayDefaulted(message="this is not the default message !")
 */
public class TargetNOTUsingDefaultValue {

  ...
}
Code Block