org.sonatype.guice.bean.locators
Class WildcardKey

java.lang.Object
  extended by com.google.inject.Key<Object>
      extended by org.sonatype.guice.bean.locators.WildcardKey

public final class WildcardKey
extends com.google.inject.Key<Object>

Binding Key for implementations that act as "wild-cards", meaning they match against any assignable type.

Since the wild-card type is Object and the associated qualifier may not be unique between implementations, the qualifier is saved and replaced with a unique (per-implementation) pseudo-qualifier. The original qualifier is available from getQualifier().


Constructor Summary
WildcardKey(Class<?> type, Annotation qualifier)
           
 
Method Summary
 Annotation getQualifier()
           
 
Methods inherited from class com.google.inject.Key
equals, get, get, get, get, get, get, get, get, get, getAnnotation, getAnnotationType, getTypeLiteral, hasAttributes, hashCode, ofType, ofType, ofType, toString, withoutAttributes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WildcardKey

public WildcardKey(Class<?> type,
                   Annotation qualifier)
Method Detail

getQualifier

public Annotation getQualifier()
Returns:
Original qualifier associated with the implementation


Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.