Examples of JAnnotationArrayMember


Examples of com.sun.codemodel.JAnnotationArrayMember

*/
public class Jackson2Annotator extends AbstractAnnotator {

    @Override
    public void propertyOrder(JDefinedClass clazz, JsonNode propertiesNode) {
        JAnnotationArrayMember annotationValue = clazz.annotate(JsonPropertyOrder.class).paramArray("value");

        for (Iterator<String> properties = propertiesNode.fieldNames(); properties.hasNext();) {
            annotationValue.param(properties.next());
        }
    }
View Full Code Here

Examples of com.sun.codemodel.JAnnotationArrayMember

      {
         xmlTypeAnnotation.param("namespace", xmlTypeNS);
      }
      if (propertyOrder != null)
      {
         JAnnotationArrayMember paramArray = xmlTypeAnnotation.paramArray("propOrder");
         for (String property : propertyOrder)
         {
            paramArray.param(property);
         }
      }

      // define XmlAccessorType class annotation
      JAnnotationUse xmlAccessorTypeAnnotation = clazz.annotate(XmlAccessorType.class);
View Full Code Here

Examples of com.sun.codemodel.JAnnotationArrayMember

        List<XSFacet> patternList = simpleType.getFacets(FACET_PATTERN);
        if (patternList.size() > 1) {
            if (notAnnotated(fieldVar, patternListAnn)) {
                JAnnotationUse list = fieldVar.annotate(patternListAnn);
                JAnnotationArrayMember listValue = list.paramArray("value");

                for (XSFacet xsFacet : patternList)
                    // If corresponds to <xsd:restriction base="xsd:string">.
                    if ("String".equals(fieldType.name()))
                        a.put(listValue.annotate(patternAnn).param("regexp", eliminateShorthands(xsFacet.getValue().value)), FacetType.pattern);
                    else Logger.getLogger(this.getClass().getName()).log(Level.WARNING, PATTERN_ANNOTATION_NOT_APPLICABLE);
            }
        } else if ((facet = simpleType.getFacet(FACET_PATTERN)) != null)
            if ("String".equals(fieldType.name())) { // <xsd:restriction base="xsd:string">
                if (notAnnotated(fieldVar, patternAnn))
View Full Code Here

Examples of com.sun.codemodel.JAnnotationArrayMember

/* 158 */     if (((xmlType.getNamespaceURI() != null ? 1 : 0) & (xmlType.getNamespaceURI().length() > 0 ? 1 : 0)) != 0)
/* 159 */       annotation.param("namespace", xmlType.getNamespaceURI());
/* 160 */     annotation.param("name", xmlType.getLocalPart());
/* 161 */     if (propertyOrder != null)
/*     */     {
/* 163 */       JAnnotationArrayMember paramArray = annotation.paramArray("propOrder");
/* 164 */       for (String property : propertyOrder) {
/* 165 */         paramArray.param(property);
/*     */       }
/*     */     }
/* 168 */     annotation = clazz.annotate(XmlAccessorType.class);
/* 169 */     annotation.param("value", XmlAccessType.FIELD);
/*     */   }
View Full Code Here

Examples of com.sun.codemodel.JAnnotationArrayMember

        }

        // explicit fault action
        if (o.getFaults() != null && o.getFaults().size() > 0) {
            Map<String, JClass> map = o.getFaults();
            JAnnotationArrayMember jam = null;

            for (Fault f : o.faults()) {
                if (f.getAction() == null)
                    continue;

                if (f.getAction().equals(""))
                    continue;

                if (actionAnn == null) {
                    actionAnn = jMethod.annotate(Action.class);
                }
                if (jam == null) {
                    jam = actionAnn.paramArray("fault");
                }
                final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
                faAnn.param("className", map.get(f.getName()));
                faAnn.param("value", f.getAction());
            }
        }
    }
View Full Code Here

Examples of com.sun.codemodel.JAnnotationArrayMember

      {
         xmlTypeAnnotation.param("namespace", xmlTypeNS);
      }
      if (propertyOrder != null)
      {
         JAnnotationArrayMember paramArray = xmlTypeAnnotation.paramArray("propOrder");
         for (String property : propertyOrder)
         {
            paramArray.param(property);
         }
      }

      // define XmlAccessorType class annotation
      JAnnotationUse xmlAccessorTypeAnnotation = clazz.annotate(XmlAccessorType.class);
View Full Code Here

Examples of com.sun.codemodel.JAnnotationArrayMember

            return;
        JAnnotationUse xmlTypeAnn = cls.annotate(cm.ref(XmlType.class));
        xmlTypeAnn.param("name", typeName);
        xmlTypeAnn.param("namespace", namespaceUri);
        if (members.size() > 1) {
            JAnnotationArrayMember paramArray = xmlTypeAnn.paramArray("propOrder");
            for (MemberInfo memInfo : members) {
                paramArray.param(memInfo.getParamName());
            }
        }
    }
View Full Code Here

Examples of com.sun.codemodel.JAnnotationArrayMember

        }

        // explicit fault action
        if (o.getFaults() != null && o.getFaults().size() > 0) {
            Map<String, JClass> map = o.getFaults();
            JAnnotationArrayMember jam = null;

            for (Fault f : o.faults()) {
                if (f.getAction() == null)
                    continue;

                if (f.getAction().equals(""))
                    continue;

                if (actionAnn == null) {
                    actionAnn = jMethod.annotate(Action.class);
                }
                if (jam == null) {
                    jam = actionAnn.paramArray("fault");
                }
                final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
                faAnn.param("className", map.get(f.getName()));
                faAnn.param("value", f.getAction());
            }
        }
    }
View Full Code Here

Examples of com.sun.codemodel.internal.JAnnotationArrayMember

        }

        // explicit fault action
        if (o.getFaults() != null && o.getFaults().size() > 0) {
            Map<String, JClass> map = o.getFaults();
            JAnnotationArrayMember jam = null;

            for (Fault f : o.faults()) {
                if (f.getAction() == null)
                    continue;

                if (f.getAction().equals(""))
                    continue;

                if (actionAnn == null) {
                    actionAnn = jMethod.annotate(Action.class);
                }
                if (jam == null) {
                    jam = actionAnn.paramArray("fault");
                }
                final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
                faAnn.param("className", map.get(f.getName()));
                faAnn.param("value", f.getAction());
            }
        }
    }
View Full Code Here

Examples of com.sun.codemodel.internal.JAnnotationArrayMember

        }

        // explicit fault action
        if (o.getFaults() != null && o.getFaults().size() > 0) {
            Map<String, JClass> map = o.getFaults();
            JAnnotationArrayMember jam = null;

            for (Fault f : o.faults()) {
                if (f.getAction() == null)
                    continue;

                if (f.getAction().equals(""))
                    continue;

                if (actionAnn == null) {
                    actionAnn = jMethod.annotate(Action.class);
                }
                if (jam == null) {
                    jam = actionAnn.paramArray("fault");
                }
                final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
                faAnn.param("className", map.get(f.getName()));
                faAnn.param("value", f.getAction());
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.