Annotation Interface RegisterType


@Retention(CLASS) @Target({PACKAGE,TYPE}) @Inherited public @interface RegisterType
Annotation to mark a type or package that should be registered in the TypeRegistry.

If the marked type is a package, all types in the package and its ancestor packages will be registered.

Registered types can be referenced by their simple type (e.g.: Foo) when used as input in TestFixtures or when deserializing using JsonUtils. If multiple classes share the same simple name, it is also possible to pass the last part of the fully qualified class name (e.g.: example.Foo) to select a class.

To reference a type in a JSON string use the @class attribute. For example: {"@class": "Foo"}.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies regular expression values found in the types that should be matched.
  • Element Details

    • contains

      String[] contains
      Specifies regular expression values found in the types that should be matched. A type is only matched if this array is empty or if one or more of the specified regular expression values can be found in the type name.
      Default:
      {}