You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by Chad Schoettger <ch...@gmail.com> on 2005/10/07 23:14:28 UTC

Should control annotation constraints be validated when compiling a ControlInterface?

I was taking a look at BEEHIVE-793, "Declaring control membership constraint
AT_LEAST_ONE and EXACTLY_ONE",
which is basically an enhancement request to existing functionality.

The creator of the bug requests that the following code fail at compile
time:

@ControlInterface
public interface Foo {
@PropertySet
@Target ({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@AnnotationConstraints.MembershipRule(
AnnotationConstraints.MembershipRuleValues.AT_LEAST_ONE)
public @interface Material
{
/*
public Object paper;
public Object cover;
*/
}
}


The current behavior is that when a child control of this control is
annotated with the 'Material' annotation its compilation will fail with the
appropriate error.
I'm not seeing much value in this enhancement and would probably choose to
resolve it with a resolution of won't fix.

Anyone on the dev list have a different opinion ?? Should control annotation
constraints be validated on ControlInterfaces when the ControlInterface is
compiled?

- Chad