| /******************************************************************************* |
| * Copyright (c) 2008, 2014 Stuart McCulloch |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Stuart McCulloch - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.sisu.peaberry; |
| |
| import static java.lang.annotation.ElementType.METHOD; |
| import static java.lang.annotation.ElementType.TYPE; |
| import static java.lang.annotation.RetentionPolicy.RUNTIME; |
| |
| import java.lang.annotation.Retention; |
| import java.lang.annotation.Target; |
| |
| import org.osgi.framework.BundleContext; |
| |
| import com.google.inject.ScopeAnnotation; |
| |
| /** |
| * Apply this to implementation classes when you want only one instance (per |
| * {@link BundleContext}) to be reused for all injections for that binding. |
| * |
| * @author mcculls@gmail.com (Stuart McCulloch) |
| * |
| * @since 1.1 |
| */ |
| @Target({TYPE, METHOD}) |
| @Retention(RUNTIME) |
| @ScopeAnnotation |
| public @interface BundleScoped {} |