Hello,
I defined my simple annotation :
[java.lang.annotation.Inherited]
[java.lang.annotation.Retention(value := java.lang.annotation.RetentionPolicy.RUNTIME)]
[java.lang.annotation.Target(value :=[ java.lang.annotation.ElementType.FIELD,java.lang.annotation.ElementType.LOCAL_VARIABLE])]
TInpx_DBAtrybutPola= public interface(java.lang.annotation.Annotation)
method FieldName : String;
end;
Now I have base class and declared public Fields with this annotation.
TFirstClass = public class (TMyBaseClass, IFirstClass)
public
[TInpx_DBAtrybutPola (FieldName:=‘MyFirstField’)]
Field1 : String;
end;
Here all works fine when I get fields for this class I can find annotation for every field.
Now I declared second class :
TSecondClass = public class(TFirstClass,ISecondClass)
public
[TInpx_DBAtrybutPola (FieldName:=‘MySecondField’)]
Field2 : String;
end;
In this class when I call getFields I have all public fields declared in TFirstClass and TSecondClass but annotation is only available for fields from TSecondClass,
WHY ? What am I doing wrong ?
I added [java.lang.annotation.Inherited] as I read it should ask for annotation in BaseClass or I misunderstand something ?
Mateusz