Search in sources :

Example 1 with CCustomizations

use of com.sun.tools.xjc.model.CCustomizations in project jaxb-ri by eclipse-ee4j.

the class BindInfo method toCustomizationList.

/**
 * Gets the list of {@link CPluginCustomization}s from this.
 *
 * <p>
 * Note that calling this method marks all those plug-in customizations
 * as 'used'. So call it only when it's really necessary.
 */
public CCustomizations toCustomizationList() {
    CCustomizations r = null;
    for (BIDeclaration d : this) {
        if (d instanceof BIXPluginCustomization) {
            BIXPluginCustomization pc = (BIXPluginCustomization) d;
            pc.markAsAcknowledged();
            if (!Ring.get(Model.class).options.pluginURIs.contains(pc.getName().getNamespaceURI()))
                // this isn't a plugin customization
                continue;
            if (r == null)
                r = new CCustomizations();
            r.add(new CPluginCustomization(pc.element, pc.getLocation()));
        }
    }
    if (r == null)
        r = CCustomizations.EMPTY;
    return new CCustomizations(r);
}
Also used : CCustomizations(com.sun.tools.xjc.model.CCustomizations) CPluginCustomization(com.sun.tools.xjc.model.CPluginCustomization)

Example 2 with CCustomizations

use of com.sun.tools.xjc.model.CCustomizations in project vcd-api-tools by vmware.

the class RestApiVersionsPlugin method processEnumConstantOutline.

/**
 * Annotates {@link EnumConstantOutline}.
 *
 * @param enumConstantOutline
 * @param errorHandler
 */
private void processEnumConstantOutline(EnumConstantOutline enumConstantOutline, ErrorHandler errorHandler) {
    CCustomizations customizations = CustomizationUtils.getCustomizations(enumConstantOutline);
    addSupportedAnnotation(enumConstantOutline.constRef, customizations);
}
Also used : CCustomizations(com.sun.tools.xjc.model.CCustomizations)

Example 3 with CCustomizations

use of com.sun.tools.xjc.model.CCustomizations in project vcd-api-tools by vmware.

the class RestApiVersionsPlugin method processEnumOutline.

/**
 * Annotates {@link EnumOutline}.
 *
 * @param enumOutline
 * @param errorHandler
 */
private void processEnumOutline(EnumOutline enumOutline, ErrorHandler errorHandler) {
    CCustomizations customizations = CustomizationUtils.getCustomizations(enumOutline);
    addSupportedAnnotation(enumOutline.clazz, customizations);
    addSourceLocationComment(enumOutline.clazz, enumOutline.target.getLocator());
    for (EnumConstantOutline enumConstantOutline : enumOutline.constants) {
        processEnumConstantOutline(enumConstantOutline, errorHandler);
    }
}
Also used : CCustomizations(com.sun.tools.xjc.model.CCustomizations) EnumConstantOutline(com.sun.tools.xjc.outline.EnumConstantOutline)

Example 4 with CCustomizations

use of com.sun.tools.xjc.model.CCustomizations in project vcd-api-tools by vmware.

the class RestApiVersionsPlugin method processElementOutline.

/**
 * Annotates {@link ElementOutline}.
 *
 * @param elementOutline
 * @param errorHandler
 */
private void processElementOutline(ElementOutline elementOutline, ErrorHandler errorHandler) {
    CCustomizations customizations = CustomizationUtils.getCustomizations(elementOutline);
    addSupportedAnnotation(elementOutline.implClass, customizations);
    addSourceLocationComment(elementOutline.implClass, elementOutline.target.getLocator());
}
Also used : CCustomizations(com.sun.tools.xjc.model.CCustomizations)

Example 5 with CCustomizations

use of com.sun.tools.xjc.model.CCustomizations in project vcd-api-tools by vmware.

the class RestApiVersionsPlugin method processFieldOutline.

/**
 * Annotates {@link FieldOutline}.
 *
 * @param fieldOutline
 * @param errorHandler
 */
private void processFieldOutline(FieldOutline fieldOutline, ErrorHandler errorHandler) {
    CCustomizations customizations = CustomizationUtils.getCustomizations(fieldOutline);
    addSupportedAnnotation(FieldAccessorUtils.field(fieldOutline), customizations);
    addSupportedAnnotation(FieldAccessorUtils.getter(fieldOutline), customizations);
    addSupportedAnnotation(FieldAccessorUtils.setter(fieldOutline), customizations);
}
Also used : CCustomizations(com.sun.tools.xjc.model.CCustomizations)

Aggregations

CCustomizations (com.sun.tools.xjc.model.CCustomizations)7 JDefinedClass (com.sun.codemodel.JDefinedClass)1 CClassInfo (com.sun.tools.xjc.model.CClassInfo)1 CElement (com.sun.tools.xjc.model.CElement)1 CElementInfo (com.sun.tools.xjc.model.CElementInfo)1 CPluginCustomization (com.sun.tools.xjc.model.CPluginCustomization)1 EnumConstantOutline (com.sun.tools.xjc.outline.EnumConstantOutline)1 FieldOutline (com.sun.tools.xjc.outline.FieldOutline)1 XSElementDecl (com.sun.xml.xsom.XSElementDecl)1 QName (javax.xml.namespace.QName)1