本文整理了Java中org.codehaus.enunciate.contract.jaxb.Accessor.getBareAccessorType()
方法的一些代码示例,展示了Accessor.getBareAccessorType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Accessor.getBareAccessorType()
方法的具体详情如下:
包路径:org.codehaus.enunciate.contract.jaxb.Accessor
类名称:Accessor
方法名:getBareAccessorType
[英]The bare (i.e. unwrapped) type of the accessor.
[中]存取器的裸(即未包装)类型。
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
/**
* Returns the accessor for the XML id, or null if none was found or if this isn't an Xml IDREF accessor.
*
* @return The accessor, or null.
*/
public MemberDeclaration getAccessorForXmlID() {
if (isXmlIDREF()) {
TypeMirror accessorType = getBareAccessorType();
if (accessorType instanceof ClassType) {
return getXmlIDAccessor((ClassType) accessorType);
}
}
return null;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* Returns the accessor for the XML id, or null if none was found or if this isn't an Xml IDREF accessor.
*
* @return The accessor, or null.
*/
public MemberDeclaration getAccessorForXmlID() {
if (isXmlIDREF()) {
TypeMirror accessorType = getBareAccessorType();
if (accessorType instanceof ClassType) {
return getXmlIDAccessor((ClassType) accessorType);
}
}
return null;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-xfire-client
public void validateTypeDefinition(TypeDefinition typeDef, ValidationResult result) {
ArrayList<Accessor> accessors = new ArrayList<Accessor>();
accessors.addAll(typeDef.getAttributes());
accessors.add(typeDef.getValue());
accessors.addAll(typeDef.getElements());
for (Accessor accessor : accessors) {
if (accessor != null) {
if ((accessor.getAnnotation(XmlIDREF.class) != null) && (accessor.getAnnotation(XmlList.class) != null)) {
result.addError(accessor, "The xfire client code currently doesn't support @XmlList and @XmlIDREF annotations together.");
}
TypeMirror accessorType = accessor.getBareAccessorType();
if (accessorType instanceof DeclaredType) {
String accessorTypeFQN = ((DeclaredType) accessorType).getDeclaration().getQualifiedName();
if (java.awt.Image.class.getName().equals(accessorTypeFQN)) {
result.addError(accessor, "xfire-client module doesn't yet support handling java.awt.Image.");
}
else if (javax.xml.transform.Source.class.getName().equals(accessorTypeFQN)) {
result.addError(accessor, "xfire-client module doesn't yet support handling javax.xml.transform.Source.");
}
}
}
}
}
代码示例来源: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
public void validateTypeDefinition(TypeDefinition typeDef, ValidationResult result) {
ArrayList<Accessor> accessors = new ArrayList<Accessor>();
accessors.addAll(typeDef.getAttributes());
accessors.add(typeDef.getValue());
accessors.addAll(typeDef.getElements());
for (Accessor accessor : accessors) {
if (accessor != null) {
if ((accessor.getAnnotation(XmlIDREF.class) != null) && (accessor.getAnnotation(XmlList.class) != null)) {
result.addError(accessor.getPosition(), "The xfire client code currently doesn't support @XmlList and @XmlIDREF annotations together.");
}
TypeMirror accessorType = accessor.getBareAccessorType();
if (accessorType instanceof DeclaredType) {
String accessorTypeFQN = ((DeclaredType) accessorType).getDeclaration().getQualifiedName();
if (java.awt.Image.class.getName().equals(accessorTypeFQN)) {
result.addError(accessor.getPosition(), "xfire-client module doesn't yet support handling java.awt.Image.");
}
else if (javax.xml.transform.Source.class.getName().equals(accessorTypeFQN)) {
result.addError(accessor.getPosition(), "xfire-client module doesn't yet support handling javax.xml.transform.Source.");
}
}
}
}
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-c
DecoratedTypeMirror accessorType = (DecoratedTypeMirror) ((Accessor) unwrapped).getBareAccessorType();
内容来源于网络,如有侵权,请联系作者删除!