Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for JavaMethod (0.39 sec)

  1. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/reflect/JavaMethod.java

         */
        public static <T, R> JavaMethod<T, R> of(Class<R> returnType, Method method) throws NoSuchMethodException {
            return new JavaMethod<T, R>(returnType, method);
        }
    
        public JavaMethod(Class<T> target, Class<R> returnType, String name, boolean allowStatic, Class<?>... paramTypes) {
            this(returnType, findMethod(target, name, allowStatic, paramTypes));
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 20 11:07:38 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  2. testing/architecture-test/src/test/java/org/gradle/architecture/test/KotlinCompatibilityTest.java

            };
        }
    
        private static Map<String, List<Accessor>> findAccessors(Set<JavaMethod> methods) {
            return methods.stream().map(Accessor::from).filter(Objects::nonNull).collect(groupingBy(Accessor::getPropertyName));
        }
    
        private static class Accessor {
            private final PropertyAccessorType accessorType;
            private final JavaMethod method;
            private final boolean isGetter;
    
            @Nullable
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 9K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/reflect/JavaMethodTest.groovy

            expect:
            JavaMethod.ofStatic(myProperties.class, Void, "setStaticProperty", String.class).isStatic()
            JavaMethod.ofStatic(myProperties.class, String, "getStaticProperty").isStatic()
            !JavaMethod.of(myProperties.class, String, "getMyProperty").isStatic()
        }
    
        def "call failing methods reflectively"() {
            when:
            JavaMethod.of(myProperties.class, Void, "throwsException").invoke(myProperties)
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  4. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/service/ReflectionBasedServiceMethod.java

    import org.gradle.internal.reflect.JavaMethod;
    
    import javax.annotation.Nullable;
    import java.lang.reflect.Method;
    
    class ReflectionBasedServiceMethod extends AbstractServiceMethod {
        private final JavaMethod<Object, Object> javaMethod;
    
        ReflectionBasedServiceMethod(Method target) {
            super(target);
            javaMethod = JavaMethod.of(Object.class, target);
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Nov 17 11:08:22 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  5. testing/architecture-test/src/test/java/org/gradle/architecture/test/ProviderMigrationArchitectureTest.java

            }
    
            @Override
            public void check(JavaMethod javaMethod, ConditionEvents events) {
                boolean hasSetter = hasSetter(javaMethod);
                Class<?> expectedReturnType = hasSetter ? mutableType : immutableType;
                boolean satisfied = javaMethod.getRawReturnType().isAssignableTo(expectedReturnType);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  6. subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/AbstractOptionElement.java

            }
        }
    
        protected Object invokeMethod(Object object, Method method, Object... parameterValues) {
            final JavaMethod<Object, Object> javaMethod = JavaMethod.of(Object.class, method);
            return javaMethod.invoke(object, parameterValues);
        }
    
        @Override
        public String getOptionName() {
            return optionName;
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 14:17:21 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  7. subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/MethodOptionElement.java

    import org.gradle.api.provider.HasMultipleValues;
    import org.gradle.api.provider.Property;
    import org.gradle.api.tasks.options.Option;
    import org.gradle.internal.Cast;
    import org.gradle.internal.reflect.JavaMethod;
    import org.gradle.model.internal.type.ModelType;
    
    import java.io.File;
    import java.lang.reflect.Method;
    import java.lang.reflect.Type;
    
    public class MethodOptionElement {
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 11 11:28:20 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  8. subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/FieldOptionElement.java

    import org.gradle.api.provider.HasMultipleValues;
    import org.gradle.api.provider.Property;
    import org.gradle.api.tasks.options.Option;
    import org.gradle.internal.Cast;
    import org.gradle.internal.reflect.JavaMethod;
    import org.gradle.model.internal.type.ModelType;
    
    import java.io.File;
    import java.lang.reflect.Field;
    import java.lang.reflect.Method;
    import java.lang.reflect.Type;
    
    public class FieldOptionElement {
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 11 11:28:20 UTC 2023
    - 7K bytes
    - Viewed (0)
  9. platforms/jvm/testing-jvm-infrastructure/src/main/java/org/gradle/api/internal/tasks/testing/testng/TestNGListenerAdapterFactory.java

                T listenerCast = listenerType.cast(listener);
                JavaMethod<T, R> javaMethod = JavaMethod.of(listenerType, returnType, method.getName(), method.getParameterTypes());
                return javaMethod.invoke(listenerCast, args);
            }
    
            private boolean proxyEquals(Object proxy, Object other) {
                if (other == null) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 20:52:40 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  10. platforms/core-runtime/native/src/test/groovy/org/gradle/internal/nativeintegration/services/NativeServicesInitializationTest.groovy

                jar(Stoppable)
            ]
            ClassLoader classLoader = new URLClassLoader(jars, null as ClassLoader)
            Class nativeServicesClass = classLoader.loadClass(NativeServices.getName())
            JavaMethod nativeServicesGetInstance = JavaMethod.ofStatic(nativeServicesClass, nativeServicesClass, "getInstance")
    
            when:
            nativeServicesGetInstance.invokeStatic()
    
            then:
            def e = thrown(IllegalStateException)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 08:51:56 UTC 2024
    - 2.6K bytes
    - Viewed (0)
Back to top