I am considering starting a project which is used to generate code in Java using annotations (I won\'t get into specifics, as it\'s not really relevant). I am wondering about th
One specific which would be helpful in answering the question would be as opposed to what? Not doing the project, or doing it not using annotations? And if not using annotations, what are the alternatives?
Personally, I find excessive annotations unreadable, and many times too inflexible. Take a look at this for one method on a web service to implement a vendor required WSDL:
@WebMethod(action=QBWSBean.NS+"receiveResponseXML")
@WebResult(name="receiveResponseXML"+result,targetNamespace = QBWSBean.NS)
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public int receiveResponseXML(
@WebParam(name = "ticket",targetNamespace = QBWSBean.NS) String ticket,
@WebParam(name = "response",targetNamespace = QBWSBean.NS) String response,
@WebParam(name = "hresult",targetNamespace = QBWSBean.NS) String hresult,
@WebParam(name = "message",targetNamespace = QBWSBean.NS) String message) {
I find that code highly unreadable. An XML configuration alternative isn't necessarily better, though.