本文整理了Java中org.codehaus.modello.plugins.xml.metadata.XmlFieldMetadata.getFormat()
方法的一些代码示例,展示了XmlFieldMetadata.getFormat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlFieldMetadata.getFormat()
方法的具体详情如下:
包路径:org.codehaus.modello.plugins.xml.metadata.XmlFieldMetadata
类名称:XmlFieldMetadata
方法名:getFormat
暂无
代码示例来源:origin: org.codehaus.modello/modello-plugin-xml
protected String getValue( String type, String initialValue, XmlFieldMetadata xmlFieldMetadata )
{
String textValue = initialValue;
if ( "Date".equals( type ) )
{
String dateFormat = xmlFieldMetadata.getFormat();
if ( xmlFieldMetadata.getFormat() == null )
{
dateFormat = DEFAULT_DATE_FORMAT;
}
if ( "long".equals( dateFormat ) )
{
textValue = "String.valueOf( " + textValue + ".getTime() )";
}
else
{
textValue =
"new java.text.SimpleDateFormat( \"" + dateFormat + "\", java.util.Locale.US ).format( " + textValue + " )";
}
}
else if ( !"String".equals( type ) )
{
textValue = "String.valueOf( " + textValue + " )";
}
return textValue;
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-dom4j
+ ( xmlFieldMetadata.getFormat() != null ? "\"" + xmlFieldMetadata.getFormat() + "\"" : "null" ) + ";" );
sc.add( objectName + "." + setterName + "( getDateValue( " + parserGetter + ", \"" + tagName
+ "\", dateFormat ) );" );
代码示例来源:origin: org.codehaus.modello/modello-plugin-stax
+ ( xmlFieldMetadata.getFormat() != null ? "\"" + xmlFieldMetadata.getFormat() + "\"" : "null" ) + ";" );
sc.add( objectName + "." + setterName + "( getDateValue( " + parserGetter + ", \"" + tagName
+ "\", dateFormat, xmlStreamReader ) );" );
代码示例来源:origin: org.codehaus.modello/modello-plugin-xpp3
String format = xmlFieldMetadata.getFormat();
sc.add( "String dateFormat = " + ( format != null ? "\"" + format + "\"" : "null" ) + ";" );
sc.add(
代码示例来源:origin: org.codehaus.modello/modello-plugin-xsd
if ( "Date".equals( field.getType() ) && "long".equals( xmlFieldMetadata.getFormat() ) )
内容来源于网络,如有侵权,请联系作者删除!