mirror of
https://github.com/corda/corda.git
synced 2025-06-14 13:18:18 +00:00
move proxy and annotation code from C++ to Java
This allows code shrinkers to remove it if it's not used by the application.
This commit is contained in:
@ -19,14 +19,14 @@ public class Method<T> extends AccessibleObject
|
||||
{
|
||||
private byte vmFlags;
|
||||
private byte returnCode;
|
||||
private byte parameterCount;
|
||||
private byte parameterFootprint;
|
||||
public byte parameterCount;
|
||||
public byte parameterFootprint;
|
||||
private short flags;
|
||||
private short offset;
|
||||
private int nativeID;
|
||||
private byte[] name;
|
||||
public byte[] spec;
|
||||
public Addendum addendum;
|
||||
public avian.Addendum addendum;
|
||||
private Class<T> class_;
|
||||
private Object code;
|
||||
private long compiled;
|
||||
@ -55,6 +55,10 @@ public class Method<T> extends AccessibleObject
|
||||
return new String(name, 0, name.length - 1, false);
|
||||
}
|
||||
|
||||
String getSpec() {
|
||||
return new String(spec, 0, spec.length - 1, false);
|
||||
}
|
||||
|
||||
private static int next(char c, String s, int start) {
|
||||
for (int i = start; i < s.length(); ++i) {
|
||||
if (s.charAt(i) == c) return i;
|
||||
@ -158,7 +162,7 @@ public class Method<T> extends AccessibleObject
|
||||
|
||||
public <T extends Annotation> T getAnnotation(Class<T> class_) {
|
||||
if (addendum != null && addendum.annotationTable != null) {
|
||||
Object[] table = addendum.annotationTable;
|
||||
Object[] table = (Object[]) addendum.annotationTable;
|
||||
for (int i = 0; i < table.length; ++i) {
|
||||
Object[] a = (Object[]) table[i];
|
||||
if (a[1] == class_) {
|
||||
@ -171,7 +175,7 @@ public class Method<T> extends AccessibleObject
|
||||
|
||||
public Annotation[] getAnnotations() {
|
||||
if (addendum != null && addendum.annotationTable != null) {
|
||||
Object[] table = addendum.annotationTable;
|
||||
Object[] table = (Object[]) addendum.annotationTable;
|
||||
Annotation[] array = new Annotation[table.length];
|
||||
for (int i = 0; i < table.length; ++i) {
|
||||
array[i] = getAnnotation((Object[]) table[i]);
|
||||
@ -209,8 +213,4 @@ public class Method<T> extends AccessibleObject
|
||||
public TypeVariable<Method<T>>[] getTypeParameters() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public static class Addendum {
|
||||
public Object[] annotationTable;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user