h3. Intro
The task is to create annotations that can be used to annotate classes that need to be marshalled to XML. These annotations are going to be processed at runtime.
h3. My first annotation
We add the retention annotation so the compiler keeps it available at runtime
{code}
@Retention(RetentionPolicy.RUNTIME)
public @interface XmlElement {
String namespace() default "duh";
}
{code}
The task is to create annotations that can be used to annotate classes that need to be marshalled to XML. These annotations are going to be processed at runtime.
h3. My first annotation
We add the retention annotation so the compiler keeps it available at runtime
{code}
@Retention(RetentionPolicy.RUNTIME)
public @interface XmlElement {
String namespace() default "duh";
}
{code}