Package io.csar

Interface Concern


public interface Concern
Represents a concern (usually a cross-cutting concern) of a program such as logging or internationalization.

This framework allows concerns to be specified locally via a DecoratedConcernedThreadGroup, or as a global default using Csar.registerDefaultConcern(Concern).

Each type of concern should override getConcernType() to return the class (normally an interface) representing a type of concern such as logging or i18n.

Author:
Garret Wilson
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default Class<? extends Concern>
    Returns the type or classification of concern.
  • Method Details

    • getConcernType

      default Class<? extends Concern> getConcernType()
      Returns the type or classification of concern. By default this is the class with which a concern will be registered in a ConcernRegistry.

      The default implementation returns the class of the current instance.

      Returns:
      The class representing the type of concern.
      See Also: