下面列出了怎么用javax.xml.bind.annotation.XmlAnyAttribute的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* Get the parameter map for this link.
*
* @return parameter map.
*/
@XmlAnyAttribute
@ApiModelProperty(name = "params", value = "The params for the link")
public Map<String,String> getParams() {
if (params == null) {
params = new HashMap<>();
}
return params;
}
@XmlAnyAttribute
public Map<QName, String> getXmlAttributes() {
Map<QName, String> res = new HashMap<QName, String>();
for (String s : this.attributes.keySet()) {
if (!s.equals("id") && !s.equals("name")) {
QName qname = QName.valueOf(XMLConstants.NULL_NS_URI + s);
res.put(qname, this.attributes.get(s));
}
}
return res;
}
@XmlAnyAttribute
public Map<QName, String> getXmlAttributes() {
Map<QName, String> res = new HashMap<QName, String>();
for (String s : this.effectType.getAttributes().getAttributes().keySet()) {
QName qname = QName.valueOf(XMLConstants.NULL_NS_URI + s);
res.put(qname, getAttribute(s));
}
return res;
}
@XmlAnyAttribute public boolean isActive() {
return channel.isOpen() || channel.isActive();
}
public Void visitAnyAttributePropertyInfo(
MAnyAttributePropertyInfo<NType, NClass> info) {
this.annotatable.annotate(XmlAnyAttribute.class);
return null;
}
protected void annotate(JAnnotatable annotatable) {
annotatable.annotate(XmlAnyAttribute.class);
}
/**
* @return the map for holding unspecified (user) attributes
*/
@XmlAnyAttribute
@JsonAnyGetter
public Map<QName,Object> getAny() {
return attrs;
}
/**
* @return the map for holding unspecified (user) attributes
*/
@XmlAnyAttribute
@JsonAnyGetter
public Map<QName,Object> getAny() {
return attrs;
}