本文整理了Java中com.sun.codemodel.JFormatter.o()
方法的一些代码示例,展示了JFormatter.o()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFormatter.o()
方法的具体详情如下:
包路径:com.sun.codemodel.JFormatter
类名称:JFormatter
方法名:o
[英]Decrement the indentation level.
[中]降低缩进级别。
代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel
public void generate(JFormatter f) {
if (bracesRequired)
f.p('{').nl();
if (indentRequired)
f.i();
generateBody(f);
if (indentRequired)
f.o();
if (bracesRequired)
f.p('}');
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void generate(JFormatter f) {
if (bracesRequired)
f.p('{').nl();
if (indentRequired)
f.i();
generateBody(f);
if (indentRequired)
f.o();
if (bracesRequired)
f.p('}');
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
public void generate(JFormatter f) {
if (bracesRequired)
f.p('{').nl();
if (indentRequired)
f.i();
generateBody(f);
if (indentRequired)
f.o();
if (bracesRequired)
f.p('}');
}
代码示例来源:origin: sun-jaxb/jaxb-xjc
public void generate(JFormatter f) {
if (bracesRequired)
f.p('{').nl();
if (indentRequired)
f.i();
generateBody(f);
if (indentRequired)
f.o();
if (bracesRequired)
f.p('}');
}
代码示例来源:origin: javaee/jaxb-v2
public void generate(JFormatter f) {
if (bracesRequired)
f.p('{').nl();
if (indentRequired)
f.i();
generateBody(f);
if (indentRequired)
f.o();
if (bracesRequired)
f.p('}');
}
代码示例来源:origin: javaee/jaxb-v2
/**
* Print source code of Java Module declaration.
* @param f Java code formatter.
* @return provided instance of Java code formatter.
*/
public JFormatter generate(final JFormatter f) {
f.p("module").p(name);
f.p('{').nl();
if (!directives.isEmpty()) {
f.i();
for (final JModuleDirective directive : directives) {
directive.generate(f);
}
f.o();
}
f.p('}').nl();
return f;
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
/**
* Print source code of Java Module declaration.
* @param f Java code formatter.
* @return provided instance of Java code formatter.
*/
public JFormatter generate(final JFormatter f) {
f.p("module").p(name);
f.p('{').nl();
if (!directives.isEmpty()) {
f.i();
for (final JModuleDirective directive : directives) {
directive.generate(f);
}
f.o();
}
f.p('}').nl();
return f;
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
public void generate(JFormatter f) {
f.p('{').nl().i();
boolean first = true;
for (JAnnotationValue aValue : values) {
if (!first)
f.p(',').nl();
f.g(aValue);
first = false;
}
f.nl().o().p('}');
}
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void generate(JFormatter f) {
f.p('{').nl().i();
boolean first = true;
for (JAnnotationValue aValue : values) {
if (!first)
f.p(',').nl();
f.g(aValue);
first = false;
}
f.nl().o().p('}');
}
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
public void state(JFormatter f) {
f.i();
if( !isDefaultCase ) {
f.p("case ").g(label).p(':').nl();
} else {
f.p("default:").nl();
}
if (body != null)
f.s(body);
f.o();
}
}
代码示例来源:origin: javaee/jaxb-v2
public void generate(JFormatter f) {
f.p('{').nl().i();
boolean first = true;
for (JAnnotationValue aValue : values) {
if (!first)
f.p(',').nl();
f.g(aValue);
first = false;
}
f.nl().o().p('}');
}
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void state(JFormatter f) {
f.i();
if( !isDefaultCase ) {
f.p("case ").g(label).p(':').nl();
} else {
f.p("default:").nl();
}
if (body != null)
f.s(body);
f.o();
}
}
代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel
public void generate(JFormatter f) {
f.p('{').nl().i();
boolean first = true;
for (JAnnotationValue aValue : values) {
if (!first)
f.p(',').nl();
f.g(aValue);
first = false;
}
f.nl().o().p('}');
}
}
代码示例来源:origin: sun-jaxb/jaxb-xjc
public void state(JFormatter f) {
f.i();
if( !isDefaultCase ) {
f.p("case ").g(label).p(':').nl();
} else {
f.p("default:").nl();
}
if (body != null)
f.s(body);
f.o();
}
}
代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel
public void state(JFormatter f) {
f.i();
if( !isDefaultCase ) {
f.p("case ").g(label).p(':').nl();
} else {
f.p("default:").nl();
}
if (body != null)
f.s(body);
f.o();
}
}
代码示例来源:origin: sun-jaxb/jaxb-xjc
public void generate(JFormatter f) {
f.p('{').nl().i();
boolean first = true;
for (JAnnotationValue aValue : values) {
if (!first)
f.p(',').nl();
f.g(aValue);
first = false;
}
f.nl().o().p('}');
}
}
代码示例来源:origin: javaee/jaxb-v2
public void state(JFormatter f) {
f.i();
if( !isDefaultCase ) {
f.p("case ").g(label).p(':').nl();
} else {
f.p("default:").nl();
}
if (body != null)
f.s(body);
f.o();
}
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void declare(JFormatter f) {
if (jdoc != null)
f.nl().g(jdoc);
if (annotations != null){
for (JAnnotationUse annotation : annotations)
f.g(annotation).nl();
}
f.g(mods).p(classType.declarationToken).id(name).d(generifiable);
if (superClass != null && superClass != owner().ref(Object.class))
f.nl().i().p("extends").g(superClass).nl().o();
if (!interfaces.isEmpty()) {
if (superClass == null)
f.nl();
f.i().p(classType==ClassType.INTERFACE ? "extends" : "implements");
f.g(interfaces);
f.nl().o();
}
declareBody(f);
}
代码示例来源:origin: javaee/jaxb-v2
public void declare(JFormatter f) {
if (jdoc != null)
f.nl().g(jdoc);
if (annotations != null){
for (JAnnotationUse annotation : annotations)
f.g(annotation).nl();
}
f.g(mods).p(classType.declarationToken).id(name).d(generifiable);
if (superClass != null && superClass != owner().ref(Object.class))
f.nl().i().p("extends").g(superClass).nl().o();
if (!interfaces.isEmpty()) {
if (superClass == null)
f.nl();
f.i().p(classType==ClassType.INTERFACE ? "extends" : "implements");
f.g(interfaces);
f.nl().o();
}
declareBody(f);
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
public void declare(JFormatter f) {
if (jdoc != null)
f.nl().g(jdoc);
if (annotations != null){
for (JAnnotationUse annotation : annotations)
f.g(annotation).nl();
}
f.g(mods).p(classType.declarationToken).id(name).d(generifiable);
if (superClass != null && superClass != owner().ref(Object.class))
f.nl().i().p("extends").g(superClass).nl().o();
if (!interfaces.isEmpty()) {
if (superClass == null)
f.nl();
f.i().p(classType==ClassType.INTERFACE ? "extends" : "implements");
f.g(interfaces);
f.nl().o();
}
declareBody(f);
}
内容来源于网络,如有侵权,请联系作者删除!