private void setXmlAttributeInfo(XmlAttribute attr, String fieldName, Type defaultGenericType) { JaxbAttributeInfo info = new JaxbAttributeInfo(this, attr, fieldName, defaultGenericType); String name = info.getName(); Class<?> atomClass = info.getAtomClass(); if (atomClass != null && !Strings.isNullOrEmpty(name)) { attrInfo.add(info); } }
public Class<?> getClassForAttribute(String name) { JaxbAttributeInfo info = getAttrInfo(name); if (info == null) { JaxbInfo encClassInfo = getSuperClassInfo(); if (encClassInfo != null) { return encClassInfo.getClassForAttribute(name); } return null; } return info.getAtomClass(); }
private JaxbAttributeInfo getAttrInfo(String name) { if (name == null) { return null; } for (JaxbAttributeInfo entry : attrInfo) { if (name.equals(entry.getName())) { return entry; } } return null; }