本文整理了Java中org.asciidoctor.Attributes.setAttribute()
方法的一些代码示例,展示了Attributes.setAttribute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attributes.setAttribute()
方法的具体详情如下:
包路径:org.asciidoctor.Attributes
类名称:Attributes
方法名:setAttribute
[英]Define how to handle missing attribute references. Possible values are: skipleave the reference in place (default setting)dropdrop the reference, but not the linedrop-linedrop the line on which the reference occurs (compliant behavior)warnprint a warning about the missing attribute
[中]定义如何处理缺少的属性引用。可能的值有:skipleave the reference in place(默认设置)drop drop the reference,而不是line drop line drop the reference所在的行(兼容行为)warn打印有关缺少属性的警告
代码示例来源:origin: spring-projects/spring-restdocs
private Attributes getAttributes() {
Attributes attributes = new Attributes();
attributes.setAttribute("projectdir", new File(".").getAbsolutePath());
return attributes;
}
代码示例来源:origin: spring-projects/spring-restdocs
@Test
public void operationWithParameterizedName() throws Exception {
Attributes attributes = getAttributes();
attributes.setAttribute("name", "some");
this.options.setAttributes(attributes);
String result = this.asciidoctor.convert(
"operation::{name}-operation[snippets='curl-request']", this.options);
assertThat(result).isEqualTo(getExpectedContentFromFile("snippet-simple"));
}
代码示例来源:origin: asciidoctor/asciidoctorj
/**
* Sets custom or unlisted attribute to the default value, empty string.
*
* @param attributeName
* A flag-only attribute, such as "icons"
* @return this instance.
*/
public AttributesBuilder attribute(String attributeName) {
this.attributes.setAttribute(attributeName, "");
return this;
}
代码示例来源:origin: asciidoctor/asciidoctorj
/**
* Sets custom or unlisted attribute
*
* @param attributeName
* @param attributeValue
* @return this instance.
*/
public AttributesBuilder attribute(String attributeName, Object attributeValue) {
this.attributes.setAttribute(attributeName, attributeValue);
return this;
}
代码示例来源:origin: org.asciidoctor/asciidoctor-java-integration
/**
* Sets custom or unlisted attribute to the default value, empty string.
*
* @param attributeName
* A flag-only attribute, such as "icons"
* @return this instance.
*/
public AttributesBuilder attribute(String attributeName) {
this.attributes.setAttribute(attributeName, "");
return this;
}
代码示例来源:origin: org.asciidoctor/asciidoctor-java-integration
/**
* Sets custom or unlisted attribute
*
* @param attributeName
* @param attributeValue
* @return this instance.
*/
public AttributesBuilder attribute(String attributeName, Object attributeValue) {
this.attributes.setAttribute(attributeName, attributeValue);
return this;
}
代码示例来源:origin: org.asciidoctor/asciidoctorj-api
/**
* Sets custom or unlisted attribute to the default value, empty string.
*
* @param attributeName
* A flag-only attribute, such as "icons"
* @return this instance.
*/
public AttributesBuilder attribute(String attributeName) {
this.attributes.setAttribute(attributeName, "");
return this;
}
代码示例来源:origin: org.asciidoctor/asciidoctorj-api
/**
* Sets custom or unlisted attribute
*
* @param attributeName
* @param attributeValue
* @return this instance.
*/
public AttributesBuilder attribute(String attributeName, Object attributeValue) {
this.attributes.setAttribute(attributeName, attributeValue);
return this;
}
代码示例来源:origin: org.ovirt.engine.api/metamodel-tool
public void setAttribute(String name, String value) {
attributes.setAttribute(name, value);
}
内容来源于网络,如有侵权,请联系作者删除!