mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
add classes and methods needed for GNU Classpath compatibility
Most of these methods are stubs which throw UnsupportedOperationExceptions for now.
This commit is contained in:
@ -14,12 +14,17 @@ import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.Type;
|
||||
import java.lang.reflect.TypeVariable;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.GenericDeclaration;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.security.ProtectionDomain;
|
||||
|
||||
public final class Class <T> {
|
||||
public final class Class <T> implements Type, GenericDeclaration {
|
||||
private static final int PrimitiveFlag = 1 << 4;
|
||||
|
||||
private short flags;
|
||||
@ -434,8 +439,61 @@ public final class Class <T> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean desiredAssertionStatus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public T cast(Object o) {
|
||||
return (T) o;
|
||||
}
|
||||
|
||||
public Object[] getSigners() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public Annotation[] getDeclaredAnnotations() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public boolean isEnum() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public TypeVariable<Class<T>>[] getTypeParameters() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public String getSimpleName() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public Method getEnclosingMethod() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public Constructor getEnclosingConstructor() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public Class getEnclosingClass() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public Class[] getDeclaredClasses() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <A extends Annotation> A getAnnotation(Class<A> c) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public ProtectionDomain getProtectionDomain() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
// for GNU Classpath compatibility:
|
||||
void setSigners(Object[] signers) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user