B4J Question Annotations ?

wl

Well-Known Member
Licensed User
Longtime User
Hi,

Is there something like method / class annotations in B4X ? Idea would be to be able to add some attributes to classes, methods etc that can be read in code.

It would make extensions on the B4X environment easier.

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
There are no annotations in B4X
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
Can you give an example of a usage of this new feature that cannot be achieved using current features?
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Can you give an example of a usage of this new feature that cannot be achieved using current features?

Of course there are always other ways of achiving the same thing, but what I was looking at was:

as I intend to write a very simple OR mapper (mapping properties of an object to fields of a table in the DB), it would be nice to be able to decorate the properties of such a class as to indicate whether the property should be stored in the database table, with which filedname it corresponds, what the primary key value is etc ...

Obviously one could achieve the same thing by adding some static members to the class, but then this code is scattered.

Another possible use could be to indicate which methods should be unit tested etc ...

In short: usages of annotations found in other development languages
 
Upvote 0
Top