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


Java ValueUtil.createOrderedSetOfEach方法代码示例

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


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

示例1: MAP_m_Visitable__body

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入方法依赖的package包/类
/**
 *
 * map m_Visitable__body in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lFunctionDecl  : delphi::functionDecl[1];
 * var ast : astm::Visitable[1] := lFunctionDecl.ast;
 * var block1 : delphi::block[?] := lFunctionDecl.block;
 * var aFunctionDefinition : astm::FunctionDefinition[1] := ast.oclAsType(astm::FunctionDefinition)
 *   ;
 * var ast1 : astm::Visitable[?] := block1.ast;
 * var aDelphiBlockStatement : astm::DelphiBlockStatement[1] := ast1.oclAsType(astm::DelphiBlockStatement)
 *   ;
 * var OrderedSet1 : OrderedSet(astm::DelphiBlockStatement) := OrderedSet{aDelphiBlockStatement
 *   };
 * set aFunctionDefinition.body := OrderedSet1;
 *
 */
protected boolean MAP_m_Visitable__body(final /*@NonInvalid*/ @NonNull functionDecl lFunctionDecl_0)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@Thrown*/ @Nullable Visitable ast = lFunctionDecl_0.getAst();
		final /*@Thrown*/ boolean symbol_0 = ast != null;
		/*@Thrown*/ @Nullable Boolean raw_ast;
		if (symbol_0) {
			if (ast == null) {
				throw throwNull(lFunctionDecl_0, "Null where non-null value required");
			}
			final /*@Thrown*/ @Nullable block block = lFunctionDecl_0.getBlock();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_FunctionDefinition_0 = idResolver.getClass(CLSSid_FunctionDefinition, null);
			final /*@Thrown*/ @NonNull FunctionDefinition oclAsType = ClassUtil.nonNullState((FunctionDefinition)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_FunctionDefinition_0));
			if (block == null) {
				throw throwNull(lFunctionDecl_0, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
			}
			final /*@Thrown*/ @Nullable Visitable ast_0 = block.getAst();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_DelphiBlockStatement_0 = idResolver.getClass(CLSSid_DelphiBlockStatement, null);
			final /*@Thrown*/ @NonNull DelphiBlockStatement oclAsType_0 = ClassUtil.nonNullState((DelphiBlockStatement)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_0, TYP_astm_c_c_DelphiBlockStatement_0));
			final /*@Thrown*/ @NonNull OrderedSetValue OrderedSet = ValueUtil.createOrderedSetOfEach(ORD_CLSSid_DelphiBlockStatement, oclAsType_0);
			// mapping statements
			final /*@Thrown*/ @NonNull List<DelphiBlockStatement> ECORE_OrderedSet = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(DelphiBlockStatement.class, OrderedSet);
			oclAsType.getBody().addAll(ECORE_OrderedSet);
			final /*@Thrown*/ @Nullable Boolean m_Visitable__body = ValueUtil.TRUE_VALUE;
			raw_ast = m_Visitable__body;
		}
		else {
			raw_ast = ValueUtil.FALSE_VALUE;
		}
		return raw_ast;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Visitable__body", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:52,代码来源:Delphi_qvtp_qvtcas.java

示例2: MAP_m_Visitable__files

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入方法依赖的package包/类
/**
 *
 * map m_Visitable__files in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lMainRule  : delphi::mainRule[1];
 * var ast : astm::Visitable[1] := lMainRule.ast;
 * var file1 : delphi::file[?] := lMainRule.file;
 * var aProject : astm::Project[1] := ast.oclAsType(astm::Project)
 *   ;
 * var ast1 : astm::Visitable[?] := file1.ast;
 * var aCompilationUnit : astm::CompilationUnit[1] := ast1.oclAsType(astm::CompilationUnit)
 *   ;
 * var OrderedSet1 : OrderedSet(astm::CompilationUnit) := OrderedSet{aCompilationUnit
 *   };
 * set aProject.files := OrderedSet1;
 *
 */
protected boolean MAP_m_Visitable__files(final /*@NonInvalid*/ @NonNull mainRule lMainRule_0)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@Thrown*/ @Nullable Visitable ast = lMainRule_0.getAst();
		final /*@Thrown*/ boolean symbol_0 = ast != null;
		/*@Thrown*/ @Nullable Boolean raw_ast;
		if (symbol_0) {
			if (ast == null) {
				throw throwNull(lMainRule_0, "Null where non-null value required");
			}
			final /*@Thrown*/ @Nullable file file = lMainRule_0.getFile();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_Project_0 = idResolver.getClass(CLSSid_Project, null);
			final /*@Thrown*/ @NonNull Project oclAsType = ClassUtil.nonNullState((Project)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_Project_0));
			if (file == null) {
				throw throwNull(lMainRule_0, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
			}
			final /*@Thrown*/ @Nullable Visitable ast_0 = file.getAst();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_CompilationUnit_0 = idResolver.getClass(CLSSid_CompilationUnit, null);
			final /*@Thrown*/ @NonNull CompilationUnit oclAsType_0 = ClassUtil.nonNullState((CompilationUnit)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_0, TYP_astm_c_c_CompilationUnit_0));
			final /*@Thrown*/ @NonNull OrderedSetValue OrderedSet = ValueUtil.createOrderedSetOfEach(ORD_CLSSid_CompilationUnit, oclAsType_0);
			// mapping statements
			final /*@Thrown*/ @NonNull List<CompilationUnit> ECORE_OrderedSet = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(CompilationUnit.class, OrderedSet);
			oclAsType.getFiles().addAll(ECORE_OrderedSet);
			final /*@Thrown*/ @Nullable Boolean m_Visitable__files = ValueUtil.TRUE_VALUE;
			raw_ast = m_Visitable__files;
		}
		else {
			raw_ast = ValueUtil.FALSE_VALUE;
		}
		return raw_ast;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Visitable__files", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:52,代码来源:Delphi_qvtp_qvtcas.java

示例3: MAP_m_Visitable__body_1

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入方法依赖的package包/类
/**
 *
 * map m_Visitable__body_1 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lProcedureDecl  : delphi::procedureDecl[1];
 * var ast : astm::Visitable[1] := lProcedureDecl.ast;
 * var block1 : delphi::block[?] := lProcedureDecl.block;
 * var aFunctionDefinition : astm::FunctionDefinition[1] := ast.oclAsType(astm::FunctionDefinition)
 *   ;
 * var ast1 : astm::Visitable[?] := block1.ast;
 * var aDelphiBlockStatement : astm::DelphiBlockStatement[1] := ast1.oclAsType(astm::DelphiBlockStatement)
 *   ;
 * var OrderedSet1 : OrderedSet(astm::DelphiBlockStatement) := OrderedSet{aDelphiBlockStatement
 *   };
 * set aFunctionDefinition.body := OrderedSet1;
 *
 */
protected boolean MAP_m_Visitable__body_1(final /*@NonInvalid*/ @NonNull procedureDecl lProcedureDecl_0)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@Thrown*/ @Nullable Visitable ast = lProcedureDecl_0.getAst();
		final /*@Thrown*/ boolean symbol_0 = ast != null;
		/*@Thrown*/ @Nullable Boolean raw_ast;
		if (symbol_0) {
			if (ast == null) {
				throw throwNull(lProcedureDecl_0, "Null where non-null value required");
			}
			final /*@Thrown*/ @Nullable block block = lProcedureDecl_0.getBlock();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_FunctionDefinition_0 = idResolver.getClass(CLSSid_FunctionDefinition, null);
			final /*@Thrown*/ @NonNull FunctionDefinition oclAsType = ClassUtil.nonNullState((FunctionDefinition)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_FunctionDefinition_0));
			if (block == null) {
				throw throwNull(lProcedureDecl_0, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
			}
			final /*@Thrown*/ @Nullable Visitable ast_0 = block.getAst();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_DelphiBlockStatement_0 = idResolver.getClass(CLSSid_DelphiBlockStatement, null);
			final /*@Thrown*/ @NonNull DelphiBlockStatement oclAsType_0 = ClassUtil.nonNullState((DelphiBlockStatement)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_0, TYP_astm_c_c_DelphiBlockStatement_0));
			final /*@Thrown*/ @NonNull OrderedSetValue OrderedSet = ValueUtil.createOrderedSetOfEach(ORD_CLSSid_DelphiBlockStatement, oclAsType_0);
			// mapping statements
			final /*@Thrown*/ @NonNull List<DelphiBlockStatement> ECORE_OrderedSet = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(DelphiBlockStatement.class, OrderedSet);
			oclAsType.getBody().addAll(ECORE_OrderedSet);
			final /*@Thrown*/ @Nullable Boolean m_Visitable__body_1 = ValueUtil.TRUE_VALUE;
			raw_ast = m_Visitable__body_1;
		}
		else {
			raw_ast = ValueUtil.FALSE_VALUE;
		}
		return raw_ast;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Visitable__body_1", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:52,代码来源:Delphi_qvtp_qvtcas.java

示例4: MAP_m_Visitable__subStatements

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入方法依赖的package包/类
/**
 *
 * map m_Visitable__subStatements in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lBlock  : delphi::block[1];
 * var ast : astm::Visitable[1] := lBlock.ast;
 * var compound : delphi::compoundStmt[?] := lBlock.compound;
 * var aDelphiBlockStatement : astm::DelphiBlockStatement[1] := ast.oclAsType(astm::DelphiBlockStatement)
 *   ;
 * var ast1 : astm::Visitable[?] := compound.ast;
 * var aBlockStatement : astm::BlockStatement[1] := ast1.oclAsType(astm::BlockStatement)
 *   ;
 * var OrderedSet1 : OrderedSet(astm::BlockStatement) := OrderedSet{aBlockStatement
 *   };
 * set aDelphiBlockStatement.subStatements := OrderedSet1;
 *
 */
protected boolean MAP_m_Visitable__subStatements(final /*@NonInvalid*/ @NonNull block lBlock_1)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@Thrown*/ @Nullable Visitable ast = lBlock_1.getAst();
		final /*@Thrown*/ boolean symbol_0 = ast != null;
		/*@Thrown*/ @Nullable Boolean raw_ast;
		if (symbol_0) {
			if (ast == null) {
				throw throwNull(lBlock_1, "Null where non-null value required");
			}
			final /*@Thrown*/ @Nullable compoundStmt compound = lBlock_1.getCompound();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_DelphiBlockStatement_0 = idResolver.getClass(CLSSid_DelphiBlockStatement, null);
			final /*@Thrown*/ @NonNull DelphiBlockStatement oclAsType = ClassUtil.nonNullState((DelphiBlockStatement)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_DelphiBlockStatement_0));
			if (compound == null) {
				throw throwNull(lBlock_1, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
			}
			final /*@Thrown*/ @Nullable Visitable ast_0 = compound.getAst();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_BlockStatement_0 = idResolver.getClass(CLSSid_BlockStatement, null);
			final /*@Thrown*/ @NonNull BlockStatement oclAsType_0 = ClassUtil.nonNullState((BlockStatement)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_0, TYP_astm_c_c_BlockStatement_0));
			final /*@Thrown*/ @NonNull OrderedSetValue OrderedSet = ValueUtil.createOrderedSetOfEach(ORD_CLSSid_BlockStatement, oclAsType_0);
			// mapping statements
			final /*@Thrown*/ @NonNull List<BlockStatement> ECORE_OrderedSet = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(BlockStatement.class, OrderedSet);
			oclAsType.getSubStatements().addAll(ECORE_OrderedSet);
			final /*@Thrown*/ @Nullable Boolean m_Visitable__subStatements = ValueUtil.TRUE_VALUE;
			raw_ast = m_Visitable__subStatements;
		}
		else {
			raw_ast = ValueUtil.FALSE_VALUE;
		}
		return raw_ast;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Visitable__subStatements", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:52,代码来源:Delphi_qvtp_qvtcas.java

示例5: MAP_m_Visitable__body_2

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入方法依赖的package包/类
/**
 *
 * map m_Visitable__body_2 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lCaseSelector  : delphi::caseSelector[1];
 * var ast : astm::Visitable[1] := lCaseSelector.ast;
 * var stmt : delphi::statement[?] := lCaseSelector.stmt;
 * var aCaseBlock : astm::CaseBlock[1] := ast.oclAsType(astm::CaseBlock)
 *   ;
 * var ast1 : astm::Visitable[?] := stmt.ast;
 * var aStatement : astm::Statement[1] := ast1.oclAsType(astm::Statement)
 *   ;
 * var OrderedSet1 : OrderedSet(astm::Statement) := OrderedSet{aStatement
 *   };
 * set aCaseBlock.body := OrderedSet1;
 *
 */
protected boolean MAP_m_Visitable__body_2(final /*@NonInvalid*/ @NonNull caseSelector lCaseSelector_0)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@Thrown*/ @Nullable Visitable ast = lCaseSelector_0.getAst();
		final /*@Thrown*/ boolean symbol_0 = ast != null;
		/*@Thrown*/ @Nullable Boolean raw_ast;
		if (symbol_0) {
			if (ast == null) {
				throw throwNull(lCaseSelector_0, "Null where non-null value required");
			}
			final /*@Thrown*/ @Nullable statement stmt = lCaseSelector_0.getStmt();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_CaseBlock_0 = idResolver.getClass(CLSSid_CaseBlock, null);
			final /*@Thrown*/ @NonNull CaseBlock oclAsType = ClassUtil.nonNullState((CaseBlock)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_CaseBlock_0));
			if (stmt == null) {
				throw throwNull(lCaseSelector_0, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
			}
			final /*@Thrown*/ @Nullable Visitable ast_0 = stmt.getAst();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_Statement_0 = idResolver.getClass(CLSSid_Statement, null);
			final /*@Thrown*/ @NonNull Statement oclAsType_0 = ClassUtil.nonNullState((Statement)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_0, TYP_astm_c_c_Statement_0));
			final /*@Thrown*/ @NonNull OrderedSetValue OrderedSet = ValueUtil.createOrderedSetOfEach(ORD_CLSSid_Statement, oclAsType_0);
			// mapping statements
			final /*@Thrown*/ @NonNull List<Statement> ECORE_OrderedSet = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(Statement.class, OrderedSet);
			oclAsType.getBody().addAll(ECORE_OrderedSet);
			final /*@Thrown*/ @Nullable Boolean m_Visitable__body_2 = ValueUtil.TRUE_VALUE;
			raw_ast = m_Visitable__body_2;
		}
		else {
			raw_ast = ValueUtil.FALSE_VALUE;
		}
		return raw_ast;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Visitable__body_2", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:52,代码来源:Delphi_qvtp_qvtcas.java

示例6: MAP_m_Visitable__subStatements_2

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入方法依赖的package包/类
/**
 *
 * map m_Visitable__subStatements_2 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lWithStmt  : delphi::withStmt[1];
 * var ast : astm::Visitable[1] := lWithStmt.ast;
 * var stmt : delphi::statement[?] := lWithStmt.stmt;
 * var aDelphiWithStatement : astm::DelphiWithStatement[1] := ast.oclAsType(astm::DelphiWithStatement)
 *   ;
 * var ast1 : astm::Visitable[?] := stmt.ast;
 * var aStatement : astm::Statement[1] := ast1.oclAsType(astm::Statement)
 *   ;
 * var OrderedSet1 : OrderedSet(astm::Statement) := OrderedSet{aStatement
 *   };
 * set aDelphiWithStatement.subStatements := OrderedSet1;
 *
 */
protected boolean MAP_m_Visitable__subStatements_2(final /*@NonInvalid*/ @NonNull withStmt lWithStmt_0)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@Thrown*/ @Nullable Visitable ast = lWithStmt_0.getAst();
		final /*@Thrown*/ boolean symbol_0 = ast != null;
		/*@Thrown*/ @Nullable Boolean raw_ast;
		if (symbol_0) {
			if (ast == null) {
				throw throwNull(lWithStmt_0, "Null where non-null value required");
			}
			final /*@Thrown*/ @Nullable statement stmt = lWithStmt_0.getStmt();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_DelphiWithStatement_0 = idResolver.getClass(CLSSid_DelphiWithStatement, null);
			final /*@Thrown*/ @NonNull DelphiWithStatement oclAsType = ClassUtil.nonNullState((DelphiWithStatement)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_DelphiWithStatement_0));
			if (stmt == null) {
				throw throwNull(lWithStmt_0, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
			}
			final /*@Thrown*/ @Nullable Visitable ast_0 = stmt.getAst();
			final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_Statement_0 = idResolver.getClass(CLSSid_Statement, null);
			final /*@Thrown*/ @NonNull Statement oclAsType_0 = ClassUtil.nonNullState((Statement)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_0, TYP_astm_c_c_Statement_0));
			final /*@Thrown*/ @NonNull OrderedSetValue OrderedSet = ValueUtil.createOrderedSetOfEach(ORD_CLSSid_Statement, oclAsType_0);
			// mapping statements
			final /*@Thrown*/ @NonNull List<Statement> ECORE_OrderedSet = ((IdResolver.IdResolverExtension)idResolver).ecoreValueOfAll(Statement.class, OrderedSet);
			oclAsType.getSubStatements().addAll(ECORE_OrderedSet);
			final /*@Thrown*/ @Nullable Boolean m_Visitable__subStatements_2 = ValueUtil.TRUE_VALUE;
			raw_ast = m_Visitable__subStatements_2;
		}
		else {
			raw_ast = ValueUtil.FALSE_VALUE;
		}
		return raw_ast;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Visitable__subStatements_2", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:52,代码来源:Delphi_qvtp_qvtcas.java


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