本文整理汇总了Java中org.apache.xmlbeans.SchemaProperty.XML_OBJECT属性的典型用法代码示例。如果您正苦于以下问题:Java SchemaProperty.XML_OBJECT属性的具体用法?Java SchemaProperty.XML_OBJECT怎么用?Java SchemaProperty.XML_OBJECT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.xmlbeans.SchemaProperty
的用法示例。
在下文中一共展示了SchemaProperty.XML_OBJECT属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeMissingValue
void makeMissingValue(int javaType) throws IOException {
switch (javaType) {
case SchemaProperty.JAVA_BOOLEAN:
emit("return false;");
break;
case SchemaProperty.JAVA_FLOAT:
emit("return 0.0f;");
break;
case SchemaProperty.JAVA_DOUBLE:
emit("return 0.0;");
break;
case SchemaProperty.JAVA_BYTE:
case SchemaProperty.JAVA_SHORT:
case SchemaProperty.JAVA_INT:
emit("return 0;");
break;
case SchemaProperty.JAVA_LONG:
emit("return 0L;");
break;
default:
case SchemaProperty.XML_OBJECT:
case SchemaProperty.JAVA_BIG_DECIMAL:
case SchemaProperty.JAVA_BIG_INTEGER:
case SchemaProperty.JAVA_STRING:
case SchemaProperty.JAVA_BYTE_ARRAY:
case SchemaProperty.JAVA_GDATE:
case SchemaProperty.JAVA_GDURATION:
case SchemaProperty.JAVA_DATE:
case SchemaProperty.JAVA_QNAME:
case SchemaProperty.JAVA_LIST:
case SchemaProperty.JAVA_CALENDAR:
case SchemaProperty.JAVA_ENUM:
case SchemaProperty.JAVA_OBJECT:
emit("return null;");
break;
}
}
示例2: jsetMethod
String jsetMethod(int javaType) throws IOException {
switch (javaType) {
case SchemaProperty.XML_OBJECT:
return "target.set";
case SchemaProperty.JAVA_BOOLEAN:
return "target.setBooleanValue";
case SchemaProperty.JAVA_FLOAT:
return "target.setFloatValue";
case SchemaProperty.JAVA_DOUBLE:
return "target.setDoubleValue";
case SchemaProperty.JAVA_BYTE:
return "target.setByteValue";
case SchemaProperty.JAVA_SHORT:
return "target.setShortValue";
case SchemaProperty.JAVA_INT:
return "target.setIntValue";
case SchemaProperty.JAVA_LONG:
return "target.setLongValue";
case SchemaProperty.JAVA_BIG_DECIMAL:
return "target.setBigDecimalValue";
case SchemaProperty.JAVA_BIG_INTEGER:
return "target.setBigIntegerValue";
case SchemaProperty.JAVA_STRING:
return "target.setStringValue";
case SchemaProperty.JAVA_BYTE_ARRAY:
return "target.setByteArrayValue";
case SchemaProperty.JAVA_GDATE:
return "target.setGDateValue";
case SchemaProperty.JAVA_GDURATION:
return "target.setGDurationValue";
case SchemaProperty.JAVA_CALENDAR:
return "target.setCalendarValue";
case SchemaProperty.JAVA_DATE:
return "target.setDateValue";
case SchemaProperty.JAVA_QNAME:
return "target.setQNameValue";
case SchemaProperty.JAVA_LIST:
return "target.setListValue";
case SchemaProperty.JAVA_ENUM:
return "target.setEnumValue";
case SchemaProperty.JAVA_OBJECT:
return "target.setObjectValue";
default:
throw new IllegalStateException();
}
}