Sets the path to have it's value injected from the provider state
@param expression Expression to be evaluated from the provider state
@param example Example value to use in the consumer test
197770
public PactDslRequestWithPath pathFromProviderState(String expression, String example) {
    requestGenerators.addGenerator(Category.PATH, new ProviderStateGenerator(expression));
    return new PactDslRequestWithPath(consumerPactBuilder, consumerName, providerName, pactDslWithState.state,
      description, example, requestMethod, requestHeaders, query, requestBody, requestMatchers, requestGenerators,
      defaultRequestValues, defaultResponseValues);
  }
1148754
public T jsonPath(String expression, String value) {
        if (jsonPathMessageConstructionInterceptor == null) {
            jsonPathMessageConstructionInterceptor = new JsonPathMessageConstructionInterceptor();

            if (getAction().getMessageBuilder() != null) {
                (getAction().getMessageBuilder()).add(jsonPathMessageConstructionInterceptor);
            } else {
                PayloadTemplateMessageBuilder messageBuilder = new PayloadTemplateMessageBuilder();
                messageBuilder.getMessageInterceptors().add(jsonPathMessageConstructionInterceptor);

                getAction().setMessageBuilder(messageBuilder);
            }
        }

        jsonPathMessageConstructionInterceptor.getJsonPathExpressions().put(expression, value);
        return self;
    }
808790
public static boolean isFalse(Expression expression) {
        if (expression == null) {
            return false;
        }
        if (expression instanceof PropertyExpression && classNodeImplementsType(((PropertyExpression) expression).getObjectExpression().getType(), Boolean.class)) {
            if (((PropertyExpression) expression).getProperty() instanceof ConstantExpression
                    && "FALSE".equals(((ConstantExpression) ((PropertyExpression) expression).getProperty()).getValue())) {
                return true;
            }
        }
        return ((expression instanceof ConstantExpression) && ((ConstantExpression) expression).isFalseExpression())
                || "Boolean.FALSE".equals(expression.getText());
    }
140455
public void visitConstantExpression(ConstantExpression expression) {
        final String constantName = expression.getConstantName();
        if (controller.isStaticConstructor() || constantName == null) {
            controller.getOperandStack().pushConstant(expression);
        } else {
            controller.getMethodVisitor().visitFieldInsn(GETSTATIC, controller.getInternalClassName(),constantName, BytecodeHelper.getTypeDescription(expression.getType()));
            controller.getOperandStack().push(expression.getType());
        }
    }
624745
public static <E, Q extends SimpleExpression<? super E>> SetPath<E, Q> setPath(Class<E> type, Class<Q> queryType, PathMetadata metadata) {
        return new SetPath<E, Q>(type, queryType, metadata);
    }
1042772
public static Object evaluateValueExpression(String expression, Object target) {
		
		// Executeur des methodes sur le contexte
		DAOValidatorMethodExpressionExecutor methodExecutor = new DAOValidatorMethodExpressionExecutor();
		
		// Resolver
		DAOValidatorBeanELResolver resolver = new DAOValidatorBeanELResolver(null);
		
		// Contexte d'evaluation
		DAOValidatorELContext context = new DAOValidatorELContext();

		// Fabrique d'expression
		ExpressionFactoryImpl expressionFactory = new ExpressionFactoryImpl();
		
		// Si l'expression est nulle
		if(expression == null || expression.trim().length() == 0) return null;
		
		// Si l'objet cible est null
		if(target == null) return null;
		
		// Expression Locale
		String localExpression = expression;
		
		// Nom de la fonction
		String functionName = null;

		// Objet resultat
		Object result = null;
		
		// Si l'expression contient une fonction
		if(DAOValidatorHelper.isExpressionContainPattern(expression, DAOValidatorHelper.FUNC_CHAIN_PATTERN)) {
			
			// Resultat de l'evaluation des parametres
			Object parameterEvaluation = null;
			
			// Obtention du Nom de la fonction
			functionName = DAOValidatorHelper.extractFunctionName(expression);
			
			// On extrait le parametre
			String functionParameter = DAOValidatorHelper.extractParameter(expression);
			
			// Si le parametre est une fonction
			if(DAOValidatorHelper.isExpressionContainPattern(functionParameter, DAOValidatorHelper.FUNC_CHAIN_PATTERN)) {
				
				// Appel recursif
				parameterEvaluation = evaluateValueExpression(functionParameter, target);
				
			} else if(DAOValidatorHelper.isExpressionContainPattern(functionParameter, DAOValidatorHelper.ENV_CHAIN_PATTERN)) {
				
				// Appel recursif
				parameterEvaluation = evaluateValueExpression(functionParameter, target);
				
			} else if(functionParameter != null && functionParameter.equals("$$")) {
				
				// Appel recursif
				parameterEvaluation = target;
				
			}
			
			// Si l'executeur de fonction possede cette fonction
			if(methodExecutor.getMethodsName().contains(functionName)) {
				
				// Si la chaene parametre est vide
				if(functionParameter == null || functionParameter.trim().length() == 0) result = methodExecutor.invoke(functionName);
				
				// On evalue la fonction
				result = methodExecutor.invoke(functionName, parameterEvaluation);
				
			} else {
				
				// On recupere le parametre
				result = parameterEvaluation;
				
			}
			
		} else if(DAOValidatorHelper.isExpressionContainPattern(expression, DAOValidatorHelper.ENV_CHAIN_PATTERN)) {
			
			// Initialisation de la cible dans le resolver
			resolver.setBase(target);
			
			// Initialisation du resolver dans le contexte
			context.setELResolver(resolver);
			
			// Instanciation d'une expression
			ValueExpression ve = expressionFactory.createValueExpression(context, localExpression, Object.class);
			
			// On calcule le resultat
			result = ve.getValue(context);
			
		}
		
		// On retourne le resultat de l'evalo
		return result;
	}
521765
public static MethodCallExpression buildSetPropertyExpression(final Expression objectExpression, final String propertyName, final ClassNode targetClassNode, final Expression valueExpression) {
        String methodName = "set" + MetaClassHelper.capitalize(propertyName);
        MethodCallExpression methodCallExpression = new MethodCallExpression(objectExpression, methodName, new ArgumentListExpression(valueExpression));
        MethodNode setterMethod = targetClassNode.getSetterMethod(methodName);
        if(setterMethod != null) {
            methodCallExpression.setMethodTarget(setterMethod);
        }
        return methodCallExpression;
    }
1042412
private Expression transformInlineConstants(Expression exp) {
        if (exp instanceof PropertyExpression) {
            PropertyExpression pe = (PropertyExpression) exp;
            if (pe.getObjectExpression() instanceof ClassExpression) {
                ClassExpression ce = (ClassExpression) pe.getObjectExpression();
                ClassNode type = ce.getType();
                if (type.isEnum())
                    return exp;

                FieldNode fn = type.getField(pe.getPropertyAsString());
                if (fn != null && !fn.isEnum() && fn.isStatic() && fn.isFinal()) {
                    if (fn.getInitialValueExpression() instanceof ConstantExpression) {
                        return fn.getInitialValueExpression();
                    }
                }
            }
        } else if (exp instanceof ListExpression) {
            ListExpression le = (ListExpression) exp;
            ListExpression result = new ListExpression();
            for (Expression e : le.getExpressions()) {
                result.addExpression(transformInlineConstants(e));
            }
            return result;
        } else if (exp instanceof AnnotationConstantExpression) {
            ConstantExpression ce = (ConstantExpression) exp;
            if (ce.getValue() instanceof AnnotationNode) {
                // replicate a little bit of AnnotationVisitor here
                // because we can't wait until later to do this
                AnnotationNode an = (AnnotationNode) ce.getValue();
                for (Map.Entry<String, Expression> member : an.getMembers().entrySet()) {
                    member.setValue(transformInlineConstants(member.getValue()));
                }

            }
        }
        return exp;
    }
1053938
@Nonnull
  public CSSDeclaration setExpression (@Nonnull final CSSExpression aExpression)
  {
    m_aExpression = ValueEnforcer.notNull (aExpression, "Expression");
    return this;
  }
1190318
public static boolean isConstantOrLiteral(Expression expression) {
        if (expression instanceof ConstantExpression) return true;
        if (expression instanceof ListExpression) return true;
        if (expression instanceof MapExpression) return true;
        return isPredefinedConstant(expression);
    }
771342
public Expression create(String expression, ExpressionType expressionType, PropertyResolver propertyResolver) {
        if (expressionType == null) {
            expressionType = ExpressionType.MVEL;
        }
        if (propertyResolver == null) {
            propertyResolver = SystemAndTestPropertyResolver.INSTANCE;
        }
        switch (expressionType) {
        case MVEL:
            return new MVELExpression(expression, propertyResolver);
        default:
            throw CommonKnowledgeMessages.MESSAGES.unknownExpressionType(expressionType.toString());
        }
    }
244356
public PactDslJsonArray valueFromProviderState(String expression, Object example) {
    generators.addGenerator(Category.BODY, rootPath + appendArrayIndex(0), new ProviderStateGenerator(expression));
    body.put(example);
    return this;
  }
1278699
@Nonnull
  public static Value evalExpression(@Nonnull final String expression, @Nonnull final PreprocessorContext context) {
    try {
      final ExpressionTree tree = ExpressionParser.getInstance().parse(expression, context);
      return evalTree(tree, context);
    } catch (IOException unexpected) {
      throw context.makeException("[Expression]Wrong expression format detected [" + expression + ']', unexpected);
    }
  }
1372054
@Override
  public void setFilter(@NonNull Expression expression) {
    layerFilter = expression;
    layer.setFilter(layerFilter);
  }
666013
public ValueExpression setVariable(String name, ValueExpression expression) {
		if (variables == null) {
			variables = new Variables();
		}
		return variables.setVariable(name, expression);
	}
129481
protected String putExpressionAttributeValue(AttributeValue expressionAttributeValue) {
        String expressionAttributeValueKey = getExpressionAttributeValuePrefix() + expressionAttributeValueCounter++;

        expressionAttributeValues.put(expressionAttributeValueKey, expressionAttributeValue);

        return expressionAttributeValueKey;
    }
977222
public Put withExpressionAttributeValues(java.util.Map<String, AttributeValue> expressionAttributeValues) {
        setExpressionAttributeValues(expressionAttributeValues);
        return this;
    }