Java Code Examples for com.sun.tools.xjc.model.CCustomizations#add()
The following examples show how to use
com.sun.tools.xjc.model.CCustomizations#add() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractAdaptPropertyInfo.java From hyperjaxb3 with BSD 2-Clause "Simplified" License | 6 votes |
public final CCustomizations createCustomizations(ProcessModel context, CPropertyInfo propertyInfo) { final CCustomizations customizations = CustomizationUtils .getCustomizations(propertyInfo); final CCustomizations newCustomizations = new CCustomizations(); if (customizations != null) { for (final CPluginCustomization customization : customizations) { if (Customizations.NAMESPACE_URI.equals(customization.element .getNamespaceURI())) { newCustomizations.add(customization); } } } return newCustomizations; }
Example 2
Source File: DefaultCreateDefaultVersionPropertyInfos.java From hyperjaxb3 with BSD 2-Clause "Simplified" License | 5 votes |
protected CPropertyInfo createPropertyInfo(ProcessModel context, CClassInfo classInfo, GeneratedVersion cversion) { final String propertyName = getPropertyName(context, cversion); final QName attributeName = getAttributeName(context, cversion); final CNonElement propertyTypeInfo = getPropertyTypeInfo(context, cversion); final CCustomizations customizations = new CCustomizations(); final CPluginCustomization version = createVersionCustomization(context, cversion); customizations.add(version); // // CPluginCustomization generated = CustomizationUtils // .createCustomization(org.jvnet.jaxb2_commons.plugin.Customizations.GENERATED_ELEMENT_NAME); // generated.markAsAcknowledged(); // customizations.add(generated); final CPropertyInfo propertyInfo = new CAttributePropertyInfo( propertyName, null, customizations, null, attributeName, propertyTypeInfo, propertyTypeInfo.getTypeName(), false); if (cversion.isTransient() != null && cversion.isTransient()) { propertyInfo.realization = new GenericFieldRenderer( TransientSingleField.class); } Customizations.markGenerated(propertyInfo); return propertyInfo; }
Example 3
Source File: DefaultCreateDefaultIdPropertyInfos.java From hyperjaxb3 with BSD 2-Clause "Simplified" License | 5 votes |
protected CPropertyInfo createPropertyInfo(ProcessModel context, CClassInfo classInfo) { final GeneratedId cid = context.getCustomizing().getGeneratedId( classInfo); final String propertyName = getPropertyName(context, cid); final QName attributeName = getAttributeName(context, cid); final CNonElement propertyTypeInfo = getPropertyTypeInfo(context, cid); final CCustomizations customizations = new CCustomizations(); final CPluginCustomization id = createIdCustomization(context, cid); customizations.add(id); // // CPluginCustomization generated = CustomizationUtils // .createCustomization(org.jvnet.jaxb2_commons.plugin.Customizations.GENERATED_ELEMENT_NAME); // generated.markAsAcknowledged(); // customizations.add(generated); final CPropertyInfo propertyInfo = new CAttributePropertyInfo( propertyName, null, customizations, null, attributeName, propertyTypeInfo, propertyTypeInfo.getTypeName(), false); if (cid.isTransient() != null && cid.isTransient()) { propertyInfo.realization = new GenericFieldRenderer( TransientSingleField.class); } Customizations.markGenerated(propertyInfo); return propertyInfo; }