Java Code Examples for com.sun.xml.internal.bind.api.impl.NameConverter#toPropertyName()
The following examples show how to use
com.sun.xml.internal.bind.api.impl.NameConverter#toPropertyName() .
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: BIProperty.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
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); }
Example 2
Source File: BIProperty.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
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); }
Example 3
Source File: BIProperty.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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); }
Example 4
Source File: BIProperty.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
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); }
Example 5
Source File: BIProperty.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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); }
Example 6
Source File: BIProperty.java From hottub with GNU General Public License v2.0 | 6 votes |
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); }
Example 7
Source File: BIProperty.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
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); }
Example 8
Source File: BIProperty.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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); }
Example 9
Source File: BIProperty.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Returns the customized property name. * * This method honors the "enableJavaNamingConvention" customization * and formats the property name accordingly if necessary. * * Thus the caller should <em>NOT</em> apply the XML-to-Java name * conversion algorithm to the value returned from this method. * * @param forConstant * If the property name is intended for a constant property name, * set to true. This will change the result * * @return * This method can return null if the customization doesn't * specify the name. */ public String getPropertyName( boolean forConstant ) { if(name!=null) { BIGlobalBinding gb = getBuilder().getGlobalBinding(); NameConverter nc = getBuilder().model.getNameConverter(); if( gb.isJavaNamingConventionEnabled() && !forConstant ) // apply XML->Java conversion return nc.toPropertyName(name); else return name; // ... or don't change the value } BIProperty next = getDefault(); if(next!=null) return next.getPropertyName(forConstant); else return null; }
Example 10
Source File: BIProperty.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Returns the customized property name. * * This method honors the "enableJavaNamingConvention" customization * and formats the property name accordingly if necessary. * * Thus the caller should <em>NOT</em> apply the XML-to-Java name * conversion algorithm to the value returned from this method. * * @param forConstant * If the property name is intended for a constant property name, * set to true. This will change the result * * @return * This method can return null if the customization doesn't * specify the name. */ public String getPropertyName( boolean forConstant ) { if(name!=null) { BIGlobalBinding gb = getBuilder().getGlobalBinding(); NameConverter nc = getBuilder().model.getNameConverter(); if( gb.isJavaNamingConventionEnabled() && !forConstant ) // apply XML->Java conversion return nc.toPropertyName(name); else return name; // ... or don't change the value } BIProperty next = getDefault(); if(next!=null) return next.getPropertyName(forConstant); else return null; }
Example 11
Source File: BIProperty.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Returns the customized property name. * * This method honors the "enableJavaNamingConvention" customization * and formats the property name accordingly if necessary. * * Thus the caller should <em>NOT</em> apply the XML-to-Java name * conversion algorithm to the value returned from this method. * * @param forConstant * If the property name is intended for a constant property name, * set to true. This will change the result * * @return * This method can return null if the customization doesn't * specify the name. */ public String getPropertyName( boolean forConstant ) { if(name!=null) { BIGlobalBinding gb = getBuilder().getGlobalBinding(); NameConverter nc = getBuilder().model.getNameConverter(); if( gb.isJavaNamingConventionEnabled() && !forConstant ) // apply XML->Java conversion return nc.toPropertyName(name); else return name; // ... or don't change the value } BIProperty next = getDefault(); if(next!=null) return next.getPropertyName(forConstant); else return null; }
Example 12
Source File: BIProperty.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Returns the customized property name. * * This method honors the "enableJavaNamingConvention" customization * and formats the property name accordingly if necessary. * * Thus the caller should <em>NOT</em> apply the XML-to-Java name * conversion algorithm to the value returned from this method. * * @param forConstant * If the property name is intended for a constant property name, * set to true. This will change the result * * @return * This method can return null if the customization doesn't * specify the name. */ public String getPropertyName( boolean forConstant ) { if(name!=null) { BIGlobalBinding gb = getBuilder().getGlobalBinding(); NameConverter nc = getBuilder().model.getNameConverter(); if( gb.isJavaNamingConventionEnabled() && !forConstant ) // apply XML->Java conversion return nc.toPropertyName(name); else return name; // ... or don't change the value } BIProperty next = getDefault(); if(next!=null) return next.getPropertyName(forConstant); else return null; }
Example 13
Source File: BIProperty.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Returns the customized property name. * * This method honors the "enableJavaNamingConvention" customization * and formats the property name accordingly if necessary. * * Thus the caller should <em>NOT</em> apply the XML-to-Java name * conversion algorithm to the value returned from this method. * * @param forConstant * If the property name is intended for a constant property name, * set to true. This will change the result * * @return * This method can return null if the customization doesn't * specify the name. */ public String getPropertyName( boolean forConstant ) { if(name!=null) { BIGlobalBinding gb = getBuilder().getGlobalBinding(); NameConverter nc = getBuilder().model.getNameConverter(); if( gb.isJavaNamingConventionEnabled() && !forConstant ) // apply XML->Java conversion return nc.toPropertyName(name); else return name; // ... or don't change the value } BIProperty next = getDefault(); if(next!=null) return next.getPropertyName(forConstant); else return null; }
Example 14
Source File: BIProperty.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Returns the customized property name. * * This method honors the "enableJavaNamingConvention" customization * and formats the property name accordingly if necessary. * * Thus the caller should <em>NOT</em> apply the XML-to-Java name * conversion algorithm to the value returned from this method. * * @param forConstant * If the property name is intended for a constant property name, * set to true. This will change the result * * @return * This method can return null if the customization doesn't * specify the name. */ public String getPropertyName( boolean forConstant ) { if(name!=null) { BIGlobalBinding gb = getBuilder().getGlobalBinding(); NameConverter nc = getBuilder().model.getNameConverter(); if( gb.isJavaNamingConventionEnabled() && !forConstant ) // apply XML->Java conversion return nc.toPropertyName(name); else return name; // ... or don't change the value } BIProperty next = getDefault(); if(next!=null) return next.getPropertyName(forConstant); else return null; }
Example 15
Source File: BIProperty.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Returns the customized property name. * * This method honors the "enableJavaNamingConvention" customization * and formats the property name accordingly if necessary. * * Thus the caller should <em>NOT</em> apply the XML-to-Java name * conversion algorithm to the value returned from this method. * * @param forConstant * If the property name is intended for a constant property name, * set to true. This will change the result * * @return * This method can return null if the customization doesn't * specify the name. */ public String getPropertyName( boolean forConstant ) { if(name!=null) { BIGlobalBinding gb = getBuilder().getGlobalBinding(); NameConverter nc = getBuilder().model.getNameConverter(); if( gb.isJavaNamingConventionEnabled() && !forConstant ) // apply XML->Java conversion return nc.toPropertyName(name); else return name; // ... or don't change the value } BIProperty next = getDefault(); if(next!=null) return next.getPropertyName(forConstant); else return null; }
Example 16
Source File: BIProperty.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Returns the customized property name. * * This method honors the "enableJavaNamingConvention" customization * and formats the property name accordingly if necessary. * * Thus the caller should <em>NOT</em> apply the XML-to-Java name * conversion algorithm to the value returned from this method. * * @param forConstant * If the property name is intended for a constant property name, * set to true. This will change the result * * @return * This method can return null if the customization doesn't * specify the name. */ public String getPropertyName( boolean forConstant ) { if(name!=null) { BIGlobalBinding gb = getBuilder().getGlobalBinding(); NameConverter nc = getBuilder().model.getNameConverter(); if( gb.isJavaNamingConventionEnabled() && !forConstant ) // apply XML->Java conversion return nc.toPropertyName(name); else return name; // ... or don't change the value } BIProperty next = getDefault(); if(next!=null) return next.getPropertyName(forConstant); else return null; }