001package sting.processor;
002
003import java.util.Set;
004import javax.annotation.Nonnull;
005
006/**
007 * Immutable metadata for one effective interceptor binding on one service coordinate.
008 */
009public interface InterceptorBindingModel
010{
011  /**
012   * Return the fully qualified annotation type name.
013   *
014   * @return the fully qualified annotation type name.
015   */
016  @Nonnull
017  String annotationTypeName();
018
019  /**
020   * Return the interceptor priority.
021   *
022   * @return the interceptor priority.
023   */
024  int priority();
025
026  /**
027   * Return the fully qualified intercepted service type name.
028   *
029   * @return the fully qualified intercepted service type name.
030   */
031  @Nonnull
032  String serviceTypeName();
033
034  /**
035   * Return the qualifier key for the intercepted service coordinate.
036   *
037   * @return the qualifier key, or the empty string when the service is unqualified.
038   */
039  @Nonnull
040  String qualifierKey();
041
042  /**
043   * Return the names of available binding annotation members.
044   *
045   * @return the names of available binding annotation members.
046   */
047  @Nonnull
048  Set<String> valueNames();
049
050  /**
051   * Return the binding value for the specified annotation member.
052   *
053   * @param name the annotation member name.
054   * @return the binding value for the specified annotation member.
055   * @throws IllegalArgumentException if the member name is unknown.
056   */
057  @Nonnull
058  BindingValueModel value( @Nonnull String name );
059}