本文整理了Java中org.mybatis.generator.api.dom.java.Method.<init>()
方法的一些代码示例,展示了Method.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Method.<init>()
方法的具体详情如下:
包路径:org.mybatis.generator.api.dom.java.Method
类名称:Method
方法名:<init>
暂无
代码示例来源:origin: shuzheng/zheng
topLevelClass.addField(limit);
Method setLimit = new Method();
setLimit.setVisibility(JavaVisibility.PUBLIC);
setLimit.setName("setLimit");
topLevelClass.addMethod(setLimit);
Method getLimit = new Method();
getLimit.setVisibility(JavaVisibility.PUBLIC);
getLimit.setReturnType(integerWrapper);
topLevelClass.addField(offset);
Method setOffset = new Method();
setOffset.setVisibility(JavaVisibility.PUBLIC);
setOffset.setName("setOffset");
topLevelClass.addMethod(setOffset);
Method getOffset = new Method();
getOffset.setVisibility(JavaVisibility.PUBLIC);
getOffset.setReturnType(integerWrapper);
代码示例来源:origin: jmdhappy/xxpay-master
topLevelClass.addField(limit);
Method setLimit = new Method();
setLimit.setVisibility(JavaVisibility.PUBLIC);
setLimit.setName("setLimit");
topLevelClass.addMethod(setLimit);
Method getLimit = new Method();
getLimit.setVisibility(JavaVisibility.PUBLIC);
getLimit.setReturnType(integerWrapper);
topLevelClass.addField(offset);
Method setOffset = new Method();
setOffset.setVisibility(JavaVisibility.PUBLIC);
setOffset.setName("setOffset");
topLevelClass.addMethod(setOffset);
Method getOffset = new Method();
getOffset.setVisibility(JavaVisibility.PUBLIC);
getOffset.setReturnType(integerWrapper);
代码示例来源:origin: jmdhappy/xxpay-master
topLevelClass.addField(limit);
Method setLimit = new Method();
setLimit.setVisibility(JavaVisibility.PUBLIC);
setLimit.setName("setLimit");
topLevelClass.addMethod(setLimit);
Method getLimit = new Method();
getLimit.setVisibility(JavaVisibility.PUBLIC);
getLimit.setReturnType(integerWrapper);
topLevelClass.addField(offset);
Method setOffset = new Method();
setOffset.setVisibility(JavaVisibility.PUBLIC);
setOffset.setName("setOffset");
topLevelClass.addMethod(setOffset);
Method getOffset = new Method();
getOffset.setVisibility(JavaVisibility.PUBLIC);
getOffset.setReturnType(integerWrapper);
代码示例来源:origin: abel533/Mapper
Method defaultMethod = new Method();
defaultMethod.setStatic(true);
defaultMethod.setName("defaultInstance");
代码示例来源:origin: abel533/Mapper
Method defaultMethod = new Method();
defaultMethod.setStatic(true);
defaultMethod.setName("defaultInstance");
代码示例来源:origin: sanluan/PublicCMS
Method m = new Method();
m.setVisibility(JavaVisibility.PUBLIC);
if (it.getName().endsWith("WithRowbounds")) {
代码示例来源:origin: oceanc/mybatis3-generator-plugins
private Method makePartitionMethod(FullyQualifiedJavaType paramType, FullyQualifiedJavaType returnType, String fieldName, String tableName, String[] exp) {
String methodName = PARTITION_FACTOR + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1, fieldName.length());
Method method = new Method();
method.setName(methodName);
method.setVisibility(JavaVisibility.PUBLIC);
method.setReturnType(returnType);
method.addBodyLines(Arrays.asList(exp));
method.addParameter(new Parameter(paramType, fieldName));
PluginUtils.addDoc(this.getContext(), method, tableName);
return method;
}
代码示例来源:origin: cxjava/mybatis-generator-core
public static Method getGetter(Field field) {
Method method = new Method();
method.setName(getGetterMethodName(field.getName(), field.getType()));
method.setReturnType(field.getType());
method.setVisibility(JavaVisibility.PUBLIC);
StringBuilder sb = new StringBuilder();
sb.append("return "); //$NON-NLS-1$
sb.append(field.getName());
sb.append(';');
method.addBodyLine(sb.toString());
return method;
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
@Override
protected void configureConstructorTemplate() {
Method method = new Method();
method.setConstructor(true);
method.setVisibility(JavaVisibility.PUBLIC);
method.addBodyLine("super();"); //$NON-NLS-1$
setConstructorTemplate(method);
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
@Override
protected void configureConstructorTemplate() {
Method method = new Method();
method.setConstructor(true);
method.setVisibility(JavaVisibility.PUBLIC);
method.addBodyLine("super();"); //$NON-NLS-1$
setConstructorTemplate(method);
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
@Override
protected void configureConstructorTemplate() {
Method method = new Method();
method.setConstructor(true);
method.setVisibility(JavaVisibility.PUBLIC);
method.addBodyLine("super();"); //$NON-NLS-1$
setConstructorTemplate(method);
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
@Override
protected void configureConstructorTemplate() {
Method method = new Method();
method.setConstructor(true);
method.setVisibility(JavaVisibility.PUBLIC);
method.addBodyLine("super();"); //$NON-NLS-1$
setConstructorTemplate(method);
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
@Override
protected void configureConstructorTemplate() {
Method method = new Method();
method.setConstructor(true);
method.setVisibility(JavaVisibility.PUBLIC);
method.addParameter(new Parameter(fqjt, "daoManager")); //$NON-NLS-1$
method.addBodyLine("super(daoManager);"); //$NON-NLS-1$
setConstructorTemplate(method);
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
@Override
protected void configureConstructorTemplate() {
Method method = new Method();
method.setConstructor(true);
method.setVisibility(JavaVisibility.PUBLIC);
method.addParameter(new Parameter(fqjt, "daoManager")); //$NON-NLS-1$
method.addBodyLine("super(daoManager);"); //$NON-NLS-1$
setConstructorTemplate(method);
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
@Override
protected void configureConstructorTemplate() {
Method constructor = new Method();
constructor.setConstructor(true);
constructor.setVisibility(JavaVisibility.PUBLIC);
constructor
.addParameter(new Parameter(sqlMapClientType, "sqlMapClient")); //$NON-NLS-1$
constructor.addBodyLine("super();"); //$NON-NLS-1$
constructor.addBodyLine("this.sqlMapClient = sqlMapClient;"); //$NON-NLS-1$
setConstructorTemplate(constructor);
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
@Override
protected void configureConstructorTemplate() {
Method constructor = new Method();
constructor.setConstructor(true);
constructor.setVisibility(JavaVisibility.PUBLIC);
constructor
.addParameter(new Parameter(sqlMapClientType, "sqlMapClient")); //$NON-NLS-1$
constructor.addBodyLine("super();"); //$NON-NLS-1$
constructor.addBodyLine("this.sqlMapClient = sqlMapClient;"); //$NON-NLS-1$
setConstructorTemplate(constructor);
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
protected Method getDefaultConstructor(TopLevelClass topLevelClass) {
Method method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setConstructor(true);
method.setName(topLevelClass.getType().getShortName());
method.addBodyLine("super();"); //$NON-NLS-1$
context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);
return method;
}
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
protected void addDefaultConstructor(TopLevelClass topLevelClass) {
Method method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setConstructor(true);
method.setName(topLevelClass.getType().getShortName());
method.addBodyLine("super();"); //$NON-NLS-1$
context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
}
}
代码示例来源:origin: handosme/mybatis-generator-plus
protected void addDefaultConstructor(TopLevelClass topLevelClass) {
Method method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setConstructor(true);
method.setName(topLevelClass.getType().getShortName());
method.addBodyLine("super();"); //$NON-NLS-1$
context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
}
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
private void addNewComposedFunction(Interface interfaze, IntrospectedTable introspectedTable, FullyQualifiedJavaType baseMethodReturnType) {
interfaze.addImportedType(new FullyQualifiedJavaType("java.util.function.Function")); //$NON-NLS-1$
FullyQualifiedJavaType returnType = new FullyQualifiedJavaType("Function<SelectStatementProvider, " //$NON-NLS-1$
+ baseMethodReturnType.getShortName() + ">"); //$NON-NLS-1$
Method method = new Method("selectManyWithRowbounds"); //$NON-NLS-1$
method.setDefault(true);
method.setReturnType(returnType);
method.addParameter(new Parameter(rowBounds, "rowBounds")); //$NON-NLS-1$
method.addBodyLine("return selectStatement -> selectManyWithRowbounds(selectStatement, rowBounds);"); //$NON-NLS-1$
context.getCommentGenerator().addGeneralMethodAnnotation(method, introspectedTable, interfaze.getImportedTypes());
interfaze.addMethod(method);
}
内容来源于网络,如有侵权,请联系作者删除!