Next in thread → Next in month →

NEW ISSUE: Clarify the name implied by setter method for property andreference names

From
C Vamsi <>
Date
2008-12-12T14:00:01+00:00
ID
Thread
NEW ISSUE: Clarify the name implied by setter method for property andreference names
TARGET: sca-javaci-draft-20070926.doc
sca-javacaa-1.1-spec-cd01-rev1.pdf

DESCRIPTION:
@Property and @Reference annotations without the name attribute applied on
setter methods require the property/reference name to be computed from the
method name.  In CAA and CI specs we mention "... name of the field or
setter".  What happens in the following case?

public class WeirdHello {

    @Property
    public void setPrefix(String prefix) {
    ...
    }

    @Property
    public void setprefix(String prefix) {
    ...
   }

    @Property
    public void setID(String id) {
    ...
   }
   ...
}

There is nothing syntactically wrong with this class.  What will be the
propery names in this case?  Will setID() method result in a property with
name ID or iD ?  Is it an error?  It is not clear and we need to make it
clear.

PROPOSAL: Clarify that the name implied by the setter method is the name
obtained by removing "set" from the method name.  For e.g. setID() will
result in "ID", setid() will result in "id" and setPrefix() will result in
"Prefix" not "prefix".

++Vamsi
Apache Tuscany Committer  http://tuscany.apache.org
Apache Geronimo Committer and Member of PMC  http://geronimo.apache.org
Next in thread → Next in month →