001    /*****************************************************************************
002     * Copyright (C) PicoContainer Organization. All rights reserved.            *
003     * ------------------------------------------------------------------------- *
004     * The software in this package is published under the terms of the BSD      *
005     * style license a copy of which has been included with this distribution in *
006     * the LICENSE.txt file.                                                     *
007     *                                                                           *
008     *****************************************************************************/
009    package org.picocontainer.injectors;
010    
011    import java.lang.reflect.Type;
012    
013    public class InjectInto implements Type {
014        private Type intoType;
015        private Object intoKey;
016    
017        public InjectInto(Type intoType, Object intoKey) {
018            this.intoType = intoType;
019            this.intoKey = intoKey;
020        }
021    
022        public Type getIntoType() {
023            return intoType;
024        }
025    
026        // at FactoryInjector implementor's risk
027        public Class getIntoClass() {
028            return (Class) getIntoType();
029        }
030    
031        public Object getIntoKey() {
032            return intoKey;
033        }
034    }