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


Java OCL.dispose方法代码示例

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


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

示例1: checkConstraint

import org.eclipse.ocl.pivot.utilities.OCL; //导入方法依赖的package包/类
public boolean checkConstraint(EObject modelObj, String oclConstraint) {

		OCL ocl = OCL.newInstance();

		try {
			OCLHelper helper = ocl.createOCLHelper(modelObj.eClass());
			ExpressionInOCL expression = helper.createInvariant(oclConstraint);
			return ocl.check(modelObj, expression);
		}
		catch (Exception e) {
			MMINTException.print(IStatus.WARNING, "Error in OCL constraint \"" + oclConstraint + "\" applied to model object " + modelObj + ", evaluating to false", e);
			return false;
		}
		finally {
			ocl.dispose();
		}
	}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:18,代码来源:OCLReasoningEngine.java

示例2: createTypeDependencyGraph

import org.eclipse.ocl.pivot.utilities.OCL; //导入方法依赖的package包/类
public static IGraph<Type> createTypeDependencyGraph(URI cs2asDocURI) {
		
	OCL ocl = getOCL();
	Resource cs2asResource = ocl.parse(cs2asDocURI);
	TypeDependencyGraphComputer inputTypeGraphComp = new TypeDependencyGraphComputer(ocl);
	IGraph<Type> graph =  inputTypeGraphComp.computeDependencyGraph(cs2asResource);
	ocl.dispose();
	return graph;
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:10,代码来源:DependencyAnalysis.java

示例3: createFeatureDependencyGraph

import org.eclipse.ocl.pivot.utilities.OCL; //导入方法依赖的package包/类
public static IGraph<FeatureObj> createFeatureDependencyGraph(URI cs2asDocURI) {
	
	OCL ocl = getOCL();		
	Resource cs2asResource = ocl.parse(cs2asDocURI);		
	FeatureDependencyGraphComputer featGraphComp = new FeatureDependencyGraphComputer(ocl);
	IGraph<FeatureObj> graph = featGraphComp.computeDependencyGraph(cs2asResource);
	ocl.dispose();
	return graph;
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:10,代码来源:DependencyAnalysis.java

示例4: createCS2ASAnalysisGraph

import org.eclipse.ocl.pivot.utilities.OCL; //导入方法依赖的package包/类
public static Graph createCS2ASAnalysisGraph(URI cs2asDocURI) {
	
	OCL ocl = getOCL();		
	Resource cs2asResource = ocl.parse(cs2asDocURI);
	CS2ASAnalysisGraphComputer cs2asAnalysisGraphComp = new CS2ASAnalysisGraphComputer(ocl);
	Graph graph = cs2asAnalysisGraphComp.computeDependencyGraph(cs2asResource);
	ocl.dispose();
	return graph;
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:10,代码来源:DependencyAnalysis.java


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