Codota Logo
CacheEvaluationContext.setVariable
Code IndexAdd Codota to your IDE (free)

How to use
setVariable
method
in
org.springframework.cache.interceptor.CacheEvaluationContext

Best Java code snippets using org.springframework.cache.interceptor.CacheEvaluationContext.setVariable (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-framework

/**
 * Create an {@link EvaluationContext}.
 * @param caches the current caches
 * @param method the method
 * @param args the method arguments
 * @param target the target object
 * @param targetClass the target class
 * @param result the return value (can be {@code null}) or
 * {@link #NO_RESULT} if there is no return at this time
 * @return the evaluation context
 */
public EvaluationContext createEvaluationContext(Collection<? extends Cache> caches,
    Method method, Object[] args, Object target, Class<?> targetClass, Method targetMethod,
    @Nullable Object result, @Nullable BeanFactory beanFactory) {
  CacheExpressionRootObject rootObject = new CacheExpressionRootObject(
      caches, method, args, target, targetClass);
  CacheEvaluationContext evaluationContext = new CacheEvaluationContext(
      rootObject, targetMethod, args, getParameterNameDiscoverer());
  if (result == RESULT_UNAVAILABLE) {
    evaluationContext.addUnavailableVariable(RESULT_VARIABLE);
  }
  else if (result != NO_RESULT) {
    evaluationContext.setVariable(RESULT_VARIABLE, result);
  }
  if (beanFactory != null) {
    evaluationContext.setBeanResolver(new BeanFactoryResolver(beanFactory));
  }
  return evaluationContext;
}
origin: org.springframework/spring-context

/**
 * Create an {@link EvaluationContext}.
 * @param caches the current caches
 * @param method the method
 * @param args the method arguments
 * @param target the target object
 * @param targetClass the target class
 * @param result the return value (can be {@code null}) or
 * {@link #NO_RESULT} if there is no return at this time
 * @return the evaluation context
 */
public EvaluationContext createEvaluationContext(Collection<? extends Cache> caches,
    Method method, Object[] args, Object target, Class<?> targetClass, Method targetMethod,
    @Nullable Object result, @Nullable BeanFactory beanFactory) {
  CacheExpressionRootObject rootObject = new CacheExpressionRootObject(
      caches, method, args, target, targetClass);
  CacheEvaluationContext evaluationContext = new CacheEvaluationContext(
      rootObject, targetMethod, args, getParameterNameDiscoverer());
  if (result == RESULT_UNAVAILABLE) {
    evaluationContext.addUnavailableVariable(RESULT_VARIABLE);
  }
  else if (result != NO_RESULT) {
    evaluationContext.setVariable(RESULT_VARIABLE, result);
  }
  if (beanFactory != null) {
    evaluationContext.setBeanResolver(new BeanFactoryResolver(beanFactory));
  }
  return evaluationContext;
}
origin: apache/servicemix-bundles

/**
 * Create an {@link EvaluationContext}.
 * @param caches the current caches
 * @param method the method
 * @param args the method arguments
 * @param target the target object
 * @param targetClass the target class
 * @param result the return value (can be {@code null}) or
 * {@link #NO_RESULT} if there is no return at this time
 * @return the evaluation context
 */
public EvaluationContext createEvaluationContext(Collection<? extends Cache> caches,
    Method method, Object[] args, Object target, Class<?> targetClass, Method targetMethod,
    @Nullable Object result, @Nullable BeanFactory beanFactory) {
  CacheExpressionRootObject rootObject = new CacheExpressionRootObject(
      caches, method, args, target, targetClass);
  CacheEvaluationContext evaluationContext = new CacheEvaluationContext(
      rootObject, targetMethod, args, getParameterNameDiscoverer());
  if (result == RESULT_UNAVAILABLE) {
    evaluationContext.addUnavailableVariable(RESULT_VARIABLE);
  }
  else if (result != NO_RESULT) {
    evaluationContext.setVariable(RESULT_VARIABLE, result);
  }
  if (beanFactory != null) {
    evaluationContext.setBeanResolver(new BeanFactoryResolver(beanFactory));
  }
  return evaluationContext;
}
org.springframework.cache.interceptorCacheEvaluationContextsetVariable

Popular methods of CacheEvaluationContext

  • <init>
  • addUnavailableVariable
    Add the specified variable name as unavailable for that context. Any expression trying to access thi
  • setBeanResolver

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now