Tabnine Logo
LinkedKeyBinding.getLinkedKey
Code IndexAdd Tabnine to your IDE (free)

How to use
getLinkedKey
method
in
com.google.inject.spi.LinkedKeyBinding

Best Java code snippets using com.google.inject.spi.LinkedKeyBinding.getLinkedKey (Showing top 20 results out of 315)

origin: com.google.inject/guice

@Override
public Indexer.IndexedBinding visit(LinkedKeyBinding<? extends Object> binding) {
 return new Indexer.IndexedBinding(
   binding, BindingType.LINKED_KEY, scope(binding), binding.getLinkedKey());
}
origin: com.google.inject/guice

@Override
public Boolean visit(LinkedKeyBinding<? extends T> binding) {
 prepareBinding();
 Key<? extends T> linkedKey = binding.getLinkedKey();
 if (key.equals(linkedKey)) {
  errors.recursiveBinding();
 }
 FactoryProxy<T> factory = new FactoryProxy<>(injector, key, linkedKey, source);
 bindingData.addCreationListener(factory);
 InternalFactory<? extends T> scopedFactory =
   Scoping.scope(key, injector, factory, source, scoping);
 putBinding(
   new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scoping, linkedKey));
 return true;
}
origin: com.google.inject.extensions/guice-grapher

@Override
public Collection<Key<?>> visit(LinkedKeyBinding<?> binding) {
 return ImmutableSet.<Key<?>>of(binding.getLinkedKey());
}
origin: com.netflix.governator/governator-test

@Override
public Void visit(LinkedKeyBinding<? extends T> binding) {
  builder.to(binding.getLinkedKey()).in(Scopes.SINGLETON);
  return null;
}
origin: com.atlassian.org.eclipse.sisu/org.eclipse.sisu.inject

@Override
public Class<?> visit( final LinkedKeyBinding<?> binding )
{
  // this assumes only one level of indirection: api-->impl
  return binding.getLinkedKey().getTypeLiteral().getRawType();
}
origin: ArcBees/Jukito

@Override
public Void visit(LinkedKeyBinding<? extends T> linkedKeyBinding) {
  return addBindingKey(linkedKeyBinding, linkedKeyBinding.getLinkedKey());
}
origin: org.jukito/jukito

@Override
public Void visit(LinkedKeyBinding<? extends T> linkedKeyBinding) {
  return addBindingKey(linkedKeyBinding, linkedKeyBinding.getLinkedKey());
}
origin: org.sonatype.sisu/sisu-guice

@Override
public Indexer.IndexedBinding visit(LinkedKeyBinding<? extends Object> binding) {
 return new Indexer.IndexedBinding(
   binding, BindingType.LINKED_KEY, scope(binding), binding.getLinkedKey());
}
origin: com.jwebmp.inject/guice

@Override
public Indexer.IndexedBinding visit(LinkedKeyBinding<? extends Object> binding) {
 return new Indexer.IndexedBinding(
   binding, BindingType.LINKED_KEY, scope(binding), binding.getLinkedKey());
}
origin: org.xbib/guice

@Override
public IndexedBinding visit(LinkedKeyBinding<? extends Object> binding) {
  return new IndexedBinding(binding, BindingType.LINKED_KEY, scope(binding),
      binding.getLinkedKey());
}
origin: io.github.gwtplus.gin/gin

public Void visit(LinkedKeyBinding<? extends T> linkedKeyBinding) {
 Context context = Context.forElement(linkedKeyBinding);
 bindingsCollection.addBinding(targetKey,
   bindingFactory.getBindClassBinding(linkedKeyBinding.getLinkedKey(), targetKey, context));
 return null;
}
origin: com.atlassian.org.eclipse.sisu/org.eclipse.sisu.inject

@Override
public Boolean visit( final LinkedKeyBinding<?> binding )
{
  final Key<?> linkedKey = binding.getLinkedKey();
  if ( linkedKey.getAnnotationType() == null )
  {
    return analyzeImplementation( linkedKey.getTypeLiteral(), true );
  }
  return Boolean.TRUE; // indirect binding, don't scan
}
origin: com.google.inject.extensions/guice-grapher

/**
 * Visitor for {@link LinkedKeyBinding}. This is the standard {@link Binding} you get from
 * binding an interface class to an implementation class. We draw a {@link BindingEdge} from the
 * interface node to the node of the implementing class.
 */
@Override
public Collection<Edge> visit(LinkedKeyBinding<?> binding) {
 return ImmutableList.<Edge>of(
   new BindingEdge(
     NodeId.newTypeId(binding.getKey()),
     NodeId.newTypeId(binding.getLinkedKey()),
     BindingEdge.Type.NORMAL));
}
origin: com.atlassian.org.eclipse.sisu/org.eclipse.sisu.inject

@Override
public Boolean visit( final LinkedKeyBinding<?> binding )
{
  final Key<?> linkedKey = binding.getLinkedKey();
  if ( linkedKey.getAnnotationType() == null )
  {
    return verifyImplementation( linkedKey.getTypeLiteral() );
  }
  return Boolean.TRUE; // indirect binding, don't scan
}
origin: Nextdoor/bender

public Boolean visit(LinkedKeyBinding<? extends T> binding) {
 prepareBinding();
 Key<? extends T> linkedKey = binding.getLinkedKey();
 if (key.equals(linkedKey)) {
  errors.recursiveBinding();
 }
 FactoryProxy<T> factory = new FactoryProxy<T>(injector, key, linkedKey, source);
 bindingData.addCreationListener(factory);
 InternalFactory<? extends T> scopedFactory
   = Scoping.scope(key, injector, factory, source, scoping);
 putBinding(
   new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scoping, linkedKey));
 return true;
}
origin: com.google/inject

public Boolean visit(LinkedKeyBinding<? extends T> binding) {
 prepareBinding();
 Key<? extends T> linkedKey = binding.getLinkedKey();
 if (key.equals(linkedKey)) {
  errors.recursiveBinding();
 }
 FactoryProxy<T> factory = new FactoryProxy<T>(injector, key, linkedKey, source);
 bindingData.addCreationListener(factory);
 InternalFactory<? extends T> scopedFactory
   = Scoping.scope(key, injector, factory, source, scoping);
 putBinding(
   new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scoping, linkedKey));
 return true;
}
origin: at.bestsolution.efxclipse.eclipse/com.google.inject

public Boolean visit(LinkedKeyBinding<? extends T> binding) {
 prepareBinding();
 Key<? extends T> linkedKey = binding.getLinkedKey();
 if (key.equals(linkedKey)) {
  errors.recursiveBinding();
 }
 FactoryProxy<T> factory = new FactoryProxy<T>(injector, key, linkedKey, source);
 bindingData.addCreationListener(factory);
 InternalFactory<? extends T> scopedFactory
   = Scoping.scope(key, injector, factory, source, scoping);
 putBinding(
   new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scoping, linkedKey));
 return true;
}
origin: com.jwebmp.inject/guice

@Override
public Boolean visit(LinkedKeyBinding<? extends T> binding) {
 prepareBinding();
 Key<? extends T> linkedKey = binding.getLinkedKey();
 if (key.equals(linkedKey)) {
  errors.recursiveBinding();
 }
 FactoryProxy<T> factory = new FactoryProxy<>(injector, key, linkedKey, source);
 bindingData.addCreationListener(factory);
 InternalFactory<? extends T> scopedFactory =
   Scoping.scope(key, injector, factory, source, scoping);
 putBinding(
   new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scoping, linkedKey));
 return true;
}
origin: org.sonatype.sisu/sisu-guice

@Override
public Boolean visit(LinkedKeyBinding<? extends T> binding) {
 prepareBinding();
 Key<? extends T> linkedKey = binding.getLinkedKey();
 if (key.equals(linkedKey)) {
  errors.recursiveBinding();
 }
 FactoryProxy<T> factory = new FactoryProxy<>(injector, key, linkedKey, source);
 bindingData.addCreationListener(factory);
 InternalFactory<? extends T> scopedFactory =
   Scoping.scope(key, injector, factory, source, scoping);
 putBinding(
   new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scoping, linkedKey));
 return true;
}
origin: org.xbib/guice

@Override
public Boolean visit(LinkedKeyBinding<? extends T> binding) {
  prepareBinding();
  Key<? extends T> linkedKey = binding.getLinkedKey();
  if (key.equals(linkedKey)) {
    errors.recursiveBinding();
  }
  FactoryProxy<T> factory = new FactoryProxy<T>(injector, key, linkedKey, source);
  bindingData.addCreationListener(factory);
  InternalFactory<? extends T> scopedFactory
      = Scoping.scope(key, injector, factory, source, scoping);
  putBinding(
      new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scoping, linkedKey));
  return true;
}
com.google.inject.spiLinkedKeyBindinggetLinkedKey

Javadoc

Returns the linked key used to resolve injections. That binding can be retrieved from an injector using com.google.inject.Injector#getBinding(Key).

Popular methods of LinkedKeyBinding

  • getKey

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now