public SingleMapNodeProperty(JAXBContextImpl context, RuntimeMapPropertyInfo prop) {
    super(context, prop);
    acc = prop.getAccessor().optimize(context);
    this.tagName = context.nameBuilder.createElementName(prop.getXmlName());
    this.entryTag = context.nameBuilder.createElementName("", "entry");
    this.keyTag = context.nameBuilder.createElementName("", "key");
    this.valueTag = context.nameBuilder.createElementName("", "value");
    this.nillable = prop.isCollectionNillable();
    this.keyBeanInfo = context.getOrCreate(prop.getKeyType());
    this.valueBeanInfo = context.getOrCreate(prop.getValueType());

    // infer the implementation class
    Class<ValueT> sig = ReflectionNavigator.REFLECTION.erasure(prop.getRawType());
    mapImplClass = ClassFactory.inferImplClass(sig, knownImplClasses);
    // TODO: error check for mapImplClass==null
    // what is the error reporting path for this part of the code?
  }
コード例 #2
0
 public <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz) throws JAXBException {
   return context.getBeanInfo(clazz, true);
 }