Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 530 for isInstance (0.05 sec)

  1. src/test/java/org/codelibs/core/lang/GenericsUtilTest.java

            final Type t3 = m3.getGenericReturnType();
            assertThat(GenericsUtil.isTypeOf(t3, Map.class), is(true));
            assertThat(WildcardType.class.isInstance(GenericsUtil.getKeyTypeOfMap(t3)), is(true));
            assertThat(WildcardType.class.isInstance(GenericsUtil.getValueTypeOfMap(t3)), is(true));
        }
    
        /**
         * @throws Exception
         */
        public void testGetTypeVariableMap() throws Exception {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Predicates.java

       *
       * <p><b>Discouraged:</b> Prefer using {@code clazz::isInstance} or {@code x -> x instanceof
       * Clazz}, but note that lambdas do not have human-readable {@link #toString()} representations
       * and are not serializable.
       */
      @GwtIncompatible // Class.isInstance
      public static <T extends @Nullable Object> Predicate<T> instanceOf(Class<?> clazz) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 26.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/FluentIterable.java

       * This does perform a little more work than necessary, so another option is to insert an
       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/FluentIterable.java

       * This does perform a little more work than necessary, so another option is to insert an
       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/Throwables.java

       */
      @GwtIncompatible // Class.cast, Class.isInstance
      public static <X extends Throwable> void throwIfInstanceOf(
          Throwable throwable, Class<X> declaredType) throws X {
        checkNotNull(throwable);
        if (declaredType.isInstance(throwable)) {
          throw declaredType.cast(throwable);
        }
      }
    
      /**
       * Propagates {@code throwable} exactly as-is, if and only if it is an instance of {@code
       * declaredType}. Example usage:
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 20.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/CredentialsInternalTest.java

            // Act & Assert
            // unwrap to interface itself should return same instance
            CredentialsInternal unwrapped = creds.unwrap(CredentialsInternal.class);
            assertNotNull(unwrapped, "unwrap to CredentialsInternal returns instance");
            assertSame(creds, unwrapped, "unwrap returns the same object instance");
    
            // unwrap to unrelated type should return null (use another Credentials implementation)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Iterables.java

       * This does perform a little more work than necessary, so another option is to insert an
       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.6K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt

    internal fun <T> readFieldOrNull(
      instance: Any,
      fieldType: Class<T>,
      fieldName: String,
    ): T? {
      var c: Class<*> = instance.javaClass
      while (c != Any::class.java) {
        try {
          val field = c.getDeclaredField(fieldName)
          field.isAccessible = true
          val value = field.get(instance)
          return if (!fieldType.isInstance(value)) null else fieldType.cast(value)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 10.2K bytes
    - Viewed (1)
  9. guava/src/com/google/common/collect/Iterables.java

       * This does perform a little more work than necessary, so another option is to insert an
       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/hash/LittleEndianByteArray.java

          }
        } catch (Throwable t) {
          // ensure we really catch *everything*
        }
    
        return JavaLittleEndianBytes.INSTANCE;
      }
    
      // Compare AbstractFuture.VarHandleAtomicHelperMaker.
      private enum VarHandleLittleEndianBytesMaker {
        INSTANCE {
          /**
           * Implementation used by non-J2ObjC environments (aside, of course, from those that have
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 12.3K bytes
    - Viewed (0)
Back to top