代码拉取完成,页面将自动刷新
package compil;
import java.lang.reflect.InvocationTargetException;
import util.invoke.InvokeRefUtil;
import util.invoke.InvokeReflect;
import util.string.buffer._StringBuffer;
/**
* @author wlh
* 所有方法都是操作sb,
*/
public class OprJavaSb {
StringBuffer sb = new StringBuffer();
public StringBuffer getSb() {
return sb;
}
public OprJavaSb setSb(StringBuffer sb) {
this.sb = sb; return this;
}
public OprJavaSb() {
super();
}
public OprJavaSb(StringBuffer sb) {
super();
this.sb = sb;
}
/**导入Class*/
protected OprJavaSb impPackage(String className){
String strPack = "import "+className+';';
//防止重复导包引发的报错
if( sb.indexOf(strPack) != -1) return this;
_StringBuffer.insert(sb, ";", 0 , strPack);
return this;
}/**追加注解*/
protected OprJavaSb appendNote(String describe){
sb.append( "/**" + describe + "*/");
return this;
}/**追加注解*/
protected OprJavaSb appendAnno(String anno){
sb.append(anno);
return this;
}/**追加方法名*/
protected OprJavaSb appendMethod(String method){
sb.append( "public " + method + "{" /*"){"*/);
return this;
}
protected OprJavaSb appendInner(String inner){
sb.append( inner ).append(';');
return this;
}
protected OprJavaSb forIvoke(String method,String[] s) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
for (String string : s) {
InvokeReflect.invoke(this, method, true, string);
}
return this;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。