Interface SnQualifier

All Known Implementing Classes:
CurrencySnQualifierProvider.CurrencySnQualifier, LanguageSnQualifierProvider.LanguageSnQualifier, StoreSnQualifierProvider.StoreSnQualifier

public interface SnQualifier
Represents a qualifier. A qualifier can be: a language, a currency, a combination of them, etc.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canGetAs(Class<?> qualifierClass)
    Returns whether the given qualifier class is supported or not.
    <Q> Q
    getAs(Class<Q> qualifierClass)
    Extracts a value from this Qualifier object.
    Returns the qualifier id.
  • Method Details

    • getId

      String getId()
      Returns the qualifier id.
      Returns:
      the qualifier id
    • canGetAs

      boolean canGetAs(Class<?> qualifierClass)
      Returns whether the given qualifier class is supported or not.
      Returns:
      true if the given qualifier class is supported, false otherwise
    • getAs

      <Q> Q getAs(Class<Q> qualifierClass)
      Extracts a value from this Qualifier object.
      Parameters:
      qualifierClass - - the qualifier class
      Returns:
      the extracted value
      Throws:
      IllegalArgumentException - if the qualifier class is not supported