jaroslav@56: /* jaroslav@56: * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. jaroslav@56: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jaroslav@56: * jaroslav@56: * This code is free software; you can redistribute it and/or modify it jaroslav@56: * under the terms of the GNU General Public License version 2 only, as jaroslav@56: * published by the Free Software Foundation. Oracle designates this jaroslav@56: * particular file as subject to the "Classpath" exception as provided jaroslav@56: * by Oracle in the LICENSE file that accompanied this code. jaroslav@56: * jaroslav@56: * This code is distributed in the hope that it will be useful, but WITHOUT jaroslav@56: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jaroslav@56: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jaroslav@56: * version 2 for more details (a copy is included in the LICENSE file that jaroslav@56: * accompanied this code). jaroslav@56: * jaroslav@56: * You should have received a copy of the GNU General Public License version jaroslav@56: * 2 along with this work; if not, write to the Free Software Foundation, jaroslav@56: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jaroslav@56: * jaroslav@56: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jaroslav@56: * or visit www.oracle.com if you need additional information or have any jaroslav@56: * questions. jaroslav@56: */ jaroslav@56: jaroslav@56: package java.lang; jaroslav@56: jaroslav@56: import java.lang.annotation.Annotation; jaroslav@56: jaroslav@56: /** jaroslav@56: * Instances of the class {@code Class} represent classes and jaroslav@56: * interfaces in a running Java application. An enum is a kind of jaroslav@56: * class and an annotation is a kind of interface. Every array also jaroslav@56: * belongs to a class that is reflected as a {@code Class} object jaroslav@56: * that is shared by all arrays with the same element type and number jaroslav@56: * of dimensions. The primitive Java types ({@code boolean}, jaroslav@56: * {@code byte}, {@code char}, {@code short}, jaroslav@56: * {@code int}, {@code long}, {@code float}, and jaroslav@56: * {@code double}), and the keyword {@code void} are also jaroslav@56: * represented as {@code Class} objects. jaroslav@56: * jaroslav@56: *
{@code Class} has no public constructor. Instead {@code Class} jaroslav@56: * objects are constructed automatically by the Java Virtual Machine as classes jaroslav@56: * are loaded and by calls to the {@code defineClass} method in the class jaroslav@56: * loader. jaroslav@56: * jaroslav@56: *
The following example uses a {@code Class} object to print the jaroslav@56: * class name of an object: jaroslav@56: * jaroslav@56: *
jaroslav@56: * jaroslav@56: *jaroslav@56: * void printClassName(Object obj) { jaroslav@56: * System.out.println("The class of " + obj + jaroslav@56: * " is " + obj.getClass().getName()); jaroslav@56: * } jaroslav@56: *
It is also possible to get the {@code Class} object for a named jaroslav@56: * type (or for void) using a class literal. See Section 15.8.2 of jaroslav@56: * The Java™ Language Specification. jaroslav@56: * For example: jaroslav@56: * jaroslav@56: *
jaroslav@56: * {@code System.out.println("The name of class Foo is: "+Foo.class.getName());} jaroslav@56: *jaroslav@56: * jaroslav@56: * @param
jaroslav@56: * {@code Class.forName(className, true, currentLoader)} jaroslav@56: *jaroslav@56: * jaroslav@56: * where {@code currentLoader} denotes the defining class loader of jaroslav@56: * the current class. jaroslav@56: * jaroslav@56: *
For example, the following code fragment returns the jaroslav@56: * runtime {@code Class} descriptor for the class named jaroslav@56: * {@code java.lang.Thread}: jaroslav@56: * jaroslav@56: *
jaroslav@56: * {@code Class t = Class.forName("java.lang.Thread")} jaroslav@56: *jaroslav@56: *
jaroslav@56: * A call to {@code forName("X")} causes the class named jaroslav@56: * {@code X} to be initialized. jaroslav@56: * jaroslav@56: * @param className the fully qualified name of the desired class. jaroslav@56: * @return the {@code Class} object for the class with the jaroslav@56: * specified name. jaroslav@56: * @exception LinkageError if the linkage fails jaroslav@56: * @exception ExceptionInInitializerError if the initialization provoked jaroslav@56: * by this method fails jaroslav@56: * @exception ClassNotFoundException if the class cannot be located jaroslav@56: */ jaroslav@56: public static Class> forName(String className) jaroslav@56: throws ClassNotFoundException { jaroslav@65: throw new UnsupportedOperationException(); jaroslav@56: } jaroslav@56: jaroslav@56: jaroslav@56: /** jaroslav@56: * Creates a new instance of the class represented by this {@code Class} jaroslav@56: * object. The class is instantiated as if by a {@code new} jaroslav@56: * expression with an empty argument list. The class is initialized if it jaroslav@56: * has not already been initialized. jaroslav@56: * jaroslav@56: *
Note that this method propagates any exception thrown by the jaroslav@56: * nullary constructor, including a checked exception. Use of jaroslav@56: * this method effectively bypasses the compile-time exception jaroslav@56: * checking that would otherwise be performed by the compiler. jaroslav@56: * The {@link jaroslav@56: * java.lang.reflect.Constructor#newInstance(java.lang.Object...) jaroslav@56: * Constructor.newInstance} method avoids this problem by wrapping jaroslav@56: * any exception thrown by the constructor in a (checked) {@link jaroslav@56: * java.lang.reflect.InvocationTargetException}. jaroslav@56: * jaroslav@56: * @return a newly allocated instance of the class represented by this jaroslav@56: * object. jaroslav@56: * @exception IllegalAccessException if the class or its nullary jaroslav@56: * constructor is not accessible. jaroslav@56: * @exception InstantiationException jaroslav@56: * if this {@code Class} represents an abstract class, jaroslav@56: * an interface, an array class, a primitive type, or void; jaroslav@56: * or if the class has no nullary constructor; jaroslav@56: * or if the instantiation fails for some other reason. jaroslav@56: * @exception ExceptionInInitializerError if the initialization jaroslav@56: * provoked by this method fails. jaroslav@56: * @exception SecurityException jaroslav@56: * If a security manager, s, is present and any of the jaroslav@56: * following conditions is met: jaroslav@56: * jaroslav@56: *
Specifically, if this {@code Class} object represents a jaroslav@56: * declared class, this method returns {@code true} if the specified jaroslav@56: * {@code Object} argument is an instance of the represented class (or jaroslav@56: * of any of its subclasses); it returns {@code false} otherwise. If jaroslav@56: * this {@code Class} object represents an array class, this method jaroslav@56: * returns {@code true} if the specified {@code Object} argument jaroslav@56: * can be converted to an object of the array class by an identity jaroslav@56: * conversion or by a widening reference conversion; it returns jaroslav@56: * {@code false} otherwise. If this {@code Class} object jaroslav@56: * represents an interface, this method returns {@code true} if the jaroslav@56: * class or any superclass of the specified {@code Object} argument jaroslav@56: * implements this interface; it returns {@code false} otherwise. If jaroslav@56: * this {@code Class} object represents a primitive type, this method jaroslav@56: * returns {@code false}. jaroslav@56: * jaroslav@56: * @param obj the object to check jaroslav@56: * @return true if {@code obj} is an instance of this class jaroslav@56: * jaroslav@56: * @since JDK1.1 jaroslav@56: */ jaroslav@56: public native boolean isInstance(Object obj); jaroslav@56: jaroslav@56: jaroslav@56: /** jaroslav@56: * Determines if the class or interface represented by this jaroslav@56: * {@code Class} object is either the same as, or is a superclass or jaroslav@56: * superinterface of, the class or interface represented by the specified jaroslav@56: * {@code Class} parameter. It returns {@code true} if so; jaroslav@56: * otherwise it returns {@code false}. If this {@code Class} jaroslav@56: * object represents a primitive type, this method returns jaroslav@56: * {@code true} if the specified {@code Class} parameter is jaroslav@56: * exactly this {@code Class} object; otherwise it returns jaroslav@56: * {@code false}. jaroslav@56: * jaroslav@56: *
Specifically, this method tests whether the type represented by the jaroslav@56: * specified {@code Class} parameter can be converted to the type jaroslav@56: * represented by this {@code Class} object via an identity conversion jaroslav@56: * or via a widening reference conversion. See The Java Language jaroslav@56: * Specification, sections 5.1.1 and 5.1.4 , for details. jaroslav@56: * jaroslav@56: * @param cls the {@code Class} object to be checked jaroslav@56: * @return the {@code boolean} value indicating whether objects of the jaroslav@56: * type {@code cls} can be assigned to objects of this class jaroslav@56: * @exception NullPointerException if the specified Class parameter is jaroslav@56: * null. jaroslav@56: * @since JDK1.1 jaroslav@56: */ jaroslav@56: public native boolean isAssignableFrom(Class> cls); jaroslav@56: jaroslav@56: jaroslav@56: /** jaroslav@56: * Determines if the specified {@code Class} object represents an jaroslav@56: * interface type. jaroslav@56: * jaroslav@56: * @return {@code true} if this object represents an interface; jaroslav@56: * {@code false} otherwise. jaroslav@56: */ jaroslav@56: public native boolean isInterface(); jaroslav@56: jaroslav@56: jaroslav@56: /** jaroslav@56: * Determines if this {@code Class} object represents an array class. jaroslav@56: * jaroslav@56: * @return {@code true} if this object represents an array class; jaroslav@56: * {@code false} otherwise. jaroslav@56: * @since JDK1.1 jaroslav@56: */ jaroslav@56: public native boolean isArray(); jaroslav@56: jaroslav@56: jaroslav@56: /** jaroslav@56: * Determines if the specified {@code Class} object represents a jaroslav@56: * primitive type. jaroslav@56: * jaroslav@56: *
There are nine predefined {@code Class} objects to represent jaroslav@56: * the eight primitive types and void. These are created by the Java jaroslav@56: * Virtual Machine, and have the same names as the primitive types that jaroslav@56: * they represent, namely {@code boolean}, {@code byte}, jaroslav@56: * {@code char}, {@code short}, {@code int}, jaroslav@56: * {@code long}, {@code float}, and {@code double}. jaroslav@56: * jaroslav@56: *
These objects may only be accessed via the following public static jaroslav@56: * final variables, and are the only {@code Class} objects for which jaroslav@56: * this method returns {@code true}. jaroslav@56: * jaroslav@56: * @return true if and only if this class represents a primitive type jaroslav@56: * jaroslav@56: * @see java.lang.Boolean#TYPE jaroslav@56: * @see java.lang.Character#TYPE jaroslav@56: * @see java.lang.Byte#TYPE jaroslav@56: * @see java.lang.Short#TYPE jaroslav@56: * @see java.lang.Integer#TYPE jaroslav@56: * @see java.lang.Long#TYPE jaroslav@56: * @see java.lang.Float#TYPE jaroslav@56: * @see java.lang.Double#TYPE jaroslav@56: * @see java.lang.Void#TYPE jaroslav@56: * @since JDK1.1 jaroslav@56: */ jaroslav@56: public native boolean isPrimitive(); jaroslav@56: jaroslav@56: /** jaroslav@56: * Returns true if this {@code Class} object represents an annotation jaroslav@56: * type. Note that if this method returns true, {@link #isInterface()} jaroslav@56: * would also return true, as all annotation types are also interfaces. jaroslav@56: * jaroslav@56: * @return {@code true} if this class object represents an annotation jaroslav@56: * type; {@code false} otherwise jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public boolean isAnnotation() { jaroslav@56: return (getModifiers() & ANNOTATION) != 0; jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * Returns {@code true} if this class is a synthetic class; jaroslav@56: * returns {@code false} otherwise. jaroslav@56: * @return {@code true} if and only if this class is a synthetic class as jaroslav@56: * defined by the Java Language Specification. jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public boolean isSynthetic() { jaroslav@56: return (getModifiers() & SYNTHETIC) != 0; jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * Returns the name of the entity (class, interface, array class, jaroslav@56: * primitive type, or void) represented by this {@code Class} object, jaroslav@56: * as a {@code String}. jaroslav@56: * jaroslav@56: *
If this class object represents a reference type that is not an jaroslav@56: * array type then the binary name of the class is returned, as specified jaroslav@56: * by jaroslav@56: * The Java™ Language Specification. jaroslav@56: * jaroslav@56: *
If this class object represents a primitive type or void, then the jaroslav@56: * name returned is a {@code String} equal to the Java language jaroslav@56: * keyword corresponding to the primitive type or void. jaroslav@56: * jaroslav@56: *
If this class object represents a class of arrays, then the internal jaroslav@56: * form of the name consists of the name of the element type preceded by jaroslav@56: * one or more '{@code [}' characters representing the depth of the array jaroslav@56: * nesting. The encoding of element type names is as follows: jaroslav@56: * jaroslav@56: *
jaroslav@56: * jaroslav@56: *jaroslav@56: *
Element Type Encoding jaroslav@56: * boolean Z jaroslav@56: * byte B jaroslav@56: * char C jaroslav@56: * class or interface jaroslav@56: * Lclassname; jaroslav@56: * double D jaroslav@56: * float F jaroslav@56: * int I jaroslav@56: * long J jaroslav@56: * short S jaroslav@56: *
The class or interface name classname is the binary name of jaroslav@56: * the class specified above. jaroslav@56: * jaroslav@56: *
Examples: jaroslav@56: *
jaroslav@56: * jaroslav@56: * @return the name of the class or interface jaroslav@56: * represented by this object. jaroslav@56: */ jaroslav@56: public String getName() { jaroslav@65: throw new UnsupportedOperationException(); jaroslav@65: // String name = this.name; jaroslav@65: // if (name == null) jaroslav@65: // this.name = name = getName0(); jaroslav@65: // return name; jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * Returns the {@code Class} representing the superclass of the entity jaroslav@56: * (class, interface, primitive type or void) represented by this jaroslav@56: * {@code Class}. If this {@code Class} represents either the jaroslav@56: * {@code Object} class, an interface, a primitive type, or void, then jaroslav@56: * null is returned. If this object represents an array class then the jaroslav@56: * {@code Class} object representing the {@code Object} class is jaroslav@56: * returned. jaroslav@56: * jaroslav@56: * @return the superclass of the class represented by this object. jaroslav@56: */ jaroslav@56: public native Class super T> getSuperclass(); jaroslav@56: jaroslav@56: /** jaroslav@56: * Returns the Java language modifiers for this class or interface, encoded jaroslav@56: * in an integer. The modifiers consist of the Java Virtual Machine's jaroslav@56: * constants for {@code public}, {@code protected}, jaroslav@56: * {@code private}, {@code final}, {@code static}, jaroslav@56: * {@code abstract} and {@code interface}; they should be decoded jaroslav@56: * using the methods of class {@code Modifier}. jaroslav@56: * jaroslav@56: *jaroslav@56: * String.class.getName() jaroslav@56: * returns "java.lang.String" jaroslav@56: * byte.class.getName() jaroslav@56: * returns "byte" jaroslav@56: * (new Object[3]).getClass().getName() jaroslav@56: * returns "[Ljava.lang.Object;" jaroslav@56: * (new int[3][4][5][6][7][8][9]).getClass().getName() jaroslav@56: * returns "[[[[[[[I" jaroslav@56: *
If the underlying class is an array class, then its jaroslav@56: * {@code public}, {@code private} and {@code protected} jaroslav@56: * modifiers are the same as those of its component type. If this jaroslav@56: * {@code Class} represents a primitive type or void, its jaroslav@56: * {@code public} modifier is always {@code true}, and its jaroslav@56: * {@code protected} and {@code private} modifiers are always jaroslav@56: * {@code false}. If this object represents an array class, a jaroslav@56: * primitive type or void, then its {@code final} modifier is always jaroslav@56: * {@code true} and its interface modifier is always jaroslav@56: * {@code false}. The values of its other modifiers are not determined jaroslav@56: * by this specification. jaroslav@56: * jaroslav@56: *
The modifier encodings are defined in The Java Virtual Machine jaroslav@56: * Specification, table 4.1. jaroslav@56: * jaroslav@56: * @return the {@code int} representing the modifiers for this class jaroslav@56: * @see java.lang.reflect.Modifier jaroslav@56: * @since JDK1.1 jaroslav@56: */ jaroslav@56: public native int getModifiers(); jaroslav@56: jaroslav@56: jaroslav@56: /** jaroslav@56: * Returns the simple name of the underlying class as given in the jaroslav@56: * source code. Returns an empty string if the underlying class is jaroslav@56: * anonymous. jaroslav@56: * jaroslav@56: *
The simple name of an array is the simple name of the jaroslav@56: * component type with "[]" appended. In particular the simple jaroslav@56: * name of an array whose component type is anonymous is "[]". jaroslav@56: * jaroslav@56: * @return the simple name of the underlying class jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public String getSimpleName() { jaroslav@65: throw new UnsupportedOperationException(); jaroslav@65: //// if (isArray()) jaroslav@65: //// return getComponentType().getSimpleName()+"[]"; jaroslav@65: //// jaroslav@65: //// String simpleName = getSimpleBinaryName(); jaroslav@65: //// if (simpleName == null) { // top level class jaroslav@65: //// simpleName = getName(); jaroslav@65: //// return simpleName.substring(simpleName.lastIndexOf(".")+1); // strip the package name jaroslav@65: //// } jaroslav@65: //// // According to JLS3 "Binary Compatibility" (13.1) the binary jaroslav@65: //// // name of non-package classes (not top level) is the binary jaroslav@65: //// // name of the immediately enclosing class followed by a '$' followed by: jaroslav@65: //// // (for nested and inner classes): the simple name. jaroslav@65: //// // (for local classes): 1 or more digits followed by the simple name. jaroslav@65: //// // (for anonymous classes): 1 or more digits. jaroslav@65: //// jaroslav@65: //// // Since getSimpleBinaryName() will strip the binary name of jaroslav@65: //// // the immediatly enclosing class, we are now looking at a jaroslav@65: //// // string that matches the regular expression "\$[0-9]*" jaroslav@65: //// // followed by a simple name (considering the simple of an jaroslav@65: //// // anonymous class to be the empty string). jaroslav@65: //// jaroslav@65: //// // Remove leading "\$[0-9]*" from the name jaroslav@65: //// int length = simpleName.length(); jaroslav@65: //// if (length < 1 || simpleName.charAt(0) != '$') jaroslav@65: //// throw new InternalError("Malformed class name"); jaroslav@65: //// int index = 1; jaroslav@65: //// while (index < length && isAsciiDigit(simpleName.charAt(index))) jaroslav@65: //// index++; jaroslav@65: //// // Eventually, this is the empty string iff this is an anonymous class jaroslav@65: //// return simpleName.substring(index); jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * Character.isDigit answers {@code true} to some non-ascii jaroslav@56: * digits. This one does not. jaroslav@56: */ jaroslav@56: private static boolean isAsciiDigit(char c) { jaroslav@56: return '0' <= c && c <= '9'; jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * Returns the canonical name of the underlying class as jaroslav@56: * defined by the Java Language Specification. Returns null if jaroslav@56: * the underlying class does not have a canonical name (i.e., if jaroslav@56: * it is a local or anonymous class or an array whose component jaroslav@56: * type does not have a canonical name). jaroslav@56: * @return the canonical name of the underlying class if it exists, and jaroslav@56: * {@code null} otherwise. jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public String getCanonicalName() { jaroslav@65: throw new UnsupportedOperationException(); jaroslav@65: // if (isArray()) { jaroslav@65: // String canonicalName = getComponentType().getCanonicalName(); jaroslav@65: // if (canonicalName != null) jaroslav@65: // return canonicalName + "[]"; jaroslav@65: // else jaroslav@65: // return null; jaroslav@65: // } jaroslav@65: // if (isLocalOrAnonymousClass()) jaroslav@65: // return null; jaroslav@65: // Class> enclosingClass = getEnclosingClass(); jaroslav@65: // if (enclosingClass == null) { // top level class jaroslav@65: // return getName(); jaroslav@65: // } else { jaroslav@65: // String enclosingName = enclosingClass.getCanonicalName(); jaroslav@65: // if (enclosingName == null) jaroslav@65: // return null; jaroslav@65: // return enclosingName + "." + getSimpleName(); jaroslav@65: // } jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * Finds a resource with a given name. The rules for searching resources jaroslav@56: * associated with a given class are implemented by the defining jaroslav@56: * {@linkplain ClassLoader class loader} of the class. This method jaroslav@56: * delegates to this object's class loader. If this object was loaded by jaroslav@56: * the bootstrap class loader, the method delegates to {@link jaroslav@56: * ClassLoader#getSystemResourceAsStream}. jaroslav@56: * jaroslav@56: *
Before delegation, an absolute resource name is constructed from the jaroslav@56: * given resource name using this algorithm: jaroslav@56: * jaroslav@56: *
jaroslav@56: * {@code modified_package_name/name} jaroslav@56: *jaroslav@56: * jaroslav@56: *
Where the {@code modified_package_name} is the package name of this jaroslav@56: * object with {@code '/'} substituted for {@code '.'} jaroslav@56: * ('\u002e'). jaroslav@56: * jaroslav@56: *
Before delegation, an absolute resource name is constructed from the jaroslav@56: * given resource name using this algorithm: jaroslav@56: * jaroslav@56: *
jaroslav@56: * {@code modified_package_name/name} jaroslav@56: *jaroslav@56: * jaroslav@56: *
Where the {@code modified_package_name} is the package name of this jaroslav@56: * object with {@code '/'} substituted for {@code '.'} jaroslav@56: * ('\u002e'). jaroslav@56: * jaroslav@56: *
This method is useful when a client needs to "narrow" the type of jaroslav@56: * a {@code Class} object to pass it to an API that restricts the jaroslav@56: * {@code Class} objects that it is willing to accept. A cast would jaroslav@56: * generate a compile-time warning, as the correctness of the cast jaroslav@56: * could not be checked at runtime (because generic types are implemented jaroslav@56: * by erasure). jaroslav@56: * jaroslav@56: * @return this {@code Class} object, cast to represent a subclass of jaroslav@56: * the specified class object. jaroslav@56: * @throws ClassCastException if this {@code Class} object does not jaroslav@56: * represent a subclass of the specified class (here "subclass" includes jaroslav@56: * the class itself). jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public Class extends U> asSubclass(Class clazz) { jaroslav@56: if (clazz.isAssignableFrom(this)) jaroslav@56: return (Class extends U>) this; jaroslav@56: else jaroslav@56: throw new ClassCastException(this.toString()); jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * @throws NullPointerException {@inheritDoc} jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public A getAnnotation(Class annotationClass) { jaroslav@65: throw new UnsupportedOperationException(); jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * @throws NullPointerException {@inheritDoc} jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public boolean isAnnotationPresent( jaroslav@56: Class extends Annotation> annotationClass) { jaroslav@56: if (annotationClass == null) jaroslav@56: throw new NullPointerException(); jaroslav@56: jaroslav@56: return getAnnotation(annotationClass) != null; jaroslav@56: } jaroslav@56: jaroslav@56: jaroslav@56: /** jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public Annotation[] getAnnotations() { jaroslav@65: throw new UnsupportedOperationException(); jaroslav@56: } jaroslav@56: jaroslav@56: /** jaroslav@56: * @since 1.5 jaroslav@56: */ jaroslav@56: public Annotation[] getDeclaredAnnotations() { jaroslav@65: throw new UnsupportedOperationException(); jaroslav@56: } jaroslav@56: jaroslav@84: static Class getPrimitiveClass(String type) { jaroslav@80: throw new UnsupportedOperationException(); jaroslav@80: } jaroslav@56: }