I want to use aspectj to declare the JAXB annotations on an enum type,
can this be done?

This is the normal Java way:
@XmlEnum
public enum Test {
    @XmlEnumValue("4")
    FOUR("4"),
    @XmlEnumValue("6")
    SIX("6");
    private final String value;
    Test(String v) {
        value = v;
    }
    public String value() {
        return value;
    }
}

But I want this:
public enum Test {
    FOUR("4"),
    SIX("6");
    private final String value;
    Test(String v) {
        value = v;
    }
    public String value() {
        return value;
    }
}

So I have this:
declare @type : Test : @XmlEnum;
declare @field : Test.FOUR : @XmlEnumValue("4");

But I want a way to make the field annotation introduction based on
the field name:
declare @field : Test.* : @XmlEnumValue(thisJoinPoint.getNameOfField());

Thanks,
Mike
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to