I have a class with numerous parameters of various types. I want to iterate over all type A members , and run a specific functions ( A.doSomething() )
This doesn't even compile: The conversion from field to XPathDataElement is illegal
Field[] fields = this.getClass().getDeclaredFields();
for (Field field : fields) {
if (field. getType().getName().equals(XPathDataElement.class.getName()))
{
tmp = (XPathDataElement)field; // Doesn't compile
sb.append(field.getName() + ":");
tmp.update();
}
}
Thanks!