/**
  * Records a descriptor for the given repository role+hint.
  *
  * @see {@link DefaultNexusPluginManager#createPluginInjector}
  */
 private void addRepositoryTypeDescriptor(
     final Class<? extends Repository> role, final String hint) {
   RepositoryType rt = role.getAnnotation(RepositoryType.class);
   descriptors.add(
       new RepositoryTypeDescriptor(
           role, hint, rt.pathPrefix(), rt.repositoryMaxInstanceCount()));
 }
Example #2
0
  @SuppressWarnings("unchecked")
  public void hear(final Component component, final DeferredClass<?> clazz, final Object source) {
    plexusTypeBinder.hear(component, clazz, source);
    if (null != repositoryType) {
      descriptors.add(
          new RepositoryTypeDescriptor(
              (Class<? extends Repository>) component.role(),
              component.hint(),
              repositoryType.pathPrefix(),
              repositoryType.repositoryMaxInstanceCount()));

      repositoryType = null;
    }
  }