public CollectionMode onElement(CElementPropertyInfo p) { return p.isCollection() ? (p.isValueList() ? CollectionMode.REPEATED_VALUE : CollectionMode.REPEATED_ELEMENT) : CollectionMode.NOT_REPEATED; }
public CollectionMode onElement(CElementPropertyInfo p) { return p.isCollection() ? (p.isValueList() ? CollectionMode.REPEATED_VALUE : CollectionMode.REPEATED_ELEMENT) : CollectionMode.NOT_REPEATED; }
public U onBuiltinElement(CElementPropertyInfo elementPropertyInfo) { return !elementPropertyInfo.isCollection() ? classifier .onSingleBuiltinElement(elementPropertyInfo) : classifier .onCollectionBuiltinElement(elementPropertyInfo); }
public U onClassElement(CElementPropertyInfo elementPropertyInfo) { return !elementPropertyInfo.isCollection() ? classifier .onSingleClassElement(elementPropertyInfo) : classifier .onCollectionClassElement(elementPropertyInfo); }
public U onEnumElement(CElementPropertyInfo elementPropertyInfo) { return !elementPropertyInfo.isCollection() ? classifier .onSingleEnumElement(elementPropertyInfo) : classifier .onCollectionEnumElement(elementPropertyInfo); }
public U onArrayElement(CElementPropertyInfo elementPropertyInfo) { return !elementPropertyInfo.isCollection() ? classifier .onSingleArrayElement(elementPropertyInfo) : classifier .onCollectionArrayElement(elementPropertyInfo); }
public U onHeteroElement(CElementPropertyInfo elementPropertyInfo) { return !elementPropertyInfo.isCollection() ? classifier .onSingleHeteroElement(elementPropertyInfo) : classifier .onCollectionHeteroElement(elementPropertyInfo); }
public U onBuiltinElement(CElementPropertyInfo elementPropertyInfo) { return !elementPropertyInfo.isCollection() ? classifier .onSingleBuiltinElement(elementPropertyInfo) : classifier .onCollectionBuiltinElement(elementPropertyInfo); }
public boolean isUnboxable() { if(!isCollection() && !required) // if the property can be legally absent, it's not unboxable return false; // we need to have null to represent the absence of value. not unboxable. for (CTypeRef t : getTypes()) { if(t.isNillable()) return false; } return super.isUnboxable(); }
@Override public boolean isOptionalPrimitive() { // we need to have null to represent the absence of value. not unboxable. for (CTypeRef t : getTypes()) { if(t.isNillable()) return false; } return !isCollection() && !required && super.isUnboxable(); }
@Override public boolean isOptionalPrimitive() { // we need to have null to represent the absence of value. not unboxable. for (CTypeRef t : getTypes()) { if(t.isNillable()) return false; } return !isCollection() && !required && super.isUnboxable(); }
@Override public boolean isOptionalPrimitive() { // we need to have null to represent the absence of value. not unboxable. for (CTypeRef t : getTypes()) { if(t.isNillable()) return false; } return !isCollection() && !required && super.isUnboxable(); }
@Override public boolean isOptionalPrimitive() { // we need to have null to represent the absence of value. not unboxable. for (CTypeRef t : getTypes()) { if(t.isNillable()) return false; } return !isCollection() && !required && super.isUnboxable(); }
public boolean isUnboxable() { if(!isCollection() && !required) // if the property can be legally absent, it's not unboxable return false; // we need to have null to represent the absence of value. not unboxable. for (CTypeRef t : getTypes()) { if(t.isNillable()) return false; } return super.isUnboxable(); }
public boolean isUnboxable() { if(!isCollection() && !required) // if the property can be legally absent, it's not unboxable return false; // we need to have null to represent the absence of value. not unboxable. for (CTypeRef t : getTypes()) { if(t.isNillable()) return false; } return super.isUnboxable(); }
@Override public boolean isOptionalPrimitive() { // we need to have null to represent the absence of value. not unboxable. for (CTypeRef t : getTypes()) { if(t.isNillable()) return false; } return !isCollection() && !required && super.isUnboxable(); }
protected ElementMappingImpl(JAXBModelImpl parent, CElementInfo elementInfo) { super(parent,elementInfo); TypeUse t = clazz.getContentType(); if(clazz.getProperty().isCollection()) t = TypeUseFactory.makeCollection(t); CAdapter a = clazz.getProperty().getAdapter(); if(a!=null) t = TypeUseFactory.adapt(t,a); taa = new TypeAndAnnotationImpl(parent.outline,t); }
public NType getContentInMemoryType() { if(getProperty().getAdapter()==null) { NType itemType = getContentType().getType(); if(!property.isCollection()) return itemType; return NavigatorImpl.createParameterizedType(List.class,itemType); } else { return getProperty().getAdapter().customType; } }
protected ElementMappingImpl(JAXBModelImpl parent, CElementInfo elementInfo) { super(parent,elementInfo); TypeUse t = clazz.getContentType(); if(clazz.getProperty().isCollection()) t = TypeUseFactory.makeCollection(t); CAdapter a = clazz.getProperty().getAdapter(); if(a!=null) t = TypeUseFactory.adapt(t,a); taa = new TypeAndAnnotationImpl(parent.outline,t); }
protected ElementMappingImpl(JAXBModelImpl parent, CElementInfo elementInfo) { super(parent,elementInfo); TypeUse t = clazz.getContentType(); if(clazz.getProperty().isCollection()) t = TypeUseFactory.makeCollection(t); CAdapter a = clazz.getProperty().getAdapter(); if(a!=null) t = TypeUseFactory.adapt(t,a); taa = new TypeAndAnnotationImpl(parent.outline,t); }