<div dir="ltr"><div class="gmail_extra">2013/1/18 Emmanuel Bernard <span dir="ltr">&lt;<a href="mailto:emmanuel@hibernate.org" target="_blank">emmanuel@hibernate.org</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div id=":2x2">Do you think it makes sense to force people to always use getter for<br>
getters? My only concern is that it might feel awkward for what I call<br>
action getters that people don&#39;t consider getters.</div></blockquote><div><br></div><div style>Hum, I don&#39;t think it makes sense to enforce this. The idea is that you can chose to use either &quot;getter&quot;:</div>
<div style><br></div><div style><div>    &lt;getter name=&quot;foo&quot;&gt;</div><div>        &lt;valid/&gt;<br></div><div>        &lt;constraint annotation=&quot;javax.validation.constraints.NotNull&quot;/&gt;</div><div>
    &lt;/getter&gt;</div><div><br></div></div></div>or &quot;method&quot; (e.g. for an &quot;action getter&quot;):</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div>    &lt;method name=&quot;getFoo&quot;&gt;</div>
<div style>        &lt;return-value&gt;</div><div style>            &lt;valid/&gt;</div><div>            &lt;constraint annotation=&quot;javax.validation.constraints.NotNull&quot;/&gt;</div><div>        &lt;/return-value&gt;<br>
</div><div>    &lt;/method&gt;</div><br></div><div class="gmail_extra" style>as you like, but not both at the same time as they could conflict (similar to that you must not have two &quot;getter&quot; elements with the same name).</div>
</div>