Пример #1
0
 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);
   }
 }
Пример #2
0
 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();
 }
Пример #3
0
 private JaxbAttributeInfo getAttrInfo(String name) {
   if (name == null) {
     return null;
   }
   for (JaxbAttributeInfo entry : attrInfo) {
     if (name.equals(entry.getName())) {
       return entry;
     }
   }
   return null;
 }