With B4A 2.50 it is possible to compile code modules to a library and the methods in it can be called in a static way (you don't need to Dim an object to call these methods)
I think this is possible because of the class declaration in the xml:
Is this supported somehow by the BADoclet.class or will there be a newer version of it so we can create static methods for our own libraries and we don't need to Dim a dummy object for calling such methods?
There is no change. You cannot (safely) use this attribute from a Java library.
You can create static methods and access them with instance variables. I don't see any major advantage for accessing these methods from the type directly.
I think the only advantage would be that you don't need the Dim for the instance variable.
I just wondered if it is possible because I created a class with only static methods in it and there is no possibility to call them "the static way" but it is possible when you create a library from a code module.
I think the only advantage would be that you don't need the Dim for the instance variable.
I just wondered if it is possible because I created a class with only static methods in it and there is no possibility to call them "the static way" but it is possible when you create a library from a code module.
Yes it's possible (I just tried). Under Eclipse, in xml file, you have to modify the definition of the class by adding b4a_type="StaticCode". I think that all objects must static.
:sign0013: I'm not good in english!
Example :
ZOTest.java
B4X:
import anywheresoftware.b4a.BA.ShortName;
@ShortName("ZOTest")
public class ZOTest
{
public static final int Var_A = 1;
public static final int Var_B = 2;
}