It will not have any effect on the performance.
if write a java class: getclass info for get "*.jar" file's class methohd
Class newClass1=Class.forName("xiaoyao.NewClass");
so i can get all method only use 2 seconds
(getclassinfo usedtime=2705446 nanoTime)
it's a method for make xml file for one jar have no "xml file",if b4a can work this.so every jar ,we will auto create xml file by Basic4android.exe.
This is a convenient tool to use B4A, because a lot of the time we get a ready-made JAR file, but no XML file.
This is very useful for the development of some website, SDK, that we do not need to write an interface and other multi generates a JAR to B4A using JAVA.
My biggest hope is in use, write java inline, B4A can automatically extract the JAVA code, to generate a temporary XML files for the application of the use of special library.
Like main.jar.mylib.xml, I mean, can use the Java inline code as a virtual JAR.
The purpose is to B4A can directly read the code method and attribute etc..
I said so much, mainly because if you add some not equipped with the XML file of the JAR library, or directly in the B4A to write JAVA code,
B4A has no way to display method inside the JAR, I'm XML method to the invention of a dynamic, facilitate the development of staff.
long v1=System.nanoTime();
Class newClass1=Class.forName("xiaoyao.NewClass");
String info=GetClassDefinition(newClass1);
System.out.println(info);
long v2=System.nanoTime();
System.out.println("getclassinfo usedtime=" + ( v2-v1));
public xiaoyao.NewClass extends java.lang.Object
{
//Fields:
public int a1=0;
private static int a2=0;
private static int a3=0;
private boolean a4=false;
public static java.lang.Object obj1=xiaoyao.NewClass2@1cb20da;
private static long c1=555;
private static final long c2=555;
final long c3=555;
private static final long c4=0;
public java.lang.String str1=
load;
//Constructs:
public xiaoyao.NewClass();
//Methods:
public static void main([Ljava.lang.String; arg1);
public static java.lang.String test2([B arg1);
public static java.lang.String test3([[B arg1);
public static void sub1();
private int jia(int arg1, int arg2);
private int jia2(xiaoyao.NewClass2 arg1);
}
这只是一个方便B4A工具的用途,因为很多时候我们拿到一个现成的JAR文件,但是没有XML文件。
这对于开发某些网站的SDK时,非常有用,这样我们就不需要另外用JAVA去写一个接口又多生成一个JAR给B4A用。
我最大的用途是,希望在写 java inline时,B4A能够自动提取该段JAVA代码,生成一个临时的XML库文件专门给本应用使用。
如main.jar.mylib.xml,我的意思是可以把这段java inline的代码当成一个虚拟JAR.
目的就是为了B4A能够直接读取到这段代码的方法和属性等。
我说了这么多,主要就是因为如果添加一些没有配备XML文件的JAR库,或者直接在B4A中写的JAVA代码,
B4A没有办法显示JAR内部的方法,我是想发明一种动态的XML方法,方便开发人员。