velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Reck <>
Subject Re: AW: introspection 'enhancement'
Date Fri, 02 Feb 2001 11:14:39 GMT
> I don't think the bean spec actually states this, but if you can tell me
> where, I would be happy to know.
> We *infer* this, but as far as I can tell, it doesn't say it.

Section 8.3 of beans_101.pdf (
	"If we discover a matching pair of get<PropertyName> and
	 set<PropertyName> methods that take and return the same 
	 type, then we regard these methods as defining a read-write 
	 property whose name will be <propertyName>. We will use the 
	 get<PropertyName> method get the property value and the 
	 set<PropertyName> method to set the property value. The pair 
	 of methods may be located either in the same class or one may 
	 be in a base class and the other may be in a derived class.

	 If we find only one of these methods, then we regard it as 
	 defining either a read-only or a write-only property called 

It clearly differentiates between set<PropertyName> and <propertyName> 
where the case of the first letter is different. This is standard 
Java coding convention. The JavaBean specification just uses the 
convention without needing to say this explicetely. If somebody
does not follow the Java and bean conventions, it is not a JavaBean
and tools will not to work according with the bean spec on it.

In a separate mail on this I said the users of non-bean setter 
methods can call the method explicetly.

:) Christoph

View raw message