static Quick[] getAll() { return new Quick[] {new XmlAttributeQuick(null, null), new XmlElementQuick(null, null), new XmlElementDeclQuick(null, null), new XmlElementRefQuick(null, null), new XmlElementRefsQuick(null, null), new XmlEnumQuick(null, null), new XmlRootElementQuick(null, null), new XmlSchemaQuick(null, null), new XmlSchemaTypeQuick(null, null), new XmlTransientQuick(null, null), new XmlTypeQuick(null, null), new XmlValueQuick(null, null)}; }
public boolean hasMethodAnnotation(Class<? extends Annotation> annotation, String propertyName, M getter, M setter, Locatable srcPos) { boolean x = ( getter != null && hasMethodAnnotation(annotation, getter) ); boolean y = ( setter != null && hasMethodAnnotation(annotation, setter) ); if(x && y) { // both are present. have getMethodAnnotation report an error getMethodAnnotation(annotation,getter,setter,srcPos); } return x||y; }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlTypeQuick(upstream, ((XmlType) core)); }
public Annotation[] getAllMethodAnnotations(Method method, Locatable srcPos) { Annotation[] r = method.getAnnotations(); for( int i=0; i<r.length; i++ ) { r[i] = LocatableAnnotation.create(r[i],srcPos); } return r; }
/** * Gets an annotation that are allowed on both class and type. */ private <T extends Annotation> T getClassOrPackageAnnotation(Class<T> type) { T t = reader().getClassAnnotation(type,clazz,this); if(t!=null) return t; // defaults to the package level return reader().getPackageAnnotation(type,clazz,this); }
public Adapter( XmlJavaTypeAdapter spec, AnnotationReader<TypeT,ClassDeclT,?,?> reader, Navigator<TypeT,ClassDeclT,?,?> nav) { this( nav.asDecl(reader.getClassValue(spec,"value")), nav ); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlElementRefQuick(upstream, ((XmlElementRef) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlElementQuick(upstream, ((XmlElement) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlSchemaQuick(upstream, ((XmlSchema) core)); }
public String toString() { return format(); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlSchemaTypeQuick(upstream, ((XmlSchemaType) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlElementDeclQuick(upstream, ((XmlElementDecl) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlEnumQuick(upstream, ((XmlEnum) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlTransientQuick(upstream, ((XmlTransient) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlAttributeQuick(upstream, ((XmlAttribute) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlElementRefsQuick(upstream, ((XmlElementRefs) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlRootElementQuick(upstream, ((XmlRootElement) core)); }
protected Quick newInstance(Locatable upstream, Annotation core) { return new XmlValueQuick(upstream, ((XmlValue) core)); }
public Annotation[] getAllFieldAnnotations(Field field, Locatable srcPos) { Annotation[] r = field.getAnnotations(); for( int i=0; i<r.length; i++ ) { r[i] = LocatableAnnotation.create(r[i],srcPos); } return r; }
protected XmlAccessorFactory findXmlAccessorFactoryAnnotation(Class clazz) { XmlAccessorFactory factoryAnn = reader().getClassAnnotation(XmlAccessorFactory.class,clazz,this); if (factoryAnn == null) { factoryAnn = reader().getPackageAnnotation(XmlAccessorFactory.class,clazz,this); } return factoryAnn; }