Advice on how to achieve setting properties on an arbitrary class
Austin Brooks <[email protected]>
| Newsgroups | gmane.comp.jakarta.ant.user |
|---|---|
| Message-ID | <CAPoe8aR0yXRFQbAAm3pUXq-3+7VCvGh1nqJEXHtf7c_sT_D5SA@mail.gmail.com> |
What is the best way to achieve something that can resemble the following? <healthCheck class="....urlCheck" serverPort="8080" path="/ping" /> <healthCheck class="....portCheck" serverPort="8080" /> Basically, I am trying to make an extendable health check task that takes a class and is then configured using additional attributes or elements. I am not overly restricted to a certain syntax. The only real requirements I have are: 1. Is extendable by passing any class to the class attribute 2. Custom class is not tied to ant, will pass configuration via hash map or reflection property setting So is there a way to configure this by sub-elements or defining a method that is a collect all bucket for unknown attributes? Thanks