mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
quick sketches of various SWT 3.3 dependencies
This commit is contained in:
@ -5,6 +5,7 @@ import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public final class Class <T> {
|
||||
private static final int PrimitiveFlag = 1 << 4;
|
||||
@ -353,4 +354,11 @@ public final class Class <T> {
|
||||
public boolean isPrimitive() {
|
||||
return (vmFlags & PrimitiveFlag) != 0;
|
||||
}
|
||||
|
||||
public InputStream getResourceAsStream(String path) {
|
||||
if (! path.startsWith("/")) {
|
||||
path = new String(name, 0, name.length - 1, false) + "/" + path;
|
||||
}
|
||||
return getClassLoader().getResourceAsStream(path);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user