mirror of
https://github.com/corda/corda.git
synced 2025-06-19 07:38:22 +00:00
Merge branch 'master' into powerpc
Conflicts: makefile src/assembler.h src/compile.cpp src/compiler.cpp src/compiler.h src/finder.cpp
This commit is contained in:
@ -219,6 +219,25 @@ public final class Class <T> {
|
||||
}
|
||||
}
|
||||
|
||||
public Constructor getDeclaredConstructor(Class ... parameterTypes)
|
||||
throws NoSuchMethodException
|
||||
{
|
||||
Constructor c = null;
|
||||
Constructor[] constructors = getDeclaredConstructors();
|
||||
|
||||
for (int i = 0; i < constructors.length; ++i) {
|
||||
if (match(parameterTypes, constructors[i].getParameterTypes())) {
|
||||
c = constructors[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (c == null) {
|
||||
throw new NoSuchMethodException();
|
||||
} else {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
private int countConstructors(boolean publicOnly) {
|
||||
int count = 0;
|
||||
if (methodTable != null) {
|
||||
|
@ -30,6 +30,10 @@ public final class Integer extends Number implements Comparable<Integer> {
|
||||
return new Integer(value);
|
||||
}
|
||||
|
||||
public static Integer valueOf(String value) {
|
||||
return valueOf(parseInt(value));
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof Integer && ((Integer) o).value == value;
|
||||
}
|
||||
|
@ -75,6 +75,8 @@ public class Runtime {
|
||||
|
||||
public native long totalMemory();
|
||||
|
||||
public static native void dumpHeap(String outputFile);
|
||||
|
||||
private static class MyProcess extends Process {
|
||||
private long pid;
|
||||
private final int in;
|
||||
|
@ -74,7 +74,15 @@ public class StringBuffer implements CharSequence {
|
||||
sb.append(b, 0, b.length);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public synchronized int indexOf(String s) {
|
||||
return sb.indexOf(s);
|
||||
}
|
||||
|
||||
public synchronized int indexOf(String s, int fromIndex) {
|
||||
return sb.indexOf(s, fromIndex);
|
||||
}
|
||||
|
||||
public synchronized StringBuffer insert(int i, String s) {
|
||||
sb.insert(i, s);
|
||||
return this;
|
||||
@ -85,6 +93,11 @@ public class StringBuffer implements CharSequence {
|
||||
return this;
|
||||
}
|
||||
|
||||
public synchronized StringBuffer insert(int i, int v) {
|
||||
sb.insert(i, v);
|
||||
return this;
|
||||
}
|
||||
|
||||
public synchronized StringBuffer delete(int start, int end) {
|
||||
sb.delete(start, end);
|
||||
return this;
|
||||
@ -112,6 +125,10 @@ public class StringBuffer implements CharSequence {
|
||||
sb.setLength(v);
|
||||
}
|
||||
|
||||
public synchronized void setCharAt(int index, char ch) {
|
||||
sb.setCharAt(index, ch);
|
||||
}
|
||||
|
||||
public synchronized void getChars(int srcOffset, int srcLength, char[] dst,
|
||||
int dstOffset)
|
||||
{
|
||||
|
@ -154,6 +154,10 @@ public class StringBuilder implements CharSequence {
|
||||
return insert(i, new String(new char[] { c }, 0, 1, false));
|
||||
}
|
||||
|
||||
public StringBuilder insert(int i, int v) {
|
||||
return insert(i, String.valueOf(v));
|
||||
}
|
||||
|
||||
public StringBuilder delete(int start, int end) {
|
||||
if (start >= end) {
|
||||
return this;
|
||||
@ -322,4 +326,10 @@ public class StringBuilder implements CharSequence {
|
||||
public CharSequence subSequence(int start, int end) {
|
||||
return substring(start, end);
|
||||
}
|
||||
|
||||
public void setCharAt(int index, char ch) {
|
||||
if(index < 0 || index >= length) throw new IndexOutOfBoundsException();
|
||||
deleteCharAt(index);
|
||||
insert(index, ch);
|
||||
}
|
||||
}
|
||||
|
@ -111,8 +111,8 @@ public class Method<T> extends AccessibleObject implements Member {
|
||||
}
|
||||
}
|
||||
|
||||
public static native Object invoke(Method method, Object instance,
|
||||
Object ... arguments)
|
||||
private static native Object invoke(Method method, Object instance,
|
||||
Object ... arguments)
|
||||
throws InvocationTargetException, IllegalAccessException;
|
||||
|
||||
public Class getReturnType() {
|
||||
|
Reference in New Issue
Block a user