B4J Question Annotations ?

Discussion in 'B4J Questions' started by wl, May 17, 2018.

  1. wl

    wl Well-Known Member Licensed User


    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.

  2. DonManfred

    DonManfred Expert Licensed User

    There are no annotations in B4X
  3. Roycefer

    Roycefer Well-Known Member Licensed User

    Can you give an example of a usage of this new feature that cannot be achieved using current features?
  4. wl

    wl Well-Known Member Licensed User

    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
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice