/** * Initializes me with a root environment. * * @param env * my root environment */ protected OCL(Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env) { this(env.getFactory(), env); }
/** * Initializes me with a root environment. * * @param env * my root environment */ protected OCL(Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env) { this(env.getFactory(), env); }
@Override protected OCLFactory createOCLFactory( Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env) { history = env.getFactory().createOCLFactoryWithHistory(env); return history; }
public EvaluationEnvironment<C, O, P, CLS, E> getEvaluationEnvironment() { if (evalEnv == null) { evalEnv = environment.getFactory().createEvaluationEnvironment(); } return evalEnv; }
@Override protected OCLFactory createOCLFactory( Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env) { history = env.getFactory().createOCLFactoryWithHistory(env); return history; }
/** * Copies the initial environment, so that we may change it at will. * * @param env the environment to copy * @return the copy */ private Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> copyEnvironment(Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env) { // don't actually create a "copy", but a child environment that will // delegate unknown variables to the parent. We cannot modify the // parent by this means return env.getFactory().createEnvironment(env); }
public EvaluationEnvironment<C, O, P, CLS, E> getEvaluationEnvironment() { if (evalEnv == null) { evalEnv = environment.getFactory().createEvaluationEnvironment(); } return evalEnv; }
/** * Copies the initial environment, so that we may change it at will. * * @param env the environment to copy * @return the copy */ private Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> copyEnvironment(Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env) { // don't actually create a "copy", but a child environment that will // delegate unknown variables to the parent. We cannot modify the // parent by this means return env.getFactory().createEnvironment(env); }
/** * Obtains an instance of the validation visitor that validates against the * specified environment, which presumably was used in parsing the OCL in * the first place. * * @param environment an OCL environment (must no be <code>null</code>) * * @return a validation visitor instance for the specified environment */ public static <PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> Visitor<Boolean, C, O, P, EL, PM, S, COA, SSA, CT> getInstance( Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> environment) { return environment.getFactory().createValidationVisitor(environment); }
/** * Obtains an instance of the validation visitor that validates against the * specified environment, which presumably was used in parsing the OCL in * the first place. * * @param environment an OCL environment (must no be <code>null</code>) * * @return a validation visitor instance for the specified environment */ public static <PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> Visitor<Boolean, C, O, P, EL, PM, S, COA, SSA, CT> getInstance( Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> environment) { return environment.getFactory().createValidationVisitor(environment); }
/** * Converts the specified OCL text to a list of {@link IToken}s. * * @param text the text to tokenize * @return the corresponding {@link OCLToken}s */ private List<IToken> tokenize(String text) { OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> analyzer = environment.getFactory().createOCLAnalyzer(environment, text); return tokenize(analyzer); }
private void parseVariable( Environment <PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env, String variables) throws ParserException { OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> analyzer = environment.getFactory().createOCLAnalyzer(env, variables); parseVariableDeclaration(env, analyzer); }
private void parseVariable( Environment <PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env, String variables) throws ParserException { OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> analyzer = environment.getFactory().createOCLAnalyzer(env, variables); parseVariableDeclaration(env, analyzer); }
/** * Converts the specified OCL text to a list of {@link IToken}s. * * @param text the text to tokenize * @return the corresponding {@link OCLToken}s */ private List<IToken> tokenize(String text) { OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> analyzer = environment.getFactory().createOCLAnalyzer(environment, text); return tokenize(analyzer); }
public AbstractOCLAnalyzer(AbstractOCLParser parser) { super(parser); Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env = getOCLEnvironment(); this.environmentFactory = env.getFactory(); oclFactory = createOCLFactory(env); uml = env.getUMLReflection(); }
public AbstractOCLAnalyzer(AbstractOCLParser parser) { super(parser); Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> env = getOCLEnvironment(); this.environmentFactory = env.getFactory(); oclFactory = createOCLFactory(env); uml = env.getUMLReflection(); }
/** * returns the ocl syntax helper object * * @return OCLSyntaxHelper */ protected OCLSyntaxHelper createSyntaxHelper() { if (syntaxHelper == null) { syntaxHelper = getEnvironment().getFactory().createOCLSyntaxHelper(getEnvironment()); } return syntaxHelper; }
/** * returns the ocl syntax helper object * * @return OCLSyntaxHelper */ protected OCLSyntaxHelper createSyntaxHelper() { if (syntaxHelper == null) { syntaxHelper = getEnvironment().getFactory().createOCLSyntaxHelper(getEnvironment()); } return syntaxHelper; }
/** * Initializes me with my environment. * * @param ocl the OCL environment */ OCLHelperImpl(OCL<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> ocl) { this.ocl = ocl; uml = ocl.getEnvironment().getUMLReflection(); oclFactory = ocl.getEnvironment().getOCLFactory(); environmentFactory = ocl.getEnvironment().getFactory(); }
/** * Initializes me with my environment. * * @param ocl the OCL environment */ OCLHelperImpl(OCL<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> ocl) { this.ocl = ocl; uml = ocl.getEnvironment().getUMLReflection(); oclFactory = ocl.getEnvironment().getOCLFactory(); environmentFactory = ocl.getEnvironment().getFactory(); }