/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This source file is part of SableVM classlib-stubs. * * * * See the file "LICENSE" for the copyright information and for * * the terms and conditions for copying, distribution and * * modification of this source file. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package java.lang; import java.io.InputStream; import java.io.Serializable; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.GenericDeclaration; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.net.URL; import java.security.ProtectionDomain; import org.sablevm.annotations.ImplementedInVM; public final class Class extends Object implements Serializable, GenericDeclaration, Type, AnnotatedElement { @ImplementedInVM native public String toString(); @ImplementedInVM native public static Class forName(String className) throws ClassNotFoundException; @ImplementedInVM native public static Class forName(String name, boolean initialize, ClassLoader loader) throws ClassNotFoundException; @ImplementedInVM native public T newInstance() throws InstantiationException, IllegalAccessException; @ImplementedInVM native public boolean isInstance(Object obj); @ImplementedInVM native public boolean isAssignableFrom(Class cls); @ImplementedInVM native public boolean isInterface(); @ImplementedInVM native public boolean isArray(); @ImplementedInVM native public boolean isPrimitive(); @ImplementedInVM native public boolean isAnnotation(); @ImplementedInVM native public boolean isSynthetic(); @ImplementedInVM native public String getName(); @ImplementedInVM native public ClassLoader getClassLoader(); @ImplementedInVM native public TypeVariable>[] getTypeParameters(); @ImplementedInVM native public Class getSuperclass(); @ImplementedInVM native public Type getGenericSuperclass(); @ImplementedInVM native public Package getPackage(); @ImplementedInVM native public Class[] getInterfaces(); @ImplementedInVM native public Type[] getGenericInterfaces(); @ImplementedInVM native public Class getComponentType(); @ImplementedInVM native public int getModifiers(); @ImplementedInVM native public Object[] getSigners(); @ImplementedInVM native public Method getEnclosingMethod(); @ImplementedInVM native public Constructor getEnclosingConstructor(); @ImplementedInVM native public Class getDeclaringClass(); @ImplementedInVM native public Class getEnclosingClass(); @ImplementedInVM native public String getSimpleName(); @ImplementedInVM native public String getCanonicalName(); @ImplementedInVM native public boolean isAnonymousClass(); @ImplementedInVM native public boolean isLocalClass(); @ImplementedInVM native public boolean isMemberClass(); @ImplementedInVM native public Class[] getClasses(); @ImplementedInVM native public Field[] getFields() throws SecurityException; @ImplementedInVM native public Method[] getMethods() throws SecurityException; @ImplementedInVM native public Constructor[] getConstructors() throws SecurityException; @ImplementedInVM native public Field getField(String name) throws NoSuchFieldException, SecurityException; @ImplementedInVM native public Method getMethod(String name, Class... parameterTypes) throws NoSuchMethodException, SecurityException; @ImplementedInVM native public Constructor getConstructor(Class... parameterTypes) throws NoSuchMethodException, SecurityException; @ImplementedInVM native public Class[] getDeclaredClasses() throws SecurityException; @ImplementedInVM native public Field[] getDeclaredFields() throws SecurityException; @ImplementedInVM native public Method[] getDeclaredMethods() throws SecurityException; @ImplementedInVM native public Constructor[] getDeclaredConstructors() throws SecurityException; @ImplementedInVM native public Field getDeclaredField(String name) throws NoSuchFieldException, SecurityException; @ImplementedInVM native public Method getDeclaredMethod(String name, Class... parameterTypes) throws NoSuchMethodException, SecurityException; @ImplementedInVM native public Constructor getDeclaredConstructor(Class... parameterTypes) throws NoSuchMethodException, SecurityException; @ImplementedInVM native public InputStream getResourceAsStream(String name); @ImplementedInVM native public URL getResource(String name); @ImplementedInVM native public ProtectionDomain getProtectionDomain(); @ImplementedInVM native public boolean desiredAssertionStatus(); @ImplementedInVM native public boolean isEnum(); @ImplementedInVM native public T[] getEnumConstants(); @ImplementedInVM native public T cast(Object obj); @ImplementedInVM native public Class asSubclass(Class clazz); @ImplementedInVM native public A getAnnotation( Class annotationClass); @ImplementedInVM native public boolean isAnnotationPresent( Class annotationClass); @ImplementedInVM native public Annotation[] getAnnotations(); @ImplementedInVM native public Annotation[] getDeclaredAnnotations(); }