Tabnine Logo
CacheEvaluationContext.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.springframework.cache.interceptor.CacheEvaluationContext
constructor

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

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.interceptorCacheEvaluationContext<init>

Popular methods of CacheEvaluationContext

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

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now