Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for getComponentType (0.16 sec)

  1. 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();
      }
    
      static @Nullable Type getComponentType(Type type) {
        checkNotNull(type);
        AtomicReference<@Nullable Type> result = new AtomicReference<>();
        new TypeVisitor() {
          @Override
          void visitTypeVariable(TypeVariable<?> t) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 23.5K bytes
    - Viewed (0)
  2. android/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();
      }
    
      static @Nullable Type getComponentType(Type type) {
        checkNotNull(type);
        AtomicReference<@Nullable Type> result = new AtomicReference<>();
        new TypeVisitor() {
          @Override
          void visitTypeVariable(TypeVariable<?> t) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 23.6K bytes
    - Viewed (0)
  3. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 20.9K bytes
    - Viewed (0)
  4. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 21.4K bytes
    - Viewed (0)
  5. 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 Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 41.5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/collection/SLinkedList.java

         * @return the array
         */
        @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 Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/reflect/TypeResolver.java

          @Override
          void visitGenericArrayType(GenericArrayType fromArrayType) {
            if (to instanceof WildcardType) {
              return; // Okay to say A[] is <?>
            }
            Type componentType = Types.getComponentType(to);
            checkArgument(componentType != null, "%s is not an array type.", to);
            populateTypeMappings(mappings, fromArrayType.getGenericComponentType(), componentType);
          }
    
          @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 24.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/reflect/TypeResolver.java

          @Override
          void visitGenericArrayType(GenericArrayType fromArrayType) {
            if (to instanceof WildcardType) {
              return; // Okay to say A[] is <?>
            }
            Type componentType = Types.getComponentType(to);
            checkArgument(componentType != null, "%s is not an array type.", to);
            populateTypeMappings(mappings, fromArrayType.getGenericComponentType(), componentType);
          }
    
          @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 24.2K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

          return sample;
        }
        if (rawType.isEnum()) {
          return pickInstance(rawType.getEnumConstants(), null);
        }
        if (type.isArray()) {
          TypeToken<?> componentType = requireNonNull(type.getComponentType());
          Object array = Array.newInstance(componentType.getRawType(), 1);
          Array.set(array, 0, generate(componentType));
          return array;
        }
        Method emptyGenerate = EMPTY_GENERATORS.get(rawType);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 28.7K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/lang/ClassUtil.java

         */
        public static String getSimpleClassName(final Class<?> clazz) {
            assertArgumentNotNull("clazz", clazz);
    
            if (clazz.isArray()) {
                return getSimpleClassName(clazz.getComponentType()) + "[]";
            }
            return clazz.getName();
        }
    
        /**
         * Returns the resource path representation of the class name.
         *
         * @param clazz
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 25.6K bytes
    - Viewed (0)
Back to top