All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.jcache.annotation.CacheInvocationParameterImpl Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.jcache.annotation;

import javax.cache.annotation.CacheInvocationParameter;
import java.lang.annotation.Annotation;
import java.util.Set;

/**
 * The {@link javax.cache.annotation.CacheInvocationParameter} implementation.
 *
 * @author Kevin Pollet  (C) 2011 SERLI
 * @author Galder Zamarreño
 */
public class CacheInvocationParameterImpl implements CacheInvocationParameter {

   private final ParameterMetaData parameterMetaData;
   private final Object parameterValue;

   public CacheInvocationParameterImpl(ParameterMetaData parameterMetaData, Object parameterValue) {
      this.parameterMetaData = parameterMetaData;
      this.parameterValue = parameterValue;
   }

   @Override
   public Class getRawType() {
      return parameterMetaData.getRawType();
   }

   @Override
   public Object getValue() {
      return parameterValue;
   }

   @Override
   public Set getAnnotations() {
      return parameterMetaData.getAnnotations();
   }

   @Override
   public int getParameterPosition() {
      return parameterMetaData.getPosition();
   }

   @Override
   public String toString() {
      return new StringBuilder()
            .append("CacheInvocationParameterImpl{")
            .append("parameterMetaData=").append(parameterMetaData)
            .append(", parameterValue=").append(parameterValue)
            .append('}')
            .toString();
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy