mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +00:00
d414fd4c7b
Hello.java works. Yay.
31 lines
845 B
Java
31 lines
845 B
Java
/* Copyright (c) 2013, Avian Contributors
|
|
|
|
Permission to use, copy, modify, and/or distribute this software
|
|
for any purpose with or without fee is hereby granted, provided
|
|
that the above copyright notice and this permission notice appear
|
|
in all copies.
|
|
|
|
There is NO WARRANTY for this software. See license.txt for
|
|
details. */
|
|
|
|
package avian;
|
|
|
|
public class Android {
|
|
public static VMField findField(VMClass vmClass, String name) {
|
|
if (vmClass.fieldTable != null) {
|
|
Classes.link(vmClass);
|
|
|
|
for (int i = 0; i < vmClass.fieldTable.length; ++i) {
|
|
if (getName(vmClass.fieldTable[i]).equals(name)) {
|
|
return vmClass.fieldTable[i];
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static String getName(VMField vmField) {
|
|
return new String(vmField.name, 0, vmField.name.length - 1);
|
|
}
|
|
}
|