Пример #1
0
  @Override
  public void configure(AnnotatedType annotatedType) {
    super.configure(annotatedType);

    for (int i = 0; i < parameters.length; ++i)
      parameterGenerators.get(i).configure(parameters[i].getAnnotatedType());
  }
Пример #2
0
  @Override
  public void configure(AnnotatedType annotatedType) {
    super.configure(annotatedType);

    for (int i = 0; i < fields.size(); ++i)
      fieldGenerators.get(i).configure(fields.get(i).getAnnotatedType());
  }
Пример #3
0
 @Override
 public void configure(Map<Class<? extends Annotation>, Annotation> configurationsByType) {
   component.configure(configurationsByType);
 }
Пример #4
0
 /**
  * Tells this generator to configure itself using annotations from a theory parameter.
  *
  * <p>The annotations fed to this method will be those annotations on the theory parameter that
  * are themselves marked with {@link GeneratorConfiguration}.
  *
  * <p>By default, the generator will configure itself by:
  *
  * <ul>
  *   <li>For each of the given annotations:
  *       <ul>
  *         <li>Find a {@code public} method on the generator named {@code configure}, that accepts
  *             a single parameter of the annotation type
  *         <li>Invoke the {@code configure} method reflectively, passing the annotation as the
  *             argument
  *       </ul>
  * </ul>
  *
  * @param configurationsByType a map of configuration annotations, keyed by annotation type
  */
 public void configure(Map<Class<? extends Annotation>, Annotation> configurationsByType) {
   for (Map.Entry<Class<? extends Annotation>, Annotation> eachEntry :
       configurationsByType.entrySet()) configure(eachEntry.getKey(), eachEntry.getValue());
 }