public <A extends Annotation> A readAnnotation(Class<A> annotationType) { return core.readAnnotation(annotationType); }
public final <A extends Annotation> A readAnnotation(Class<A> annotationType) { return seed.readAnnotation(annotationType); }
public ReferencePropertyInfoImpl( ClassInfoImpl<T,C,F,M> classInfo, PropertySeed<T,C,F,M> seed) { super(classInfo, seed); isMixed = seed.readAnnotation(XmlMixed.class) != null; XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class); if(xae==null) { wildcard = null; domHandler = null; } else { wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP; domHandler = nav().asDecl(reader().getClassValue(xae,"value")); } }
AttributePropertyInfoImpl(ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent, PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> seed ) { super(parent,seed); XmlAttribute att = seed.readAnnotation(XmlAttribute.class); assert att!=null; if(att.required()) isRequired = true; else isRequired = nav().isPrimitive(getIndividualType()); this.xmlName = calcXmlName(att); }
public final <A extends Annotation> A readAnnotation(Class<A> annotationType) { return seed.readAnnotation(annotationType); }
public <A extends Annotation> A readAnnotation(Class<A> annotationType) { return core.readAnnotation(annotationType); }
XmlElement[] ann=null; XmlElement xe = seed.readAnnotation(XmlElement.class); XmlElements xes = seed.readAnnotation(XmlElements.class);
public ERPropertyInfoImpl(ClassInfoImpl<TypeT, ClassDeclT, FieldT, MethodT> classInfo, PropertySeed<TypeT, ClassDeclT, FieldT, MethodT> propertySeed) { super(classInfo, propertySeed); XmlElementWrapper e = seed.readAnnotation(XmlElementWrapper.class); boolean nil = false; boolean required = false; if(!isCollection()) { xmlName = null; if(e!=null) classInfo.builder.reportError(new IllegalAnnotationException( Messages.XML_ELEMENT_WRAPPER_ON_NON_COLLECTION.format( nav().getClassName(parent.getClazz())+'.'+seed.getName()), e )); } else { if(e!=null) { xmlName = calcXmlName(e); nil = e.nillable(); required = e.required(); } else xmlName = null; } wrapperNillable = nil; wrapperRequired = required; }
public MapPropertyInfoImpl(ClassInfoImpl<T,C,F,M> ci, PropertySeed<T,C,F,M> seed) { super(ci, seed); XmlElementWrapper xe = seed.readAnnotation(XmlElementWrapper.class); xmlName = calcXmlName(xe); nil = xe!=null && xe.nillable(); T raw = getRawType(); T bt = nav().getBaseClass(raw, nav().asDecl(Map.class) ); assert bt!=null; // Map property is only for Maps if(nav().isParameterizedType(bt)) { keyType = nav().getTypeArgument(bt,0); valueType = nav().getTypeArgument(bt,1); } else { keyType = valueType = nav().ref(Object.class); } }
parent.builder.reportError(new IllegalAnnotationException( Messages.ILLEGAL_ANNOTATION.format(XmlMimeType.class.getName()), seed.readAnnotation(XmlMimeType.class) )); mt = null; if(xjta==null) { XmlAttachmentRef xsa = seed.readAnnotation(XmlAttachmentRef.class); if(xsa!=null) { parent.builder.hasSwaRef = true; xjta = seed.readAnnotation(XmlJavaTypeAdapter.class); if(xjta!=null) { T ad = reader().getClassValue(xjta,"value");
private XmlJavaTypeAdapter getApplicableAdapter(T type) { XmlJavaTypeAdapter jta = seed.readAnnotation(XmlJavaTypeAdapter.class); if(jta!=null && isApplicable(jta,type)) return jta; // check the applicable adapters on the package XmlJavaTypeAdapters jtas = reader().getPackageAnnotation(XmlJavaTypeAdapters.class, parent.clazz, seed ); if(jtas!=null) { for (XmlJavaTypeAdapter xjta : jtas.value()) { if(isApplicable(xjta,type)) return xjta; } } jta = reader().getPackageAnnotation(XmlJavaTypeAdapter.class, parent.clazz, seed ); if(isApplicable(jta,type)) return jta; // then on the target class C refType = nav().asDecl(type); if(refType!=null) { jta = reader().getClassAnnotation(XmlJavaTypeAdapter.class, refType, seed ); if(jta!=null && isApplicable(jta,type)) // the one on the type always apply. return jta; } return null; }
XmlElementRef[] ann; types = new LinkedHashSet<Element<T,C>>(); XmlElementRefs refs = seed.readAnnotation(XmlElementRefs.class); XmlElementRef ref = seed.readAnnotation(XmlElementRef.class); refs = sd.readAnnotation(XmlElementRefs.class); ref = sd.readAnnotation(XmlElementRef.class);
continue; for( Class<? extends Annotation> m : sa.members ) { Annotation offender = seed.readAnnotation(m); if(offender!=null) {
public ReferencePropertyInfoImpl( ClassInfoImpl<T,C,F,M> classInfo, PropertySeed<T,C,F,M> seed) { super(classInfo, seed); isMixed = seed.readAnnotation(XmlMixed.class) != null; XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class); if(xae==null) { wildcard = null; domHandler = null; } else { wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP; domHandler = nav().asDecl(reader().getClassValue(xae,"value")); } }
AttributePropertyInfoImpl(ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent, PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> seed ) { super(parent,seed); XmlAttribute att = seed.readAnnotation(XmlAttribute.class); assert att!=null; if(att.required()) isRequired = true; else isRequired = nav().isPrimitive(getIndividualType()); this.xmlName = calcXmlName(att); }
XmlElement[] ann=null; XmlElement xe = seed.readAnnotation(XmlElement.class); XmlElements xes = seed.readAnnotation(XmlElements.class);
public ERPropertyInfoImpl(ClassInfoImpl<TypeT, ClassDeclT, FieldT, MethodT> classInfo, PropertySeed<TypeT, ClassDeclT, FieldT, MethodT> propertySeed) { super(classInfo, propertySeed); XmlElementWrapper e = seed.readAnnotation(XmlElementWrapper.class); boolean nil = false; boolean required = false; if(!isCollection()) { xmlName = null; if(e!=null) classInfo.builder.reportError(new IllegalAnnotationException( Messages.XML_ELEMENT_WRAPPER_ON_NON_COLLECTION.format( nav().getClassName(parent.getClazz())+'.'+seed.getName()), e )); } else { if(e!=null) { xmlName = calcXmlName(e); nil = e.nillable(); required = e.required(); } else xmlName = null; } wrapperNillable = nil; wrapperRequired = required; }
public MapPropertyInfoImpl(ClassInfoImpl<T,C,F,M> ci, PropertySeed<T,C,F,M> seed) { super(ci, seed); XmlElementWrapper xe = seed.readAnnotation(XmlElementWrapper.class); xmlName = calcXmlName(xe); nil = xe!=null && xe.nillable(); T raw = getRawType(); T bt = nav().getBaseClass(raw, nav().asDecl(Map.class) ); assert bt!=null; // Map property is only for Maps if(nav().isParameterizedType(bt)) { keyType = nav().getTypeArgument(bt,0); valueType = nav().getTypeArgument(bt,1); } else { keyType = valueType = nav().ref(Object.class); } }
parent.builder.reportError(new IllegalAnnotationException( Messages.ILLEGAL_ANNOTATION.format(XmlMimeType.class.getName()), seed.readAnnotation(XmlMimeType.class) )); mt = null; if(xjta==null) { XmlAttachmentRef xsa = seed.readAnnotation(XmlAttachmentRef.class); if(xsa!=null) { parent.builder.hasSwaRef = true; xjta = seed.readAnnotation(XmlJavaTypeAdapter.class); if(xjta!=null) { T ad = reader().getClassValue(xjta,"value");
private XmlJavaTypeAdapter getApplicableAdapter(T type) { XmlJavaTypeAdapter jta = seed.readAnnotation(XmlJavaTypeAdapter.class); if(jta!=null && isApplicable(jta,type)) return jta; // check the applicable adapters on the package XmlJavaTypeAdapters jtas = reader().getPackageAnnotation(XmlJavaTypeAdapters.class, parent.clazz, seed ); if(jtas!=null) { for (XmlJavaTypeAdapter xjta : jtas.value()) { if(isApplicable(xjta,type)) return xjta; } } jta = reader().getPackageAnnotation(XmlJavaTypeAdapter.class, parent.clazz, seed ); if(isApplicable(jta,type)) return jta; // then on the target class C refType = nav().asDecl(type); if(refType!=null) { jta = reader().getClassAnnotation(XmlJavaTypeAdapter.class, refType, seed ); if(jta!=null && isApplicable(jta,type)) // the one on the type always apply. return jta; } return null; }