protected ElementPropertyInfoImpl<T,C,F,M> createElementProperty(PropertySeed<T,C,F,M> seed) { return new ElementPropertyInfoImpl<T,C,F,M>(this,seed); }
parent.builder.reportError(new IllegalAnnotationException( Messages.MUTUALLY_EXCLUSIVE_ANNOTATIONS.format( nav().getClassName(parent.getClazz())+'#'+seed.getName(), xe.annotationType().getName(), xes.annotationType().getName()), xe, xes )); TypeT t = getIndividualType(); if(!nav().isPrimitive(t) || isCollection()) isRequired = false; types.add(createTypeRef(calcXmlName((XmlElement)null),t,isCollection(),null)); } else { for( XmlElement item : ann ) { QName name = calcXmlName(item); TypeT type = reader().getClassValue(item, "type"); if (nav().isSameType(type, nav().ref(XmlElement.DEFAULT.class))) type = getIndividualType(); if((!nav().isPrimitive(type) || isCollection()) && !item.required()) isRequired = false; types.add(createTypeRef(name, type, item.nillable(), getDefaultValue(item.defaultValue()) ));
protected void link() { super.link(); for (TypeRefImpl<TypeT, ClassDeclT> ref : getTypes() ) { ref.link(); } if(isValueList()) { // ugly test, because IDREF's are represented as text on the wire, // it's OK to be a value list in that case. if(id()!= ID.IDREF) { // check if all the item types are simple types // this can't be done when we compute types because // not all TypeInfos are available yet for (TypeRefImpl<TypeT,ClassDeclT> ref : types) { if(!ref.getTarget().isSimpleType()) { parent.builder.reportError(new IllegalAnnotationException( Messages.XMLLIST_NEEDS_SIMPLETYPE.format( nav().getTypeName(ref.getTarget().getType())), this )); break; } } } if(!isCollection()) parent.builder.reportError(new IllegalAnnotationException( Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this )); } } }
public boolean isRequired() { if(isRequired==null) getTypes(); // compute the value return isRequired; }
public List<RuntimeTypeRefImpl> getTypes() { return (List<RuntimeTypeRefImpl>)super.getTypes(); } }
parent.builder.reportError(new IllegalAnnotationException( Messages.MUTUALLY_EXCLUSIVE_ANNOTATIONS.format( nav().getClassName(parent.getClazz())+'#'+seed.getName(), xe.annotationType().getName(), xes.annotationType().getName()), xe, xes )); TypeT t = getIndividualType(); if(!nav().isPrimitive(t) || isCollection()) isRequired = false; types.add(createTypeRef(calcXmlName((XmlElement)null),t,isCollection(),null)); } else { for( XmlElement item : ann ) { QName name = calcXmlName(item); TypeT type = reader().getClassValue(item, "type"); if (nav().isSameType(type, nav().ref(XmlElement.DEFAULT.class))) type = getIndividualType(); if((!nav().isPrimitive(type) || isCollection()) && !item.required()) isRequired = false; types.add(createTypeRef(name, type, item.nillable(), getDefaultValue(item.defaultValue()) ));
protected void link() { super.link(); for (TypeRefImpl<TypeT, ClassDeclT> ref : getTypes() ) { ref.link(); } if(isValueList()) { // ugly test, because IDREF's are represented as text on the wire, // it's OK to be a value list in that case. if(id()!= ID.IDREF) { // check if all the item types are simple types // this can't be done when we compute types because // not all TypeInfos are available yet for (TypeRefImpl<TypeT,ClassDeclT> ref : types) { if(!ref.getTarget().isSimpleType()) { parent.builder.reportError(new IllegalAnnotationException( Messages.XMLLIST_NEEDS_SIMPLETYPE.format( nav().getTypeName(ref.getTarget().getType())), this )); break; } } } if(!isCollection()) parent.builder.reportError(new IllegalAnnotationException( Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this )); } } }
public int size() { return getTypes().size(); } };
protected ElementPropertyInfoImpl<T,C,F,M> createElementProperty(PropertySeed<T,C,F,M> seed) { return new ElementPropertyInfoImpl<T,C,F,M>(this,seed); }
parent.builder.reportError(new IllegalAnnotationException( Messages.MUTUALLY_EXCLUSIVE_ANNOTATIONS.format( nav().getClassName(parent.getClazz())+'#'+seed.getName(), xe.annotationType().getName(), xes.annotationType().getName()), xe, xes )); TypeT t = getIndividualType(); if(!nav().isPrimitive(t) || isCollection()) isRequired = false; types.add(createTypeRef(calcXmlName((XmlElement)null),t,isCollection(),null)); } else { for( XmlElement item : ann ) { QName name = calcXmlName(item); TypeT type = reader().getClassValue(item, "type"); if (nav().isSameType(type, nav().ref(XmlElement.DEFAULT.class))) type = getIndividualType(); if((!nav().isPrimitive(type) || isCollection()) && !item.required()) isRequired = false; types.add(createTypeRef(name, type, item.nillable(), getDefaultValue(item.defaultValue()) ));
protected void link() { super.link(); for (TypeRefImpl<TypeT, ClassDeclT> ref : getTypes() ) { ref.link(); } if(isValueList()) { // ugly test, because IDREF's are represented as text on the wire, // it's OK to be a value list in that case. if(id()!= ID.IDREF) { // check if all the item types are simple types // this can't be done when we compute types because // not all TypeInfos are available yet for (TypeRefImpl<TypeT,ClassDeclT> ref : types) { if(!ref.getTarget().isSimpleType()) { parent.builder.reportError(new IllegalAnnotationException( Messages.XMLLIST_NEEDS_SIMPLETYPE.format( nav().getTypeName(ref.getTarget().getType())), this )); break; } } } if(!isCollection()) parent.builder.reportError(new IllegalAnnotationException( Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this )); } } }
public TypeInfo<TypeT,ClassDeclT> get(int index) { return getTypes().get(index).getTarget(); }
protected ElementPropertyInfoImpl<T,C,F,M> createElementProperty(PropertySeed<T,C,F,M> seed) { return new ElementPropertyInfoImpl<T,C,F,M>(this,seed); }
parent.builder.reportError(new IllegalAnnotationException( Messages.MUTUALLY_EXCLUSIVE_ANNOTATIONS.format( nav().getClassName(parent.getClazz())+'#'+seed.getName(), xe.annotationType().getName(), xes.annotationType().getName()), xe, xes )); TypeT t = getIndividualType(); if(!nav().isPrimitive(t) || isCollection()) isRequired = false; types.add(createTypeRef(calcXmlName((XmlElement)null),t,isCollection(),null)); } else { for( XmlElement item : ann ) { QName name = calcXmlName(item); TypeT type = reader().getClassValue(item, "type"); if (nav().isSameType(type, nav().ref(XmlElement.DEFAULT.class))) type = getIndividualType(); if((!nav().isPrimitive(type) || isCollection()) && !item.required()) isRequired = false; types.add(createTypeRef(name, type, item.nillable(), getDefaultValue(item.defaultValue()) ));
protected void link() { super.link(); for (TypeRefImpl<TypeT, ClassDeclT> ref : getTypes() ) { ref.link(); } if(isValueList()) { // ugly test, because IDREF's are represented as text on the wire, // it's OK to be a value list in that case. if(id()!= ID.IDREF) { // check if all the item types are simple types // this can't be done when we compute types because // not all TypeInfos are available yet for (TypeRefImpl<TypeT,ClassDeclT> ref : types) { if(!ref.getTarget().isSimpleType()) { parent.builder.reportError(new IllegalAnnotationException( Messages.XMLLIST_NEEDS_SIMPLETYPE.format( nav().getTypeName(ref.getTarget().getType())), this )); break; } } } if(!isCollection()) parent.builder.reportError(new IllegalAnnotationException( Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this )); } } }
public boolean isRequired() { if(isRequired==null) getTypes(); // compute the value return isRequired; }
protected ElementPropertyInfoImpl<T,C,F,M> createElementProperty(PropertySeed<T,C,F,M> seed) { return new ElementPropertyInfoImpl<T,C,F,M>(this,seed); }
public List<RuntimeTypeRefImpl> getTypes() { return (List<RuntimeTypeRefImpl>)super.getTypes(); } }
public int size() { return getTypes().size(); } };
public TypeInfo<TypeT,ClassDeclT> get(int index) { return getTypes().get(index).getTarget(); }