本文整理了Java中com.sun.codemodel.JFormatter.g()
方法的一些代码示例,展示了JFormatter.g()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFormatter.g()
方法的具体详情如下:
包路径:com.sun.codemodel.JFormatter
类名称:JFormatter
方法名:g
[英]Cause the JGenerable object to generate source for iteself
[中]使JGenerable对象为自身生成源
代码示例来源:origin: com.sun.codemodel/codemodel
public void generate(JFormatter f) {
JClass c;
if(cl instanceof JNarrowedClass)
c = ((JNarrowedClass)cl).basis;
else
c = cl;
f.g(c).p(".class");
}
};
代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel
public void generate(JFormatter f) {
if (opFirst)
f.p(op).g(e);
else
f.g(e).p(op);
}
}
代码示例来源:origin: sun-jaxb/jaxb-xjc
public void generate(JFormatter f) {
if (opFirst)
f.p(op).g(e);
else
f.g(e).p(op);
}
代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel
public void generate(JFormatter f) {
JClass c;
if(cl instanceof JNarrowedClass)
c = ((JNarrowedClass)cl).basis;
else
c = cl;
f.g(c).p(".class");
}
};
代码示例来源:origin: org.glassfish.metro/webservices-tools
/**
* Prints the class name in javadoc @link format.
*/
void printLink(JFormatter f) {
f.p("{@link ").g(this).p('}');
}
}
代码示例来源:origin: com.sun.codemodel/codemodel
/**
* Prints the class name in javadoc @link format.
*/
void printLink(JFormatter f) {
f.p("{@link ").g(this).p('}');
}
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void state(JFormatter f) {
f.p("try").g(body);
for (JCatchBlock cb : catches)
f.g(cb);
if (_finally != null)
f.p("finally").g(_finally);
f.nl();
}
代码示例来源:origin: javaee/jaxb-v2
/**
* Prints the class name in javadoc @link format.
*/
void printLink(JFormatter f) {
f.p("{@link ").g(this).p('}');
}
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
public void state(JFormatter f) {
f.p("try").g(body);
for (JCatchBlock cb : catches)
f.g(cb);
if (_finally != null)
f.p("finally").g(_finally);
f.nl();
}
代码示例来源:origin: sun-jaxb/jaxb-xjc
public void state(JFormatter f) {
f.p("try").g(body);
for (JCatchBlock cb : catches)
f.g(cb);
if (_finally != null)
f.p("finally").g(_finally);
f.nl();
}
代码示例来源:origin: sun-jaxb/jaxb-xjc
/**
* Prints the class name in javadoc @link format.
*/
void printLink(JFormatter f) {
f.p("{@link ").g(this).p('}');
}
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void bind(JFormatter f) {
if (annotations != null){
for( int i=0; i<annotations.size(); i++ )
f.g(annotations.get(i)).nl();
}
f.g(mods).g(type).id(name);
if (init != null)
f.p('=').g(init);
}
代码示例来源:origin: sun-jaxb/jaxb-xjc
public void generate(JFormatter f) {
if (opFirst)
f.p('(').p(op).g(e).p(')');
else
f.p('(').g(e).p(op).p(')');
}
代码示例来源:origin: javaee/jaxb-v2
public void bind(JFormatter f) {
if (annotations != null){
for( int i=0; i<annotations.size(); i++ )
f.g(annotations.get(i)).nl();
}
f.g(mods).g(type).id(name);
if (init != null)
f.p('=').g(init);
}
代码示例来源:origin: com.unquietcode.tools.jcodemodel/codemodel
public void bind(JFormatter f) {
if (annotations != null){
for( int i=0; i<annotations.size(); i++ )
f.g(annotations.get(i)).nl();
}
f.g(mods).g(type).id(name);
if (init != null)
f.p('=').g(init);
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void state(JFormatter f) {
f.p("return ");
if (expr != null) f.g(expr);
f.p(';').nl();
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void state(JFormatter f) {
f.p("throw");
f.g(expr);
f.p(';').nl();
}
代码示例来源:origin: com.sun.codemodel/codemodel
public void declare(JFormatter f) {
if( jdoc != null )
f.nl().g( jdoc );
if (annotations != null) {
for( int i=0; i<annotations.size(); i++ )
f.g(annotations.get(i)).nl();
}
f.id(name);
if(args!=null) {
f.p('(').g(args).p(')');
}
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
public void declare(JFormatter f) {
if( jdoc != null )
f.nl().g( jdoc );
if (annotations != null) {
for( int i=0; i<annotations.size(); i++ )
f.g(annotations.get(i)).nl();
}
f.id(name);
if(args!=null) {
f.p('(').g(args).p(')');
}
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
public void state(JFormatter f) {
f.p("for (");
f.g(type).id(var).p(": ").g(collection);
f.p(')');
if (body != null)
f.g(body).nl();
else
f.p(';').nl();
}
内容来源于网络,如有侵权,请联系作者删除!