src/java.base/share/classes/java/lang/Class.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/java.base/share/classes/java/lang/Class.java	Thu Jun 25 12:09:44 2015
--- new/src/java.base/share/classes/java/lang/Class.java	Thu Jun 25 12:09:44 2015

*** 54,63 **** --- 54,64 ---- import java.util.Map; import java.util.HashMap; import java.util.Objects; import java.util.StringJoiner; import sun.misc.Unsafe; + import jdk.internal.HotSpotIntrinsicCandidate; import sun.reflect.CallerSensitive; import sun.reflect.ConstantPool; import sun.reflect.Reflection; import sun.reflect.ReflectionFactory; import sun.reflect.generics.factory.CoreReflectionFactory;
*** 500,509 **** --- 501,511 ---- * @param obj the object to check * @return true if {@code obj} is an instance of this class * * @since 1.1 */ + @HotSpotIntrinsicCandidate public native boolean isInstance(Object obj); /** * Determines if the class or interface represented by this
*** 527,556 **** --- 529,561 ---- * type {@code cls} can be assigned to objects of this class * @exception NullPointerException if the specified Class parameter is * null. * @since 1.1 */ + @HotSpotIntrinsicCandidate public native boolean isAssignableFrom(Class<?> cls); /** * Determines if the specified {@code Class} object represents an * interface type. * * @return {@code true} if this object represents an interface; * {@code false} otherwise. */ + @HotSpotIntrinsicCandidate public native boolean isInterface(); /** * Determines if this {@code Class} object represents an array class. * * @return {@code true} if this object represents an array class; * {@code false} otherwise. * @since 1.1 */ + @HotSpotIntrinsicCandidate public native boolean isArray(); /** * Determines if the specified {@code Class} object represents a
*** 578,587 **** --- 583,593 ---- * @see java.lang.Float#TYPE * @see java.lang.Double#TYPE * @see java.lang.Void#TYPE * @since 1.1 */ + @HotSpotIntrinsicCandidate public native boolean isPrimitive(); /** * Returns true if this {@code Class} object represents an annotation * type. Note that if this method returns true, {@link #isInterface()}
*** 749,758 **** --- 755,765 ---- * {@code Class} object representing the {@code Object} class is * returned. * * @return the direct superclass of the class represented by this object */ + @HotSpotIntrinsicCandidate public native Class<? super T> getSuperclass(); /** * Returns the {@code Type} representing the direct superclass of
*** 982,991 **** --- 989,999 ---- * * @return the {@code int} representing the modifiers for this class * @see java.lang.reflect.Modifier * @since 1.1 */ + @HotSpotIntrinsicCandidate public native int getModifiers(); /** * Gets the signers of this class.
*** 3380,3389 **** --- 3388,3398 ---- * null and is not assignable to the type T. * * @since 1.5 */ @SuppressWarnings("unchecked") + @HotSpotIntrinsicCandidate public T cast(Object obj) { if (obj != null && !isInstance(obj)) throw new ClassCastException(cannotCastMsg(obj)); return (T) obj; }

src/java.base/share/classes/java/lang/Class.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File