本文整理了Java中org.codehaus.enunciate.contract.jaxb.Accessor.isCollectionType()
方法的一些代码示例,展示了Accessor.isCollectionType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Accessor.isCollectionType()
方法的具体详情如下:
包路径:org.codehaus.enunciate.contract.jaxb.Accessor
类名称:Accessor
方法名:isCollectionType
[英]Whether the accessor type is a collection type.
[中]访问器类型是否为集合类型。
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
/**
* The bare (i.e. unwrapped) type of the accessor.
*
* @return The bare type of the accessor.
*/
public TypeMirror getBareAccessorType() {
return isCollectionType() ? getCollectionItemType() : getAccessorType();
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* The bare (i.e. unwrapped) type of the accessor.
*
* @return The bare type of the accessor.
*/
public TypeMirror getBareAccessorType() {
return isCollectionType() ? getCollectionItemType() : getAccessorType();
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-gwt
@Override
public String convert(Accessor accessor) throws TemplateModelException {
if (accessor.isCollectionType() && accessor instanceof Element) {
Element element = (Element) accessor;
//@XmlElementRefs and @XmlElements can't
if (element instanceof ElementRef && ((ElementRef) element).isElementRefs()) {
return "com.google.gwt.core.client.JsArray";
}
else if (element.getAnnotation(XmlElements.class) != null) {
return "com.google.gwt.core.client.JsArray";
}
}
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);
}
内容来源于网络,如有侵权,请联系作者删除!