本文整理汇总了Java中com.sun.xml.bind.v2.model.core.PropertyKind类的典型用法代码示例。如果您正苦于以下问题:Java PropertyKind类的具体用法?Java PropertyKind怎么用?Java PropertyKind使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PropertyKind类属于com.sun.xml.bind.v2.model.core包,在下文中一共展示了PropertyKind类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDefaultGeneratedPropertyKind
import com.sun.xml.bind.v2.model.core.PropertyKind; //导入依赖的package包/类
@Override
public PropertyKind getDefaultGeneratedPropertyKind(
ProcessModel context, CPropertyInfo propertyInfo) {
return propertyKind;
}
示例2: getDefaultGeneratedPropertyKind
import com.sun.xml.bind.v2.model.core.PropertyKind; //导入依赖的package包/类
@Override
public final PropertyKind getDefaultGeneratedPropertyKind(ProcessModel context,
CPropertyInfo propertyInfo) {
return PropertyKind.ATTRIBUTE;
}
示例3: getDefaultGeneratedPropertyKind
import com.sun.xml.bind.v2.model.core.PropertyKind; //导入依赖的package包/类
public abstract PropertyKind getDefaultGeneratedPropertyKind(
ProcessModel context, CPropertyInfo propertyInfo);
示例4: getFields
import com.sun.xml.bind.v2.model.core.PropertyKind; //导入依赖的package包/类
private static List<FieldInfo> getFields(CGConfig cgConfig, ClassOutline co) {
List<FieldInfo> fields = new ArrayList<>();
for (FieldOutline fo : co.getDeclaredFields()) {
FieldInfo fieldInfo = new FieldInfo();
// field name
ClientModule clientModule = cgConfig.module.getClientModule();
fieldInfo.setName(clientModule.generateSafeName(fo.getPropertyInfo().getName(false)));
fieldInfo.setInitialName(fo.getPropertyInfo().getName(false));
fieldInfo.setRequired(isRequired(fo));
JType rawType = fo.getRawType();
TypeInfo typeInfo = buildTypeInfo(rawType);
if (rawType.isArray()) {
typeInfo.setArray(true);
typeInfo.setElementType(buildTypeInfo(rawType.elementType())); // T of T[]
}
typeInfo.getTypeParameters().addAll(getTypeParameters(rawType));
fieldInfo.setType(typeInfo);
// schema kind
CPropertyInfo cProp = fo.getPropertyInfo();
fieldInfo.setPropertyKindElement(cProp.kind() == PropertyKind.ELEMENT);
fieldInfo.setPropertyKindAttribute(cProp.kind() == PropertyKind.ATTRIBUTE);
fieldInfo.setPropertyKindValue(cProp.kind() == PropertyKind.VALUE);
fieldInfo.setPropertyKindAny(cProp.kind() == PropertyKind.REFERENCE);
setAnnotation(co, fieldInfo, cProp);
fieldInfo.getType().setCollection(cProp.isCollection());
setDocComment(fo, fieldInfo);
if (fieldInfo.isRequired() && fieldInfo.getType().isCollection()) {
System.out.println("min occurs : 1 " + co.implClass.name() + "." + fieldInfo.getInitialName());
}
fields.add(fieldInfo);
}
return fields;
}