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


Java ValueUtil类代码示例

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


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

示例1: MAP_m_m_constExpr_ast0

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_m_constExpr_ast0 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lConstExpr  : delphi::constExpr[1];
 * check lConstExpr.oclIsTypeOf(delphi::constExpr);
 * set lConstExpr.ast := null;
 *
 */
protected boolean MAP_m_m_constExpr_ast0(final /*@NonInvalid*/ @NonNull constExpr lConstExpr)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@NonInvalid*/ [email protected] Class TYP_delphi_c_c_constExpr_0_0 = idResolver.getClass(CLSSid_constExpr, null);
		final /*@NonInvalid*/ boolean oclIsTypeOf = OclAnyOclIsTypeOfOperation.INSTANCE.evaluate(executor, lConstExpr, TYP_delphi_c_c_constExpr_0_0).booleanValue();
		/*@Thrown*/ @Nullable Boolean symbol_2;
		if (oclIsTypeOf) {
			// mapping statements
			lConstExpr.setAst(null);
			final /*@Thrown*/ @Nullable Boolean m_m_constExpr_ast0 = ValueUtil.TRUE_VALUE;
			symbol_2 = m_m_constExpr_ast0;
		}
		else {
			symbol_2 = ValueUtil.FALSE_VALUE;
		}
		return symbol_2;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_m_constExpr_ast0", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:30,代码来源:Delphi_qvtp_qvtcas.java

示例2: MAP_m_m_expression_ast0

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_m_expression_ast0 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lExpression  : delphi::expression[1];
 * check lExpression.oclIsTypeOf(delphi::expression);
 * set lExpression.ast := null;
 *
 */
protected boolean MAP_m_m_expression_ast0(final /*@NonInvalid*/ @NonNull expression lExpression)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@NonInvalid*/ [email protected] Class TYP_delphi_c_c_expression_0_0 = idResolver.getClass(CLSSid_expression, null);
		final /*@NonInvalid*/ boolean oclIsTypeOf = OclAnyOclIsTypeOfOperation.INSTANCE.evaluate(executor, lExpression, TYP_delphi_c_c_expression_0_0).booleanValue();
		/*@Thrown*/ @Nullable Boolean symbol_2;
		if (oclIsTypeOf) {
			// mapping statements
			lExpression.setAst(null);
			final /*@Thrown*/ @Nullable Boolean m_m_expression_ast0 = ValueUtil.TRUE_VALUE;
			symbol_2 = m_m_expression_ast0;
		}
		else {
			symbol_2 = ValueUtil.FALSE_VALUE;
		}
		return symbol_2;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_m_expression_ast0", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:30,代码来源:Delphi_qvtp_qvtcas.java

示例3: MAP_m_m_file_ast0

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_m_file_ast0 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lFile  : delphi::file[1];
 * check lFile.oclIsTypeOf(delphi::file);
 * set lFile.ast := null;
 *
 */
protected boolean MAP_m_m_file_ast0(final /*@NonInvalid*/ @NonNull file lFile)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@NonInvalid*/ [email protected] Class TYP_delphi_c_c_file_0_0 = idResolver.getClass(CLSSid_file, null);
		final /*@NonInvalid*/ boolean oclIsTypeOf = OclAnyOclIsTypeOfOperation.INSTANCE.evaluate(executor, lFile, TYP_delphi_c_c_file_0_0).booleanValue();
		/*@Thrown*/ @Nullable Boolean symbol_2;
		if (oclIsTypeOf) {
			// mapping statements
			lFile.setAst(null);
			final /*@Thrown*/ @Nullable Boolean m_m_file_ast0 = ValueUtil.TRUE_VALUE;
			symbol_2 = m_m_file_ast0;
		}
		else {
			symbol_2 = ValueUtil.FALSE_VALUE;
		}
		return symbol_2;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_m_file_ast0", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:30,代码来源:Delphi_qvtp_qvtcas.java

示例4: MAP_m_Visitable__ast_1

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_Visitable__ast_1 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lSimpleFactor  : delphi::simpleFactor[1];
 * var designator1 : delphi::designator[?] := lSimpleFactor.designator;
 * var ast : astm::Visitable[?] := designator1.ast;
 * var aNameReference : astm::NameReference[1] := ast.oclAsType(astm::NameReference);
 * set lSimpleFactor.ast := aNameReference;
 *
 */
protected boolean MAP_m_Visitable__ast_1(final /*@NonInvalid*/ @NonNull simpleFactor lSimpleFactor)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@Thrown*/ @Nullable designator designator = lSimpleFactor.getDesignator();
		if (designator == null) {
			throw throwNull(lSimpleFactor, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
		}
		final /*@Thrown*/ @Nullable Visitable ast = designator.getAst();
		final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_NameReference_0 = idResolver.getClass(CLSSid_NameReference, null);
		final /*@Thrown*/ @NonNull NameReference oclAsType = ClassUtil.nonNullState((NameReference)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_NameReference_0));
		// mapping statements
		lSimpleFactor.setAst(oclAsType);
		final /*@Thrown*/ @Nullable Boolean m_Visitable__ast_1 = ValueUtil.TRUE_VALUE;
		return m_Visitable__ast_1;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Visitable__ast_1", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:30,代码来源:Delphi_qvtp_qvtcas.java

示例5: MAP_m_Visitable__ast_2

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_Visitable__ast_2 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lConstExp  : delphi::ConstExp[1];
 * var exp : delphi::expression[?] := lConstExp.exp;
 * var ast : astm::Visitable[?] := exp.ast;
 * var aExpression : astm::Expression[1] := ast.oclAsType(astm::Expression);
 * set lConstExp.ast := aExpression;
 *
 */
protected boolean MAP_m_Visitable__ast_2(final /*@NonInvalid*/ @NonNull ConstExp lConstExp)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@Thrown*/ @Nullable expression exp = lConstExp.getExp();
		if (exp == null) {
			throw throwNull(lConstExp, "Null source for \'\'http://www.xtext.org/example/delphi/Delphi\'::CSTrace::ast\'");
		}
		final /*@Thrown*/ @Nullable Visitable ast = exp.getAst();
		final /*@NonInvalid*/ [email protected] Class TYP_astm_c_c_Expression_0 = idResolver.getClass(CLSSid_Expression, null);
		final /*@Thrown*/ @NonNull Expression oclAsType = ClassUtil.nonNullState((Expression)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_astm_c_c_Expression_0));
		// mapping statements
		lConstExp.setAst(oclAsType);
		final /*@Thrown*/ @Nullable Boolean m_Visitable__ast_2 = ValueUtil.TRUE_VALUE;
		return m_Visitable__ast_2;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Visitable__ast_2", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:30,代码来源:Delphi_qvtp_qvtcas.java

示例6: MAP_m_m_unlabelledStatement_ast0

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_m_unlabelledStatement_ast0 in Delphi_qvtp_qvtcas {
 *
 *   guard:leftCS lUnlabelledStatement  : delphi::unlabelledStatement[1];
 * check lUnlabelledStatement.oclIsTypeOf(delphi::unlabelledStatement);
 * set lUnlabelledStatement.ast := null;
 *
 */
protected boolean MAP_m_m_unlabelledStatement_ast0(final /*@NonInvalid*/ @NonNull unlabelledStatement lUnlabelledStatement)  {
	try {
		final /*@NonInvalid*/ @NonNull IdResolver idResolver = executor.getIdResolver();
		final /*@NonInvalid*/ [email protected] Class TYP_delphi_c_c_unlabelledStatement_0_0 = idResolver.getClass(CLSSid_unlabelledStatement, null);
		final /*@NonInvalid*/ boolean oclIsTypeOf = OclAnyOclIsTypeOfOperation.INSTANCE.evaluate(executor, lUnlabelledStatement, TYP_delphi_c_c_unlabelledStatement_0_0).booleanValue();
		/*@Thrown*/ @Nullable Boolean symbol_2;
		if (oclIsTypeOf) {
			// mapping statements
			lUnlabelledStatement.setAst(null);
			final /*@Thrown*/ @Nullable Boolean m_m_unlabelledStatement_ast0 = ValueUtil.TRUE_VALUE;
			symbol_2 = m_m_unlabelledStatement_ast0;
		}
		else {
			symbol_2 = ValueUtil.FALSE_VALUE;
		}
		return symbol_2;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_m_unlabelledStatement_ast0", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:30,代码来源:Delphi_qvtp_qvtcas.java

示例7: MAP_m_Company_name_e

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_Company_name_e in companies_qvtp_qvtcas {
 * guard:leftCS lCompany  : companies::company[1];
 * var name : String[?] := lCompany.name;
 * new:rightAS rCompany : company::Company[1];
 * set lCompany.ast := rCompany;
 * set rCompany.name := name;
 *
 */
protected boolean MAP_m_Company_name_e(final /*@NonInvalid*/ @NonNull company lCompany)  {
	try {
		final /*@Thrown*/ @Nullable String name = lCompany.getName();
		// creations
		final @SuppressWarnings("null")@NonNull Company rCompany = CompanyFactory.eINSTANCE.createCompany();
		models[1/*rightAS*/].add(rCompany, false);
		// mapping statements
		lCompany.setAst(rCompany);
		if (name == null) {
			throw throwNull(lCompany, "Null value for company::Company::name assignment");
		}
		rCompany.setName(name);
		final /*@Thrown*/ @Nullable Boolean m_Company_name_e = ValueUtil.TRUE_VALUE;
		return m_Company_name_e;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Company_name_e", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:29,代码来源:companies_qvtp_qvtcas.java

示例8: MAP_m_Department_name_e

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_Department_name_e in companies_qvtp_qvtcas {
 * guard:leftCS lDepartment  : companies::department[1];
 * var name : String[?] := lDepartment.name;
 * new:rightAS rDepartment : company::Department[1];
 * set lDepartment.ast := rDepartment;
 * set rDepartment.name := name;
 *
 */
protected boolean MAP_m_Department_name_e(final /*@NonInvalid*/ @NonNull department lDepartment)  {
	try {
		final /*@Thrown*/ @Nullable String name = lDepartment.getName();
		// creations
		final @SuppressWarnings("null")@NonNull Department rDepartment = CompanyFactory.eINSTANCE.createDepartment();
		models[1/*rightAS*/].add(rDepartment, false);
		// mapping statements
		lDepartment.setAst(rDepartment);
		if (name == null) {
			throw throwNull(lDepartment, "Null value for company::Department::name assignment");
		}
		rDepartment.setName(name);
		final /*@Thrown*/ @Nullable Boolean m_Department_name_e = ValueUtil.TRUE_VALUE;
		return m_Department_name_e;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Department_name_e", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:29,代码来源:companies_qvtp_qvtcas.java

示例9: MAP_m_Employee_address_name_salary_e

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 *
 * map m_Employee_address_name_salary_e in companies_qvtp_qvtcas {
 * guard:leftCS lEmployee  : companies::employee[1];
 * var address : String[?] := lEmployee.address;
 * var name : String[?] := lEmployee.name;
 * var salary : ecore::EDouble[?] := lEmployee.salary;
 * new:rightAS rEmployee : company::Employee[1];
 * set lEmployee.ast := rEmployee;
 * set rEmployee.address := address;
 * set rEmployee.name := name;
 * set rEmployee.salary := salary;
 *
 */
protected boolean MAP_m_Employee_address_name_salary_e(final /*@NonInvalid*/ @NonNull employee lEmployee)  {
	try {
		final /*@Thrown*/ @Nullable String address = lEmployee.getAddress();
		final /*@Thrown*/ @Nullable String name = lEmployee.getName();
		final /*@Thrown*/ double salary = lEmployee.getSalary();
		// creations
		final @SuppressWarnings("null")@NonNull Employee rEmployee = CompanyFactory.eINSTANCE.createEmployee();
		models[1/*rightAS*/].add(rEmployee, false);
		// mapping statements
		lEmployee.setAst(rEmployee);
		if (address == null) {
			throw throwNull(lEmployee, "Null value for company::Employee::address assignment");
		}
		rEmployee.setAddress(address);
		if (name == null) {
			throw throwNull(lEmployee, "Null value for company::Employee::name assignment");
		}
		rEmployee.setName(name);
		rEmployee.setSalary(salary);
		final /*@Thrown*/ @Nullable Boolean m_Employee_address_name_salary_e = ValueUtil.TRUE_VALUE;
		return m_Employee_address_name_salary_e;
	} catch (Throwable e) {
		return handleExecutionFailure("MAP_m_Employee_address_name_salary_e", e);
	}
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:40,代码来源:companies_qvtp_qvtcas.java

示例10: MAP_m_Y1_ast_name

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 * 
 * map m_Y1_ast_name in Source2Target_qvtp_qvtcas {
 *   leftCS (lY1 : source::Y1[?];
 *  |)
 * { |}
 * rightAS ( |)
 * { |}
 * where ( |)
 * {aB : target::B[1] = lY1.ast.oclAsType(target::B);
 * ast : ecore::EObject[?] = lY1.ast;
 * name : String[?] = lY1.name;
 *  |
 * aB.name := name;
 * }
 * 
 */
protected boolean MAP_m_Y1_ast_name(final /*@NonInvalid*/ [email protected].NonNull Y1 lY1_0) throws ReflectiveOperationException {
    try {
        // predicates and unrealized variables
        final /*@NonInvalid*/ [email protected] IdResolver idResolver = executor.getIdResolver();
        final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_B_0 = idResolver.getClass(CLSSid_B, null);
        final /*@Thrown*/ [email protected] EObject ast = lY1_0.getAst();
        final /*@Thrown*/ [email protected].NonNull B aB = ClassUtil.nonNullState((B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_target_c_c_B_0));
        final /*@Thrown*/ [email protected] EObject ast_0 = lY1_0.getAst();
        final /*@Thrown*/ [email protected] String name = lY1_0.getName();
        // property assignments
        aB.setName(name);
        boolean m_Y1_ast_name = ValueUtil.TRUE_VALUE;
        return m_Y1_ast_name;
    } catch (Throwable e) {
        return handleExecutionFailure("MAP_m_Y1_ast_name", e);
    }
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:35,代码来源:Source2Target_qvtp_qvtcas.java

示例11: MAP_m_Y1_ast_ownsZ

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 * 
 * map m_Y1_ast_ownsZ in Source2Target_qvtp_qvtcas {
 *   leftCS (lY1 : source::Y1[?];
 *  |)
 * { |}
 * rightAS ( |)
 * { |}
 * where ( |)
 * {aB : target::B[1] = lY1.ast.oclAsType(target::B)
 *   ;
 * ast : ecore::EObject[?] = lY1.ast;
 * ownsZ : source::Z[?] = lY1.ownsZ;
 * aD : target::D[1] = ownsZ.ast.oclAsType(target::D);
 * ast1 : ecore::EObject[?] = ownsZ.ast;
 *  |
 * aB.ownsD := aD;
 * }
 * 
 */
protected boolean MAP_m_Y1_ast_ownsZ(final /*@NonInvalid*/ [email protected].NonNull Y1 lY1_1) throws ReflectiveOperationException {
    try {
        // predicates and unrealized variables
        final /*@NonInvalid*/ [email protected] IdResolver idResolver = executor.getIdResolver();
        final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_B_0 = idResolver.getClass(CLSSid_B, null);
        final /*@Thrown*/ [email protected] EObject ast = lY1_1.getAst();
        final /*@Thrown*/ [email protected].NonNull B aB = ClassUtil.nonNullState((B)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_target_c_c_B_0));
        final /*@Thrown*/ [email protected] EObject ast_0 = lY1_1.getAst();
        final /*@Thrown*/ [email protected].Nullable Z ownsZ = lY1_1.getOwnsZ();
        final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_D_0 = idResolver.getClass(CLSSid_D, null);
        if (ownsZ == null) {
            throw throwNull(lY1_1, "Null source for \'\'http://uk.ac.york.cs.asbh.lang.cs2as/sourceMM/1.0\'::SElement::ast\'");
        }
        final /*@Thrown*/ [email protected] EObject ast_1 = ownsZ.getAst();
        final /*@Thrown*/ [email protected].NonNull D aD = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_1, TYP_target_c_c_D_0));
        final /*@Thrown*/ [email protected] EObject ast1 = ownsZ.getAst();
        // property assignments
        aB.setOwnsD(aD);
        boolean m_Y1_ast_ownsZ = ValueUtil.TRUE_VALUE;
        return m_Y1_ast_ownsZ;
    } catch (Throwable e) {
        return handleExecutionFailure("MAP_m_Y1_ast_ownsZ", e);
    }
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:45,代码来源:Source2Target_qvtp_qvtcas.java

示例12: MAP_m_Y2_ast_name

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 * 
 * map m_Y2_ast_name in Source2Target_qvtp_qvtcas {
 *   leftCS (lY2 : source::Y2[?];
 *  |)
 * { |}
 * rightAS ( |)
 * { |}
 * where ( |)
 * {aC : target::C[1] = lY2.ast.oclAsType(target::C);
 * ast : ecore::EObject[?] = lY2.ast;
 * name : String[?] = lY2.name;
 *  |
 * aC.name := name;
 * }
 * 
 */
protected boolean MAP_m_Y2_ast_name(final /*@NonInvalid*/ [email protected].NonNull Y2 lY2_0) throws ReflectiveOperationException {
    try {
        // predicates and unrealized variables
        final /*@NonInvalid*/ [email protected] IdResolver idResolver = executor.getIdResolver();
        final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_C_0 = idResolver.getClass(CLSSid_C, null);
        final /*@Thrown*/ [email protected] EObject ast = lY2_0.getAst();
        final /*@Thrown*/ [email protected].NonNull C aC = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_target_c_c_C_0));
        final /*@Thrown*/ [email protected] EObject ast_0 = lY2_0.getAst();
        final /*@Thrown*/ [email protected] String name = lY2_0.getName();
        // property assignments
        aC.setName(name);
        boolean m_Y2_ast_name = ValueUtil.TRUE_VALUE;
        return m_Y2_ast_name;
    } catch (Throwable e) {
        return handleExecutionFailure("MAP_m_Y2_ast_name", e);
    }
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:35,代码来源:Source2Target_qvtp_qvtcas.java

示例13: MAP_m_Y2_ast_ownsZ

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 * 
 * map m_Y2_ast_ownsZ in Source2Target_qvtp_qvtcas {
 *   leftCS (lY2 : source::Y2[?];
 *  |)
 * { |}
 * rightAS ( |)
 * { |}
 * where ( |)
 * {aC : target::C[1] = lY2.ast.oclAsType(target::C)
 *   ;
 * ast : ecore::EObject[?] = lY2.ast;
 * ownsZ : source::Z[?] = lY2.ownsZ;
 * aD : target::D[1] = ownsZ.ast.oclAsType(target::D);
 * ast1 : ecore::EObject[?] = ownsZ.ast;
 *  |
 * aC.ownsD := aD;
 * }
 * 
 */
protected boolean MAP_m_Y2_ast_ownsZ(final /*@NonInvalid*/ [email protected].NonNull Y2 lY2_1) throws ReflectiveOperationException {
    try {
        // predicates and unrealized variables
        final /*@NonInvalid*/ [email protected] IdResolver idResolver = executor.getIdResolver();
        final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_C_0 = idResolver.getClass(CLSSid_C, null);
        final /*@Thrown*/ [email protected] EObject ast = lY2_1.getAst();
        final /*@Thrown*/ [email protected].NonNull C aC = ClassUtil.nonNullState((C)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast, TYP_target_c_c_C_0));
        final /*@Thrown*/ [email protected] EObject ast_0 = lY2_1.getAst();
        final /*@Thrown*/ [email protected].Nullable Z ownsZ = lY2_1.getOwnsZ();
        final /*@NonInvalid*/ [email protected] Class TYP_target_c_c_D_0 = idResolver.getClass(CLSSid_D, null);
        if (ownsZ == null) {
            throw throwNull(lY2_1, "Null source for \'\'http://uk.ac.york.cs.asbh.lang.cs2as/sourceMM/1.0\'::SElement::ast\'");
        }
        final /*@Thrown*/ [email protected] EObject ast_1 = ownsZ.getAst();
        final /*@Thrown*/ [email protected].NonNull D aD = ClassUtil.nonNullState((D)OclAnyOclAsTypeOperation.INSTANCE.evaluate(executor, ast_1, TYP_target_c_c_D_0));
        final /*@Thrown*/ [email protected] EObject ast1 = ownsZ.getAst();
        // property assignments
        aC.setOwnsD(aD);
        boolean m_Y2_ast_ownsZ = ValueUtil.TRUE_VALUE;
        return m_Y2_ast_ownsZ;
    } catch (Throwable e) {
        return handleExecutionFailure("MAP_m_Y2_ast_ownsZ", e);
    }
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:45,代码来源:Source2Target_qvtp_qvtcas.java

示例14: SourceMustBeSoftwareComponent

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean SourceMustBeSoftwareComponent(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
	/**
	 * inv SourceMustBeSoftwareComponent: true
	 */
	return ValueUtil.TRUE_VALUE;
}
 
开发者ID:occiware,项目名称:TOSCA-Studio,代码行数:12,代码来源:Tosca_nodes_computeImpl.java

示例15: appliesConstraint

import org.eclipse.ocl.pivot.utilities.ValueUtil; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
	/**
	 *
	 * inv appliesConstraint:
	 *   let
	 *     severity : Integer[1] = 'Tosca_nodes_compute::appliesConstraint'.getSeverity()
	 *   in
	 *     if severity <= 0
	 *     then true
	 *     else
	 *       let
	 *         result : occi::Boolean[1] = self.entity.oclIsKindOf(infrastructure::Compute)
	 *       in
	 *         'Tosca_nodes_compute::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
	 *     endif
	 */
	final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
	final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
	final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, ToscaTables.STR_Tosca_nodes_compute_c_c_appliesConstraint);
	final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, ToscaTables.INT_0).booleanValue();
	/*@NonInvalid*/ boolean symbol_0;
	if (le) {
		symbol_0 = ValueUtil.TRUE_VALUE;
	}
	else {
		final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Compute = idResolver.getClass(ToscaTables.CLSSid_Compute, null);
		final /*@NonInvalid*/ Entity entity = this.getEntity();
		final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_infrastructure_c_c_Compute).booleanValue();
		final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, ToscaTables.STR_Tosca_nodes_compute_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, ToscaTables.INT_0).booleanValue();
		symbol_0 = logDiagnostic;
	}
	return Boolean.TRUE == symbol_0;
}
 
开发者ID:occiware,项目名称:TOSCA-Studio,代码行数:39,代码来源:Tosca_nodes_computeImpl.java


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