Class AggregateTypeUtils

java.lang.Object
org.axonframework.modelling.command.inspection.AggregateTypeUtils

public class AggregateTypeUtils extends Object
Utility class providing static methods to retrieve the type as a String for a given aggregate Class.
Since:
4.13.2
Author:
Mateusz Nowak
  • Method Details

    • declaredTypeOf

      public static String declaredTypeOf(Class<?> type)
      Resolves the declared type of the given aggregate type. This is the AggregateRoot.type() when it is present and non-empty, and otherwise the simple name of the type.

      The declared type is the value used to identify an aggregate's snapshots and events (it is stored as the type of a snapshot). As such, it is the value a SnapshotFilter should match against.

      Parameters:
      type - the aggregate class to resolve the declared type for
      Returns:
      the declared type of the given aggregate type
      Since:
      4.13.2