Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for getComponentType (0.17 sec)

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

        assertEquals(int.class, TypeToken.of(int[].class).getComponentType().getType());
        assertEquals(long.class, TypeToken.of(long[].class).getComponentType().getType());
        assertEquals(float.class, TypeToken.of(float[].class).getComponentType().getType());
        assertEquals(double.class, TypeToken.of(double[].class).getComponentType().getType());
        assertNull(TypeToken.of(Object.class).getComponentType());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 21:13:09 UTC 2024
    - 89.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/reflect/TypeTokenTest.java

        assertEquals(int.class, TypeToken.of(int[].class).getComponentType().getType());
        assertEquals(long.class, TypeToken.of(long[].class).getComponentType().getType());
        assertEquals(float.class, TypeToken.of(float[].class).getComponentType().getType());
        assertEquals(double.class, TypeToken.of(double[].class).getComponentType().getType());
        assertNull(TypeToken.of(Object.class).getComponentType());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 21:13:09 UTC 2024
    - 89.1K bytes
    - Viewed (0)
  3. guava/src/com/google/common/reflect/Types.java

       * <p>The format is subject to change.
       */
      static String toString(Type type) {
        return (type instanceof Class) ? ((Class<?>) type).getName() : type.toString();
      }
    
      @CheckForNull
      static Type getComponentType(Type type) {
        checkNotNull(type);
        AtomicReference<@Nullable Type> result = new AtomicReference<>();
        new TypeVisitor() {
          @Override
          void visitTypeVariable(TypeVariable<?> t) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 23K bytes
    - Viewed (0)
  4. android/guava-testlib/test/com/google/common/collect/testing/features/FeatureEnumTest.java

                  "%s.%s() must return an array of %s.",
                  annotationClass, propertyName, annotationClass.getDeclaringClass()),
              annotationClass.getDeclaringClass(),
              returnType.getComponentType());
        }
      }
    
      // This is public so that tests for Feature enums we haven't yet imagined
      // can reuse it.
      public static <E extends Enum<?> & Feature<?>> void assertGoodFeatureEnum(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:09:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/collect/testing/features/FeatureEnumTest.java

                  "%s.%s() must return an array of %s.",
                  annotationClass, propertyName, annotationClass.getDeclaringClass()),
              annotationClass.getDeclaringClass(),
              returnType.getComponentType());
        }
      }
    
      // This is public so that tests for Feature enums we haven't yet imagined
      // can reuse it.
      public static <E extends Enum<?> & Feature<?>> void assertGoodFeatureEnum(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:09:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

            }
          }
        }
        return null;
      }
    
      private static <T> T createEmptyArray(Class<T> arrayType) {
        // getComponentType() is non-null because we call createEmptyArray only with an array type.
        return arrayType.cast(Array.newInstance(requireNonNull(arrayType.getComponentType()), 0));
      }
    
      // Internal implementations of some classes, with public default constructor that get() needs.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

            }
          }
        }
        return null;
      }
    
      private static <T> T createEmptyArray(Class<T> arrayType) {
        // getComponentType() is non-null because we call createEmptyArray only with an array type.
        return arrayType.cast(Array.newInstance(requireNonNull(arrayType.getComponentType()), 0));
      }
    
      // Internal implementations of some classes, with public default constructor that get() needs.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/collection/ArrayUtil.java

            assertArgumentNotNull("array", array);
    
            final int length = array.length;
            @SuppressWarnings("unchecked")
            final T[] newArray = (T[]) Array.newInstance(array.getClass().getComponentType(), length + 1);
            System.arraycopy(array, 0, newArray, 0, length);
            newArray[length] = obj;
            return newArray;
        }
    
        /**
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/collection/SLinkedList.java

         * @return 配列
         */
        @SuppressWarnings("unchecked")
        public E[] toArray(E[] array) {
            if (array.length < size) {
                array = (E[]) Array.newInstance(array.getClass().getComponentType(), size);
            }
            int i = 0;
            for (Entry e = header.next; e != header; e = e.next) {
                array[i++] = e.element;
            }
            for (i = size; i < array.length; ++i) {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/reflect/InvokableTest.java

          }
          methods.add(signature.append(")").toString());
        }
        return methods.build();
      }
    
      private static String typeName(Class<?> type) {
        return type.isArray() ? typeName(type.getComponentType()) + "[]" : type.getName();
      }
    
      public void testConstructor() throws Exception {
        Invokable<A, A> invokable = A.constructor();
        assertTrue(invokable.isPublic());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 30.7K bytes
    - Viewed (0)
Back to top