From f36a52538db5a3127b01a4ea0f00ea0ee7db9cdf Mon Sep 17 00:00:00 2001 From: ribeaudc <ribeaudc> Date: Fri, 7 Mar 2008 09:47:05 +0000 Subject: [PATCH] [LMS-265] add: - method 'label()' to annotation 'BeanProperty' (kind of static alias). change: - specify an alias for each field annotated with 'BeanProperty'. - get rid of 'code' field when possible by extending 'Code' class (annotated with 'BeanProperty'). SVN: 4673 --- .../systemsx/cisd/common/annotation/BeanProperty.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/source/java/ch/systemsx/cisd/common/annotation/BeanProperty.java b/common/source/java/ch/systemsx/cisd/common/annotation/BeanProperty.java index a021a3df510..258ea2e58d7 100644 --- a/common/source/java/ch/systemsx/cisd/common/annotation/BeanProperty.java +++ b/common/source/java/ch/systemsx/cisd/common/annotation/BeanProperty.java @@ -37,8 +37,16 @@ public @interface BeanProperty /** * Whether this bean property is optional or not. * <p> - * Default is <code>false</code>. + * Default is <code>false</code> meaning that any field annotated with this is mandatory. * </p> */ public boolean optional() default false; + + /** + * Static label (or alias) for this annotated field. + * <p> + * This <b>must</b> be specified as the parser prefers to work with the label than with the field name. + * </p> + */ + public String label() default ""; } -- GitLab