• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java OutputUtilities类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.mybatis.generator.api.dom.OutputUtilities的典型用法代码示例。如果您正苦于以下问题:Java OutputUtilities类的具体用法?Java OutputUtilities怎么用?Java OutputUtilities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OutputUtilities类属于org.mybatis.generator.api.dom包,在下文中一共展示了OutputUtilities类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getFormattedContent

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
/**
 * Gets the formatted content.
 *
 * @return the formatted content
 */
public String getFormattedContent() {
    StringBuilder sb = new StringBuilder();

    sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$

    if (publicId != null && systemId != null) {
        OutputUtilities.newLine(sb);
        sb.append("<!DOCTYPE "); //$NON-NLS-1$
        sb.append(rootElement.getName());
        sb.append(" PUBLIC \""); //$NON-NLS-1$
        sb.append(publicId);
        sb.append("\" \""); //$NON-NLS-1$
        sb.append(systemId);
        sb.append("\">"); //$NON-NLS-1$
    }

    OutputUtilities.newLine(sb);
    sb.append(rootElement.getFormattedContent(0));

    return sb.toString();
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:27,代码来源:Document.java


示例2: getFormattedContent

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public String getFormattedContent() {
    StringBuilder sb = new StringBuilder();
    sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"); //$NON-NLS-1$
    if (publicId != null && systemId != null) {
        OutputUtilities.newLine(sb);
        sb.append("<!DOCTYPE "); //$NON-NLS-1$
        sb.append(rootElement.getName());
        sb.append(" PUBLIC \""); //$NON-NLS-1$
        sb.append(publicId);
        sb.append("\" \""); //$NON-NLS-1$
        sb.append(systemId);
        sb.append("\" >"); //$NON-NLS-1$
    }

    OutputUtilities.newLine(sb);
    sb.append(rootElement.getFormattedContent(0));

    return sb.toString();
}
 
开发者ID:funny5258,项目名称:autocode,代码行数:20,代码来源:Document.java


示例3: getFormattedContent

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public String getFormattedContent() {
    StringBuilder sb = new StringBuilder();

    sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"); //$NON-NLS-1$

    if (publicId != null && systemId != null) {
        OutputUtilities.newLine(sb);
        sb.append("<!DOCTYPE "); //$NON-NLS-1$
        sb.append(rootElement.getName());
        sb.append(" PUBLIC \""); //$NON-NLS-1$
        sb.append(publicId);
        sb.append("\" \""); //$NON-NLS-1$
        sb.append(systemId);
        sb.append("\" >"); //$NON-NLS-1$
    }

    OutputUtilities.newLine(sb);
    sb.append(rootElement.getFormattedContent(0));

    return sb.toString();
}
 
开发者ID:handosme,项目名称:mybatis-generator-plus,代码行数:22,代码来源:Document.java


示例4: getFormattedContent

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public String getFormattedContent() {
	StringBuilder sb = new StringBuilder();

	sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"); //$NON-NLS-1$

	if (publicId != null && systemId != null) {
		OutputUtilities.newLine(sb);
		sb.append("<!DOCTYPE "); //$NON-NLS-1$
		sb.append(rootElement.getName());
		sb.append(" PUBLIC \""); //$NON-NLS-1$
		sb.append(publicId);
		sb.append("\" \""); //$NON-NLS-1$
		sb.append(systemId);
		sb.append("\" >"); //$NON-NLS-1$
	}

	OutputUtilities.newLine(sb);
	sb.append(rootElement.getFormattedContent(0));

	return sb.toString();
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:22,代码来源:Document.java


示例5: addClassComment

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, String comment) {
	if (suppressAllComments) {
		return;
	}

	StringBuilder sb = new StringBuilder();
	String remark = comment;
	if (remark != null && remark.length() != 0) {
		innerClass.addJavaDocLine("/**"); //$NON-NLS-1$
		sb.append(" * "); //$NON-NLS-1$
		remark = remark.replaceAll(OutputUtilities.lineSeparator,
				"<br>" + OutputUtilities.lineSeparator + "\t * ");
		sb.append(remark);
		innerClass.addJavaDocLine(sb.toString());
		innerClass.addJavaDocLine(" */"); //$NON-NLS-1$
	}
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:18,代码来源:DefaultCommentGenerator.java


示例6: addFieldComment

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
	if (suppressAllComments) {
		return;
	}

	StringBuilder sb = new StringBuilder();

	String remark = introspectedColumn.getRemarks();
	if (remark != null && remark.length() != 0) {
		field.addJavaDocLine("/**"); //$NON-NLS-1$
		sb.append(" * "); //$NON-NLS-1$
		remark = remark.replaceAll(OutputUtilities.lineSeparator,
				"<br>" + OutputUtilities.lineSeparator + "\t * ");
		sb.append(remark);
		field.addJavaDocLine(sb.toString());
		field.addJavaDocLine(" */"); //$NON-NLS-1$
	}
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:19,代码来源:DefaultCommentGenerator.java


示例7: addGeneralMethodComment

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable, String comments) {
	if (suppressAllComments) {
		return;
	}

	StringBuilder sb = new StringBuilder();
	String remark = comments;
	if (remark != null && remark.length() != 0) {
		method.addJavaDocLine("/**"); //$NON-NLS-1$
		sb.append(" * "); //$NON-NLS-1$
		remark = remark.replaceAll(OutputUtilities.lineSeparator,
				"<br>" + OutputUtilities.lineSeparator + "\t * ");
		sb.append(remark);
		method.addJavaDocLine(sb.toString());
		method.addJavaDocLine(" */"); //$NON-NLS-1$
	}
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:18,代码来源:DefaultCommentGenerator.java


示例8: addGetterComment

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public void addGetterComment(Method method, IntrospectedTable introspectedTable,
		IntrospectedColumn introspectedColumn) {
	if (suppressAllComments) {
		return;
	}

	StringBuilder sb = new StringBuilder();
	String remark = introspectedColumn.getRemarks();

	if (remark != null && remark.length() != 0) {
		method.addJavaDocLine("/**");
		sb.append(" * @return ");
		remark = remark.replaceAll(OutputUtilities.lineSeparator,
				"<br>" + OutputUtilities.lineSeparator + "\t *         ");

		sb.append(remark);
		method.addJavaDocLine(sb.toString());
		method.addJavaDocLine(" */");
	}
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:21,代码来源:DefaultCommentGenerator.java


示例9: addSetterComment

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public void addSetterComment(Method method, IntrospectedTable introspectedTable,
		IntrospectedColumn introspectedColumn) {
	if (suppressAllComments) {
		return;
	}

	StringBuilder sb = new StringBuilder();
	String remark = introspectedColumn.getRemarks();

	if (remark != null && remark.length() != 0) {
		method.addJavaDocLine("/**");
		sb.append(" * @param " + JavaBeansUtil.getCamelCaseString(introspectedColumn.getActualColumnName(), false) + " "); //$NON-NLS-1$
		remark = remark.replaceAll(OutputUtilities.lineSeparator,
				"<br>" + OutputUtilities.lineSeparator + "\t *            ");
		sb.append("" + OutputUtilities.lineSeparator + "\t *            " + remark);
		method.addJavaDocLine(sb.toString());
		method.addJavaDocLine(" */"); //$NON-NLS-1$
	}
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:20,代码来源:DefaultCommentGenerator.java


示例10: getFormattedContent

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public String getFormattedContent(int indentLevel, CompilationUnit compilationUnit) {
    StringBuilder sb = new StringBuilder();

    addFormattedJavadoc(sb, indentLevel);
    addFormattedAnnotations(sb, indentLevel);

    OutputUtilities.javaIndent(sb, indentLevel);
    sb.append(getVisibility().getValue());

    if (isStatic()) {
        sb.append("static "); //$NON-NLS-1$
    }

    if (isFinal()) {
        sb.append("final "); //$NON-NLS-1$
    }

    if (isTransient()) {
        sb.append("transient "); //$NON-NLS-1$
    }
    
    if (isVolatile()) {
        sb.append("volatile "); //$NON-NLS-1$
    }
    
    sb.append(JavaDomUtils.calculateTypeName(compilationUnit, type));

    sb.append(' ');
    sb.append(name);

    if (initializationString != null && initializationString.length() > 0) {
        sb.append(" = "); //$NON-NLS-1$
        sb.append(initializationString);
    }

    sb.append(';');

    return sb.toString();
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:40,代码来源:Field.java


示例11: getFormattedContent

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
@Override
public String getFormattedContent(int indentLevel) {
    StringBuilder sb = new StringBuilder();
    OutputUtilities.xmlIndent(sb, indentLevel);
    sb.append(content);
    return sb.toString();
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:8,代码来源:TextElement.java


示例12: getFormattedContent

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
@Override
public String getFormattedContent(int indentLevel) {
    StringBuilder sb = new StringBuilder();

    OutputUtilities.xmlIndent(sb, indentLevel);
    sb.append('<');
    sb.append(name);

    Collections.sort(attributes);
    for (Attribute att : attributes) {
        sb.append(' ');
        sb.append(att.getFormattedContent());
    }

    if (elements.size() > 0) {
        sb.append(">"); //$NON-NLS-1$
        for (Element element : elements) {
            OutputUtilities.newLine(sb);
            sb.append(element.getFormattedContent(indentLevel + 1));
        }
        OutputUtilities.newLine(sb);
        OutputUtilities.xmlIndent(sb, indentLevel);
        sb.append("</"); //$NON-NLS-1$
        sb.append(name);
        sb.append('>');

    } else {
        sb.append(" />"); //$NON-NLS-1$
    }

    return sb.toString();
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:33,代码来源:XmlElement.java


示例13: testImportList

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
@Test
public void testImportList() {
    Set<FullyQualifiedJavaType> types = new TreeSet<FullyQualifiedJavaType>();
    
    types.add(new FullyQualifiedJavaType("foo.bar.Example"));
    types.add(new FullyQualifiedJavaType("foo.bar.Example.Criteria"));
    types.add(new FullyQualifiedJavaType("foo.bar.Example.Criterion"));
    assertEquals(3, types.size());
    
    Set<String> imports = OutputUtilities.calculateImports(types);
    assertEquals(3, imports.size());
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:13,代码来源:FullyQualifiedJavaTypeTest.java


示例14: getFormattedContent

import org.mybatis.generator.api.dom.OutputUtilities; //导入依赖的package包/类
public String getFormattedContent(int indentLevel) {
    StringBuilder sb = new StringBuilder();

    addFormattedJavadoc(sb, indentLevel);
    addFormattedAnnotations(sb, indentLevel);

    OutputUtilities.javaIndent(sb, indentLevel);
    sb.append(getVisibility().getValue());

    if (isStatic()) {
        sb.append("static "); //$NON-NLS-1$
    }

    if (isFinal()) {
        sb.append("final "); //$NON-NLS-1$
    }

    if (isTransient()) {
        sb.append("transient "); //$NON-NLS-1$
    }
    
    if (isVolatile()) {
        sb.append("volatile "); //$NON-NLS-1$
    }
    
    sb.append(type.getShortName());

    sb.append(' ');
    sb.append(name);

    if (initializationString != null && initializationString.length() > 0) {
        sb.append(" = "); //$NON-NLS-1$
        sb.append(initializationString);
    }

    sb.append(';');

    return sb.toString();
}
 
开发者ID:backkoms,项目名称:mybatis-generator-comments,代码行数:40,代码来源:Field.java



注:本文中的org.mybatis.generator.api.dom.OutputUtilities类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TableNotEnabledException类代码示例发布时间:2022-05-21
下一篇:
Java PermissionGrantedResponse类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap