本文整理汇总了Java中org.eclipse.ocl.Environment类的典型用法代码示例。如果您正苦于以下问题:Java Environment类的具体用法?Java Environment怎么用?Java Environment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Environment类属于org.eclipse.ocl包,在下文中一共展示了Environment类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initCustomEnv
import org.eclipse.ocl.Environment; //导入依赖的package包/类
/**
* @generated
*/
private static void initCustomEnv(Environment ecoreEnv, Map environment) {
for (Iterator it = environment.keySet().iterator(); it.hasNext();) {
String varName = (String) it.next();
EClassifier varType = (EClassifier) environment.get(varName);
ecoreEnv.addElement(varName, createVar(ecoreEnv, varName,
varType), false);
}
}
示例2: createVar
import org.eclipse.ocl.Environment; //导入依赖的package包/类
/**
* @generated
*/
private static Variable createVar(Environment ecoreEnv, String name,
EClassifier type) {
Variable var = EcoreFactory.eINSTANCE.createVariable();
var.setName(name);
var.setType(ecoreEnv.getUMLReflection().getOCLType(type));
return var;
}
示例3: initCustomEnv
import org.eclipse.ocl.Environment; //导入依赖的package包/类
/**
* @generated
*/
private static void initCustomEnv(
Environment<?, EClassifier, ?, ?, ?, EParameter, ?, ?, ?, ?, ?, ?> ecoreEnv,
Map<String, EClassifier> environment) {
// Use EObject as implicit root class for any object, to allow eContainer() and other EObject operations from OCL expressions
ParsingOptions
.setOption(ecoreEnv, ParsingOptions.implicitRootClass(ecoreEnv), EcorePackage.eINSTANCE.getEObject());
for (String varName : environment.keySet()) {
EClassifier varType = environment.get(varName);
ecoreEnv.addElement(varName, createVar(ecoreEnv, varName, varType), false);
}
}
示例4: createVar
import org.eclipse.ocl.Environment; //导入依赖的package包/类
/**
* @generated
*/
private static Variable createVar(
Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?> ecoreEnv, String name, EClassifier type) {
Variable var = EcoreFactory.eINSTANCE.createVariable();
var.setName(name);
var.setType(ecoreEnv.getUMLReflection().getOCLType(type));
return var;
}
示例5: initCustomEnv
import org.eclipse.ocl.Environment; //导入依赖的package包/类
/**
* @generated
*/
private static void initCustomEnv(Environment<?, EClassifier, ?, ?, ?, EParameter, ?, ?, ?, ?, ?, ?> ecoreEnv,
Map<String, EClassifier> environment) {
// Use EObject as implicit root class for any object, to allow eContainer() and other EObject operations from OCL expressions
ParsingOptions.setOption(ecoreEnv, ParsingOptions.implicitRootClass(ecoreEnv),
EcorePackage.eINSTANCE.getEObject());
for (String varName : environment.keySet()) {
EClassifier varType = environment.get(varName);
ecoreEnv.addElement(varName, createVar(ecoreEnv, varName, varType), false);
}
}
示例6: createVar
import org.eclipse.ocl.Environment; //导入依赖的package包/类
/**
* @generated
*/
private static Variable createVar(Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?> ecoreEnv,
String name, EClassifier type) {
Variable var = EcoreFactory.eINSTANCE.createVariable();
var.setName(name);
var.setType(ecoreEnv.getUMLReflection().getOCLType(type));
return var;
}
示例7: getInstance
import org.eclipse.ocl.Environment; //导入依赖的package包/类
public static OclToEcl getInstance(ILogger logger) {
Environment<EPackage, EClassifier, EOperation, EStructuralFeature, EEnumLiteral, EParameter, EObject, CallOperationAction, SendSignalAction, Constraint, EClass, EObject> auxEnv = EcoreEnvironmentFactory.INSTANCE.createEnvironment();
return new OclToEcl(auxEnv, logger);
}
示例8: OclToEcl
import org.eclipse.ocl.Environment; //导入依赖的package包/类
protected OclToEcl(Environment<?, EClassifier, EOperation, EStructuralFeature, EEnumLiteral, EParameter, EObject, CallOperationAction, SendSignalAction, Constraint, ?, ?> env, ILogger logger) {
this.env = env;
uml = (env == null) ? null : env.getUMLReflection();
this.logger = logger;
}