Package com.sun.xml.bind.v2.runtime

Examples of com.sun.xml.bind.v2.runtime.IllegalAnnotationException


/*      */     private int checkedGet(PropertyInfoImpl p) {
/*  481 */       Integer i = (Integer)get(p.getName());
/*  482 */       if (i == null)
/*      */       {
/*  484 */         if (p.kind().isOrdered) {
/*  485 */           ClassInfoImpl.this.builder.reportError(new IllegalAnnotationException(Messages.PROPERTY_MISSING_FROM_ORDER.format(new Object[] { p.getName() }), p));
/*      */         }
/*      */
/*  489 */         i = Integer.valueOf(size());
/*  490 */         put(p.getName(), i);
/*      */       }
/*      */
/*  494 */       int ii = i.intValue();
/*  495 */       if (ii < this.used.length) {
/*  496 */         if ((this.used[ii] != null) && (this.used[ii] != p)) {
/*  497 */           if (this.collidedNames == null) this.collidedNames = new HashSet();
/*      */
/*  499 */           if (this.collidedNames.add(p.getName()))
/*      */           {
/*  501 */             ClassInfoImpl.this.builder.reportError(new IllegalAnnotationException(Messages.DUPLICATE_PROPERTIES.format(new Object[] { p.getName() }), p, this.used[ii]));
/*      */           }
/*      */         }
/*  504 */         this.used[ii] = p;
/*      */       }
/*      */
View Full Code Here


/*      */
/*      */             public int size() {
/*  523 */               return ClassInfoImpl.this.properties.size();
/*      */             }
/*      */           });
/*  526 */           ClassInfoImpl.this.builder.reportError(new IllegalAnnotationException(Messages.PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY.format(new Object[] { unusedName, nearest }), ClassInfoImpl.this));
/*      */         }
/*      */     }
View Full Code Here

/*     */     }
/*  81 */     if (a2 == null) {
/*  82 */       return a1;
/*     */     }
/*     */
/*  85 */     getErrorHandler().error(new IllegalAnnotationException(Messages.DUPLICATE_ANNOTATIONS.format(new Object[] { annotation.getName(), fullName(getter), fullName(setter) }), a1, a2));
/*     */
/*  90 */     return a1;
/*     */   }
View Full Code Here

/*      */     else {
/*  183 */       this.propOrder = DEFAULT_ORDER;
/*      */     }
/*      */
/*  186 */     if (nav().isInterface(clazz)) {
/*  187 */       builder.reportError(new IllegalAnnotationException(Messages.CANT_HANDLE_INTERFACE.format(new Object[] { nav().getClassName(clazz) }), this));
/*      */     }
/*      */
/*  192 */     if ((!hasFactoryConstructor(t)) &&
/*  193 */       (!nav().hasDefaultConstructor(clazz)))
/*      */     {
/*      */       Messages msg;
/*      */       Messages msg;
/*  195 */       if (nav().isInnerClass(clazz))
/*  196 */         msg = Messages.CANT_HANDLE_INNER_CLASS;
/*      */       else {
/*  198 */         msg = Messages.NO_DEFAULT_CONSTRUCTOR;
/*      */       }
/*  200 */       builder.reportError(new IllegalAnnotationException(msg.format(new Object[] { nav().getClassName(clazz) }), this));
/*      */     }
/*      */   }
View Full Code Here

/*  362 */     for (Iterator i$ = nav().getDeclaredFields(c).iterator(); i$.hasNext(); ) { Object f = i$.next();
/*  363 */       Annotation[] annotations = reader().getAllFieldAnnotations(f, this);
/*  364 */       if (nav().isTransient(f))
/*      */       {
/*  366 */         if (hasJAXBAnnotation(annotations)) {
/*  367 */           this.builder.reportError(new IllegalAnnotationException(Messages.TRANSIENT_FIELD_NOT_BINDABLE.format(new Object[] { nav().getFieldName(f) }), getSomeJAXBAnnotation(annotations)));
/*      */         }
/*      */
/*      */       }
/*  371 */       else if (nav().isStaticField(f))
/*      */       {
View Full Code Here

/*      */
/*  936 */       if (((at == XmlAccessType.PROPERTY) && (!isOverriding)) || ((at == XmlAccessType.PUBLIC_MEMBER) && (isConsideredPublic(getter)) && (isConsideredPublic(setter)) && (!isOverriding)) || (hasAnnotation))
/*      */       {
/*  940 */         if ((getter != null) && (setter != null) && (!nav().getReturnType(getter).equals(nav().getMethodParameters(setter)[0])))
/*      */         {
/*  943 */           this.builder.reportError(new IllegalAnnotationException(Messages.GETTER_SETTER_INCOMPATIBLE_TYPE.format(new Object[] { nav().getTypeName(nav().getReturnType(getter)), nav().getTypeName(nav().getMethodParameters(setter)[0]) }), new MethodLocatable(this, getter, nav()), new MethodLocatable(this, setter, nav())));
/*      */
/*  950 */           continue;
/*      */         }
/*      */         Annotation[] r;
/*      */         Annotation[] r;
View Full Code Here

/*      */   private void ensureNoAnnotation(M method)
/*      */   {
/* 1092 */     Annotation[] annotations = reader().getAllMethodAnnotations(method, this);
/* 1093 */     for (Annotation a : annotations)
/* 1094 */       if (isJAXBAnnotation(a)) {
/* 1095 */         this.builder.reportError(new IllegalAnnotationException(Messages.ANNOTATION_ON_WRONG_METHOD.format(new Object[0]), a));
/*      */
/* 1098 */         return;
/*      */       }
/*      */   }
View Full Code Here

/* 1232 */     Map names = new HashMap();
/* 1233 */     for (PropertyInfoImpl p : this.properties) {
/* 1234 */       p.link();
/* 1235 */       PropertyInfoImpl old = (PropertyInfoImpl)names.put(p.getName(), p);
/* 1236 */       if (old != null) {
/* 1237 */         this.builder.reportError(new IllegalAnnotationException(Messages.PROPERTY_COLLISION.format(new Object[] { p.getName() }), p, old));
/*      */       }
/*      */
/*      */     }
/*      */
/* 1242 */     super.link();
View Full Code Here

/* 1272 */           this.factoryMethod = m;
/* 1273 */           break;
/*      */         }
/*      */       }
/* 1276 */       if (this.factoryMethod == null) {
/* 1277 */         this.builder.reportError(new IllegalAnnotationException(Messages.NO_FACTORY_METHOD.format(new Object[] { nav().getClassName(nav().asDecl(fClass)), method }), this));
/*      */       }
/*      */     }
/* 1280 */     else if (!fClass.equals(nav().ref(XmlType.DEFAULT.class))) {
/* 1281 */       this.builder.reportError(new IllegalAnnotationException(Messages.FACTORY_CLASS_NEEDS_FACTORY_METHOD.format(new Object[] { nav().getClassName(nav().asDecl(fClass)) }), this));
/*      */     }
/*      */
/* 1284 */     return this.factoryMethod != null;
/*      */   }
View Full Code Here

/*     */
/* 105 */     Object b = null;
/*     */     try {
/* 107 */       b = this.baseXducer.parse(literal);
/*     */     } catch (Exception e) {
/* 109 */       this.builder.reportError(new IllegalAnnotationException(Messages.INVALID_XML_ENUM_VALUE.format(new Object[] { literal, ((Type)this.baseType.getType()).toString() }), e, new FieldLocatable(this, constant, nav())));
/*     */     }
/*     */
/* 114 */     this.parseMap.put(b, t);
/* 115 */     this.printMap.put(t, b);
/*     */
View Full Code Here

TOP

Related Classes of com.sun.xml.bind.v2.runtime.IllegalAnnotationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.