当前位置: 首页>>代码示例>>Java>>正文


Java TypeDeclaration.traverse方法代码示例

本文整理汇总了Java中org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse方法的典型用法代码示例。如果您正苦于以下问题:Java TypeDeclaration.traverse方法的具体用法?Java TypeDeclaration.traverse怎么用?Java TypeDeclaration.traverse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jdt.internal.compiler.ast.TypeDeclaration的用法示例。


在下文中一共展示了TypeDeclaration.traverse方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: format

import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; //导入方法依赖的package包/类
private void format(
	TypeDeclaration memberTypeDeclaration,
	ClassScope scope,
	boolean isChunkStart,
	boolean isFirstClassBodyDeclaration) {

	if (isFirstClassBodyDeclaration) {
		int newLinesBeforeFirstClassBodyDeclaration = this.preferences.blank_lines_before_first_class_body_declaration;
		if (newLinesBeforeFirstClassBodyDeclaration > 0) {
			this.scribe.printEmptyLines(newLinesBeforeFirstClassBodyDeclaration);
		}
	} else {
		int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0;
		if (newLineBeforeChunk > 0) {
			this.scribe.printEmptyLines(newLineBeforeChunk);
		}
		final int newLinesBeforeMember = this.preferences.blank_lines_before_member_type;
		if (newLinesBeforeMember > 0) {
			this.scribe.printEmptyLines(newLinesBeforeMember);
		}
	}
	memberTypeDeclaration.traverse(this, scope);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:24,代码来源:CodeFormatterVisitor.java

示例2: makeBuilderClass

import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; //导入方法依赖的package包/类
public EclipseNode makeBuilderClass(boolean isStatic, EclipseNode tdParent, String builderClassName, TypeParameter[] typeParams, ASTNode source) {
	TypeDeclaration parent = (TypeDeclaration) tdParent.get();
	TypeDeclaration builder = new TypeDeclaration(parent.compilationResult);
	builder.bits |= Eclipse.ECLIPSE_DO_NOT_TOUCH_FLAG;
	builder.modifiers |= ClassFileConstants.AccPublic;
	if (isStatic) builder.modifiers |= ClassFileConstants.AccStatic;
	builder.typeParameters = copyTypeParams(typeParams, source);
	builder.name = builderClassName.toCharArray();
	builder.traverse(new SetGeneratedByVisitor(source), (ClassScope) null);
	return injectType(tdParent, builder);
}
 
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:12,代码来源:HandleBuilder.java

示例3: makeBuilderClass

import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; //导入方法依赖的package包/类
public EclipseNode makeBuilderClass(EclipseNode tdParent, String builderClassName, TypeParameter[] typeParams, ASTNode source) {
	TypeDeclaration parent = (TypeDeclaration) tdParent.get();
	TypeDeclaration builder = new TypeDeclaration(parent.compilationResult);
	builder.bits |= Eclipse.ECLIPSE_DO_NOT_TOUCH_FLAG;
	builder.modifiers |= ClassFileConstants.AccPublic | ClassFileConstants.AccStatic;
	builder.typeParameters = copyTypeParams(typeParams, source);
	builder.name = builderClassName.toCharArray();
	builder.traverse(new SetGeneratedByVisitor(source), (ClassScope) null);
	return injectType(tdParent, builder);
}
 
开发者ID:mobmead,项目名称:EasyMPermission,代码行数:11,代码来源:HandleBuilder.java


注:本文中的org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。