Do Annotations pass on to the extended/mixer type?


I have 3 types:

  • MyType1 that has an annotation, e.g. @db
  • MyType2 that extends MyType1
  • MyType3 that mixes in MyType1

Will MyType2 and MyType3 have the annotation too?


yes they will also have the annotation


When you call extensions() on a type by default you get all the inherited extensions from the parent types too. There is a way to refer to the extensions on the type itself (and not inherited) via declaredExtensions() call on the type


We are not seeing this in the extensions API call. In Boaz’s example if we call MyType3.extensions() it shows MyType3’s annotations and some from being an entity type but does not show the annotation from MyType1.

In our scenario MyType1 is a non-entity type and MyType3 is an entity type.