Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for subtype (0.24 sec)

  1. guava-tests/test/com/google/common/reflect/SubtypeTester.java

      /** Call this in a {@link TestSubtype} public method asserting subtype relationship. */
      final <T> T isSubtype(T sub) {
        Type returnType = method.getGenericReturnType();
        Type paramType = getOnlyParameterType();
        TestSubtype spec = method.getAnnotation(TestSubtype.class);
        assertWithMessage("%s is subtype of %s", paramType, returnType)
            .that(TypeToken.of(paramType).isSubtypeOf(returnType))
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/reflect/TypeResolverTest.java

        Type subtype = new TypeCapture<TypedKeyMap<T>>() {}.capture();
        assertEquals(
            new TypeCapture<TypedKeyMap<String>>() {}.capture(),
            new TypeResolver()
                .where(
                    new TypeCapture<Map<Integer, T>>() {}.capture(),
                    new TypeCapture<Map<?, String>>() {}.capture())
                .resolveType(subtype));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/reflect/SubtypeTester.java

      /** Call this in a {@link TestSubtype} public method asserting subtype relationship. */
      final <T> T isSubtype(T sub) {
        Type returnType = method.getGenericReturnType();
        Type paramType = getOnlyParameterType();
        TestSubtype spec = method.getAnnotation(TestSubtype.class);
        assertWithMessage("%s is subtype of %s", paramType, returnType)
            .that(TypeToken.of(paramType).isSubtypeOf(returnType))
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/reflect/TypeToken.java

        @SuppressWarnings("unchecked") // guarded by the isAssignableFrom() statement above
        TypeToken<? extends T> subtype = (TypeToken<? extends T>) of(resolvedTypeArgs);
        checkArgument(
            subtype.isSubtypeOf(this), "%s does not appear to be a subtype of %s", subtype, this);
        return subtype;
      }
    
      /**
       * Returns true if this type is a supertype of the given {@code type}. "Supertype" is defined
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 53.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/reflect/TypeTokenTest.java

        }
        ParameterizedType subtype =
            (ParameterizedType)
                new TypeToken<BaseWithTypeVar<List<?>>>() {}.getSubtype(Outer.Sub.class).getType();
        assertEquals(Outer.Sub.class, subtype.getRawType());
        assertThat(subtype.getActualTypeArguments()[0]).isInstanceOf(WildcardType.class);
        ParameterizedType owner = (ParameterizedType) subtype.getOwnerType();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 88.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/reflect/TypeResolverTest.java

        Type subtype = new TypeCapture<TypedKeyMap<T>>() {}.capture();
        assertEquals(
            new TypeCapture<TypedKeyMap<String>>() {}.capture(),
            new TypeResolver()
                .where(
                    new TypeCapture<Map<Integer, T>>() {}.capture(),
                    new TypeCapture<Map<?, String>>() {}.capture())
                .resolveType(subtype));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/reflect/TypeToInstanceMap.java

       * Returns the value the specified class is mapped to, or {@code null} if no entry for this class
       * is present. This will only return a value that was bound to this specific class, not a value
       * that may have been bound to a subtype.
       *
       * <p>{@code getInstance(Foo.class)} is equivalent to {@code
       * getInstance(TypeToken.of(Foo.class))}.
       */
      @CheckForNull
      <T extends @NonNull B> T getInstance(Class<T> type);
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Apr 22 01:15:23 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java

       *   <li>Nulls test is not performed on method return values unless the method is a non-private
       *       static factory method whose return type is {@code cls} or {@code cls}'s subtype.
       * </ul>
       */
      public void testNulls(Class<?> cls) {
        try {
          doTestNulls(cls, Visibility.PACKAGE);
        } catch (Exception e) {
          throwIfUnchecked(e);
          throw new RuntimeException(e);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 08 17:31:55 GMT 2024
    - 33K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ClassToInstanceMap.java

       * Returns the value the specified class is mapped to, or {@code null} if no entry for this class
       * is present. This will only return a value that was bound to this specific class, not a value
       * that may have been bound to a subtype.
       */
      @CheckForNull
      <T extends @NonNull B> T getInstance(Class<T> type);
    
      /**
       * Maps the specified class to the specified value. Does <i>not</i> associate this value with any
       * of the class's supertypes.
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ClassToInstanceMap.java

       * Returns the value the specified class is mapped to, or {@code null} if no entry for this class
       * is present. This will only return a value that was bound to this specific class, not a value
       * that may have been bound to a subtype.
       */
      @CheckForNull
      <T extends @NonNull B> T getInstance(Class<T> type);
    
      /**
       * Maps the specified class to the specified value. Does <i>not</i> associate this value with any
       * of the class's supertypes.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 3K bytes
    - Viewed (0)
Back to top