Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 28 of 28 for getDeclaredField (0.12 sec)

  1. android/guava/src/com/google/common/collect/Serialization.java

          }
        }
      }
    
      // Secret sauce for setting final fields; don't make it public.
      static <T> FieldSetter<T> getFieldSetter(Class<T> clazz, String fieldName) {
        try {
          Field field = clazz.getDeclaredField(fieldName);
          return new FieldSetter<>(field);
        } catch (NoSuchFieldException e) {
          throw new AssertionError(e); // programmer error
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 06 16:06:58 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/lang/ClassUtil.java

         *             指定された名前のフィールドが見つからない場合
         * @see Class#getDeclaredField(String)
         */
        public static Field getDeclaredField(final Class<?> clazz, final String name) throws NoSuchFieldRuntimeException {
            assertArgumentNotNull("clazz", clazz);
            assertArgumentNotEmpty("name", name);
    
            try {
                return clazz.getDeclaredField(name);
            } catch (final NoSuchFieldException e) {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  3. okhttp/src/main/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)
        } catch (_: NoSuchFieldException) {
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/reflect/TypeTokenTest.java

          Bar<T> delegate;
    
          TypeToken<SubBar<T>> fieldTypeAsSubBar() {
            return new TypeToken<SubBar<T>>() {};
          }
        }
    
        Field delegateField = SubBar.class.getDeclaredField("delegate");
        // barType is Bar<T>, a ParameterizedType with no generic arguments specified
        TypeToken<?> barType = TypeToken.of(delegateField.getGenericType());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 21:13:09 UTC 2024
    - 89.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/reflect/TypeTokenTest.java

          Bar<T> delegate;
    
          TypeToken<SubBar<T>> fieldTypeAsSubBar() {
            return new TypeToken<SubBar<T>>() {};
          }
        }
    
        Field delegateField = SubBar.class.getDeclaredField("delegate");
        // barType is Bar<T>, a ParameterizedType with no generic arguments specified
        TypeToken<?> barType = TypeToken.of(delegateField.getGenericType());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 21:13:09 UTC 2024
    - 89.1K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

        static {
          try {
            UNSAFE = getUnsafe();
            HEAD_OFFSET = UNSAFE.objectFieldOffset(ExecutionListCAS.class.getDeclaredField("head"));
          } catch (Exception ex) {
            throw new Error(ex);
          }
        }
    
        /** TODO(lukes): This was copied verbatim from Striped64.java... standardize this? */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/fess/crawler/transformer/FessXpathTransformerTest.java

        }
    
        private void setValueToObject(Object obj, String name, Object value) {
            Field field = ClassUtil.getDeclaredField(obj.getClass(), name);
            field.setAccessible(true);
            FieldUtil.set(field, obj, value);
        }
    
        public void test_pruneNode() throws Exception {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Oct 24 13:01:38 UTC 2024
    - 41.3K bytes
    - Viewed (0)
  8. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java

                        org.apache.maven.api.model.InputSource v4src = loc != null ? loc.getSource() : null;
                        if (v4src != null) {
                            Field field = InputSource.class.getDeclaredField("modelId");
                            field.setAccessible(true);
                            field.set(v4src, ModelProblemUtils.toId(model));
                        }
                    } catch (Throwable t) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 83.6K bytes
    - Viewed (0)
Back to top