Searched refs:cast (Results 1 - 14 of 14) sorted by relevance

/libcore/luni/src/main/native/
H A Dlibcore_io_Memory.cpp46 template <typename T> static T cast(jlong address) { function
107 return *cast<const jbyte*>(srcAddress);
111 env->SetByteArrayRegion(dst, dstOffset, byteCount, cast<const jbyte*>(srcAddress));
127 const SWAP_TYPE* src = cast<const SWAP_TYPE*>(srcAddress); \
130 const SCALAR_TYPE* src = cast<const SCALAR_TYPE*>(srcAddress); \
160 *cast<jbyte*>(dstAddress) = value;
164 env->GetByteArrayRegion(src, offset, length, cast<jbyte*>(dstAddress));
181 SWAP_FN(cast<SWAP_TYPE*>(dstAddress), src, count); /*NOLINT*/ \
183 env->Get ## JNI_NAME ## ArrayRegion(src, srcOffset, count, cast<SCALAR_TYPE*>(dstAddress)); /*NOLINT*/ \
212 return get_unaligned<jshort>(cast<cons
[all...]
/libcore/ojluni/src/main/java/java/lang/reflect/
H A DAnnotatedElement.java352 // More robust to do a dynamic cast at runtime instead
354 return annotationClass.cast(annotation);
/libcore/ojluni/src/main/java/sun/invoke/util/
H A DWrapper.java229 * Equivalent to {@code this.cast(this.zero(), type)}.
425 // return Wrapper.valueOf(type).cast(x, type);
438 public <T> T cast(Object x, Class<T> type) { method in class:Wrapper
444 * This is equivalent to {@link #cast}, except that it refuses to perform
453 // If the target wrapper is OBJECT, just do a reference cast.
459 type.cast(x);
466 return wtype.cast(x);
589 arrayType().cast(a); // throw NPE or CCE if bad type
598 arrayType().cast(a); // throw NPE or CCE if bad type
/libcore/luni/src/test/java/libcore/java/lang/
H A DClassCastExceptionTest.java29 String.class.cast(o);
32 assertEquals("Cannot cast java.lang.Exception to java.lang.String", ex.getMessage());
41 assertEquals("class java.lang.Exception cannot be cast to java.lang.String",
H A DOldClassTest.java966 Object o = PublicTestClass.class.cast(new ExtendTestClass());
970 ExtendTestClass.class.cast(new PublicTestClass());
977 ExtendTestClass.class.cast(new String());
/libcore/luni/src/test/java/libcore/java/lang/reflect/
H A DGenericExceptionsTest.java96 return expectedType.cast(array[0]);
/libcore/luni/src/test/java/libcore/java/lang/reflect/parameter/
H A DParameterMetadataTestClasses$TestEnum.smali131 check-cast v0, Llibcore/java/lang/reflect/parameter/ParameterMetadataTestClasses$TestEnum;
/libcore/ojluni/src/main/java/java/lang/invoke/
H A DMethodHandle.java84 * and their result can be cast to any return type.
100 * the return type. This is based on a cast on the method invocation expression,
103 * The cast may be to a primitive type (but not {@code void}).
380 * or the return value cast type may be generic types or type instances.
572 * @throws ClassCastException if the target's type can be adjusted to the caller, but a reference cast fails
717 * <li>If <em>T0</em> and <em>T1</em> are references, then a cast to <em>T1</em> is applied.
754 * An unboxing operation or a reference cast may also fail on a reference
1279 x = type.leadingReferenceParameter().cast(x); // throw CCE if needed
H A DMethodHandles.java142 return expected.cast(directTarget.getMemberInternal());
1953 * then the value of type <em>T0</em> is passed as a <em>T1</em> without a cast.
1997 throw new WrongMethodTypeException("cannot explicitly cast " + target + " to " + newType);
2194 // Throw ClassCastExceptions early if we can't cast any of the provided values
2199 ptypes[pos + i].cast(values[i]);
H A DTransformers.java746 Array.set(arityArray, i, elementType.cast(o));
2135 writer.putNextReference(to.cast(boxed), to);
2145 // Pass from without a cast according to description for
2149 // |to| is a reference type, perform class cast check.
2150 writer.putNextReference(to.cast(ref), to);
/libcore/ojluni/src/main/java/java/nio/file/attribute/
H A DAclEntry.java165 type.cast(e);
/libcore/ojluni/src/main/java/java/util/
H A DServiceLoader.java388 S p = service.cast(c.newInstance());
/libcore/ojluni/src/main/java/sun/util/logging/
H A DPlatformLogger.java232 DefaultLoggerProxy lp = DefaultLoggerProxy.class.cast(this.loggerProxy);
/libcore/ojluni/src/main/java/java/lang/
H A DClass.java512 * {@code Object} argument is non-null and can be cast to the
2421 * @param obj the object to be cast
2430 public T cast(Object obj) { method in class:Class
2437 return "Cannot cast " + obj.getClass().getName() + " to " + getName();
2442 * represented by the specified class object. Checks that the cast
2448 * {@code Class} objects that it is willing to accept. A cast would
2449 * generate a compile-time warning, as the correctness of the cast
2453 * @param <U> the type to cast this class object to
2454 * @param clazz the class of the type to cast this class object to
2455 * @return this {@code Class} object, cast t
[all...]

Completed in 295 milliseconds