001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.commons.jcs.jcache.cdi; 020 021import javax.cache.annotation.CacheInvocationParameter; 022import java.lang.annotation.Annotation; 023import java.util.Set; 024 025public class CacheInvocationParameterImpl implements CacheInvocationParameter 026{ 027 private final Class<?> type; 028 private final Object value; 029 private final Set<Annotation> annotations; 030 private final int position; 031 032 public CacheInvocationParameterImpl(final Class<?> type, final Object value, final Set<Annotation> annotations, final int position) 033 { 034 this.type = type; 035 this.value = value; 036 this.annotations = annotations; 037 this.position = position; 038 } 039 040 @Override 041 public Class<?> getRawType() 042 { 043 return type; 044 } 045 046 @Override 047 public Object getValue() 048 { 049 return value; 050 } 051 052 @Override 053 public Set<Annotation> getAnnotations() 054 { 055 return annotations; 056 } 057 058 @Override 059 public int getParameterPosition() 060 { 061 return position; 062 } 063}