Java Code Examples for com.sun.tools.xjc.model.CNonElement#getTypeName()
The following examples show how to use
com.sun.tools.xjc.model.CNonElement#getTypeName() .
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 CPropertyInfo createElementPropertyInfo(String propertyName, XSComponent source, TypeUse propertyType, QName propertyQName, CollectionMode collectionMode, CCustomizations customizations) { final CNonElement propertyTypeInfo = propertyType.getInfo(); final CElementPropertyInfo propertyInfo = new CElementPropertyInfo( propertyName, collectionMode, propertyTypeInfo.idUse(), propertyTypeInfo.getExpectedMimeType(), source, customizations, null, true); final CTypeRef typeRef = new CTypeRef(propertyTypeInfo, propertyQName, propertyTypeInfo.getTypeName(), false, null); propertyInfo.setAdapter(propertyType.getAdapterUse()); propertyInfo.getTypes().add(typeRef); return propertyInfo; }
Example 2
Source File: FieldUtils.java From jaxb2-basics with BSD 2-Clause "Simplified" License | 5 votes |
public static FieldOutline createAttributeField( ClassOutlineImpl classOutline, String name, final QName attName, final CNonElement typeInfo, final boolean required // , // final XSDatatype datatype, // final JType type ) { final CPropertyInfo propertyInfo = new CAttributePropertyInfo( // name name, // source null, new CCustomizations(), // locator null, // attName attName, // typeUse typeInfo, // typeName typeInfo.getTypeName(), // required required); propertyInfo.realization = new FieldRendererFactory().getDefault(); final FieldOutline fieldOutline = propertyInfo.realization.generate(classOutline, propertyInfo); return fieldOutline; }
Example 3
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 4
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; }