Exemplo n.º 1
0
  public CAttributePropertyInfo createAttributeProperty(XSAttributeUse use, TypeUse tu) {

    boolean forConstant = getCustomization(use).isConstantProperty() && use.getFixedValue() != null;

    String name = getPropertyName(forConstant);
    if (name == null) {
      NameConverter conv = getBuilder().getNameConverter();
      if (forConstant) name = conv.toConstantName(use.getDecl().getName());
      else name = conv.toPropertyName(use.getDecl().getName());
      if (tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
        name = JJavaName.getPluralForm(name);
    }

    markAsAcknowledged();
    constantPropertyErrorCheck();

    return wrapUp(
        new CAttributePropertyInfo(
            name,
            use,
            getCustomizations(use),
            use.getLocator(),
            BGMBuilder.getName(use.getDecl()),
            tu,
            BGMBuilder.getName(use.getDecl().getType()),
            use.isRequired()),
        use);
  }
Exemplo n.º 2
0
 public Boolean attributeUse(XSAttributeUse use) {
   return use.getFixedValue() != null;
 }