本文整理了Java中org.codehaus.enunciate.contract.jaxb.Accessor.isXmlList()
方法的一些代码示例,展示了Accessor.isXmlList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Accessor.isXmlList()
方法的具体详情如下:
包路径:org.codehaus.enunciate.contract.jaxb.Accessor
类名称:Accessor
方法名:isXmlList
[英]Whether this accessor is specified as an xml list.
[中]是否将此访问器指定为xml列表。
代码示例来源:origin: org.codehaus.enunciate/enunciate-c
@Override
public String convert(Accessor accessor) throws TemplateModelException {
if (accessor.isXmlIDREF()) {
return "xmlChar";
}
else if (accessor.isXmlList()) {
return "xmlChar";
}
return super.convert(accessor);
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-java-client
@Override
public String convert(Accessor accessor) throws TemplateModelException {
if (!accessor.isXmlList() && !accessor.isAdapted() && accessor.getBareAccessorType() instanceof InterfaceType) {
if (accessor.isCollectionType()) {
return "java.util.List<Object>";
}
else {
return "Object";
}
}
return super.convert(accessor);
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* Whether the accessor type is a collection type.
*
* @return Whether the accessor type is a collection type.
*/
public boolean isCollectionType() {
if (isXmlList()) {
return false;
}
DecoratedTypeMirror accessorType;
if (isAdapted()) {
accessorType = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(getAdapterType().getAdaptingType());
}
else {
accessorType = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(getAccessorType());
}
if (accessorType.isArray()) {
TypeMirror componentType = ((ArrayType) accessorType).getComponentType();
//special case for byte[]
return !(componentType instanceof PrimitiveType) || !(((PrimitiveType) componentType).getKind() == PrimitiveType.Kind.BYTE);
}
return accessorType.isCollection();
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
/**
* Whether the accessor type is a collection type.
*
* @return Whether the accessor type is a collection type.
*/
public boolean isCollectionType() {
if (isXmlList()) {
return false;
}
DecoratedTypeMirror accessorType;
if (isAdapted()) {
accessorType = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(getAdapterType().getAdaptingType(getAccessorType()));
}
else {
accessorType = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(getAccessorType());
}
if (accessorType.isArray()) {
TypeMirror componentType = ((ArrayType) accessorType).getComponentType();
//special case for byte[]
return !(componentType instanceof PrimitiveType) || !(((PrimitiveType) componentType).getKind() == PrimitiveType.Kind.BYTE);
}
return accessorType.isCollection();
}
内容来源于网络,如有侵权,请联系作者删除!