Examples of CPropertyInfo


Examples of com.sun.tools.internal.xjc.model.CPropertyInfo

        }

        builder.recordBindingMode(ct, FALLBACK_CONTENT);
        BIProperty prop = BIProperty.getCustomization(ct);

        CPropertyInfo p;

        if (generateMixedExtensions) {
            List<XSComplexType> cType = ct.getSubtypes();
            boolean isSubtyped = (cType != null) && (cType.size() > 0);
View Full Code Here

Examples of com.sun.tools.internal.xjc.model.CPropertyInfo

        XSContentType contentType = ct.getContentType();

        builder.recordBindingMode(ct, FALLBACK_CONTENT);
        BIProperty prop = BIProperty.getCustomization(ct);

        CPropertyInfo p;

        if(contentType.asEmpty()!=null) {
            p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
        } else {
            RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false);
View Full Code Here

Examples of com.sun.tools.internal.xjc.model.CPropertyInfo

        selector.getCurrentBean().setBaseClass(baseClass);
        builder.recordBindingMode(ct, ComplexTypeBindingMode.FALLBACK_EXTENSION);

        BIProperty prop = BIProperty.getCustomization(ct);
        CPropertyInfo p;

        RawTypeSet ts = RawTypeSetBuilder.build(ct.getContentType().asParticle(), false);
        p = prop.createDummyExtendedMixedReferenceProperty("contentOverrideFor" + ct.getName(), ct, ts);

        selector.getCurrentBean().addProperty(p);
View Full Code Here

Examples of com.sun.tools.internal.xjc.model.CPropertyInfo

            // FooImpl( T1 a, T2 b, T3 c, ... ) {
            // }
            JMethod c = cc.implClass.constructor(JMod.PUBLIC);

            for( String fieldName : cons.fields ) {
                CPropertyInfo field = cc.target.getProperty(fieldName);
                if(field==null) {
                    outline.getErrorReceiver().error(cc.target.getLocator(),
                        Messages.ILLEGAL_CONSTRUCTOR_PARAM.format(fieldName));
                    continue;
                }
View Full Code Here

Examples of com.sun.tools.internal.xjc.model.CPropertyInfo

        simpleTypeBuilder.refererStack.push(ct);
        TypeUse use = simpleTypeBuilder.build(baseType);
        simpleTypeBuilder.refererStack.pop();

        BIProperty prop = BIProperty.getCustomization(ct);
        CPropertyInfo p = prop.createValueProperty("Value",false,baseType,use, BGMBuilder.getName(baseType));
        selector.getCurrentBean().addProperty(p);

        // adds attributes and we are through.
        green.attContainer(ct);
    }
View Full Code Here

Examples of com.sun.tools.xjc.model.CPropertyInfo

            List<FieldOutline> fields = findAllDeclaredAndInheritedFields(classOutline);
            for(FieldOutline fieldOutline : fields) {
                JType rawType = fieldOutline.getRawType();
                JMethod getter = getter(fieldOutline);
                boolean isJAXBElement = isJAXBElement(getter.type());
                CPropertyInfo propertyInfo = fieldOutline.getPropertyInfo();
                boolean isCollection = propertyInfo.isCollection();
                if (isCollection) {
                    JClass collClazz = (JClass) rawType;
                    JClass collType = collClazz.getTypeParameters().get(0);
                    Traversable t = isTraversable(collType);
                    if (collType.name().startsWith("JAXBElement")) {
View Full Code Here

Examples of com.sun.tools.xjc.model.CPropertyInfo

    }
    return fieldList;
  }

  public static CPropertyInfo searchPropertyInfo(final ClassOutline classOutline, final String name) {
    CPropertyInfo propertyInfo = classOutline.target.getProperty(name);

    if ((propertyInfo == null) && (classOutline.getSuperClass() != null)) {
      propertyInfo = searchPropertyInfo(classOutline.getSuperClass(), name);
    }
View Full Code Here

Examples of com.sun.tools.xjc.model.CPropertyInfo

  // #########################################
  // #########################################
  // #########################################

  public static boolean isFieldMarkedAsRequiredOrMandatoryInXSDSchema(final FieldOutline fo) {
    final CPropertyInfo pi = fo.getPropertyInfo();
    if (pi.getSchemaComponent() instanceof XSParticle) {
      final XSParticle particle = (XSParticle) pi.getSchemaComponent();
      if (particle.getMinOccurs() > 0) {
        // LOG.info("!!! MinOccurs of Element [" + pi.getName(false) + "] is [" + particle.getMinOccurs() + "].");
      }
      return particle.getMinOccurs() > 0;
    } else if (pi.getSchemaComponent() instanceof XSAttributeUse) {
      final XSAttributeUse attributeUse = (XSAttributeUse) pi.getSchemaComponent();
      if (attributeUse.isRequired()) {
        // LOG.info("!!! Required of Attribute [" + pi.getName(false) + "] is [" + attributeUse.isRequired() + "].");
      }
      return attributeUse.isRequired();
    } else {
View Full Code Here

Examples of com.sun.tools.xjc.model.CPropertyInfo

      implClass.javadoc().clear();
      implClass.javadoc().append(kmlJavaDocElement.getJavaDoc());

      for (final FieldOutline fieldOutline : classOutline.getDeclaredFields()) {
        if (fieldOutline instanceof FieldOutline) {
          final CPropertyInfo property = fieldOutline.getPropertyInfo();

          final JCodeModel codeModel = classOutline.parent().getCodeModel();

          final JFieldVar currentField = implClass.fields().get(property.getName(false));

          // LOG.info("fieldType: " + currentField.name());
          // find the common type
          final JType currentFieldType = TypeUtil
              .getCommonBaseType(codeModel, listPossibleTypes((ClassOutlineImpl) classOutline, property));
          String currentFieldTypeName = currentFieldType.name().trim().toLowerCase();
          // if found field-type equals object, then there is no need, to document it
          if (currentFieldTypeName.equals("object")) {
            continue;
          }
          currentFieldTypeName = eliminateTypeSuffix(currentFieldTypeName);
          final JaxbJavaDoc javadocForCurrentFieldName = kmlJavaDocElements.get(property.getName(false).trim().toLowerCase());
          if (javadocForCurrentFieldName != null) {
            // LOG.info("++C> " + currentFieldTypeName + " " + property.getName(false));
            currentField.javadoc().clear();
            currentField.javadoc().add(javadocForCurrentFieldName.getJavaDoc());
            continue;
View Full Code Here

Examples of com.sun.tools.xjc.model.CPropertyInfo

   * // changed into: return this.getCollection().add(abstractFeatureGroup);
   * </pre>
   * @param type2
   */
  private void generateAddToCollection(final ClassOutlineImpl cc, final JFieldVar field, final boolean override) {
    final CPropertyInfo propertyInfo = Util.searchPropertyInfo(cc, field.name());
    if (propertyInfo == null) {
      return;
    }

    if (field.name().equals("coordinates") && !override) {
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.