Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ServiceValidationException (0.5 sec)

  1. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/service/ServiceValidationException.java

     * limitations under the License.
     */
    
    package org.gradle.internal.service;
    
    /**
     * Thrown when there is some validation problem with a service.
     */
    public class ServiceValidationException extends ServiceLookupException {
        public ServiceValidationException(String message) {
            super(message);
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 888 bytes
    - Viewed (0)
  2. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/service/AccessModifierDefaultServiceRegistryTest.groovy

            def registry = new DefaultServiceRegistry()
            registry.register {
                it.add(ModifierStubs.PackagePrivateConstructorWithPrivateConstructor)
            }
            then:
            def exception = thrown(ServiceValidationException)
            exception.message.contains("Expected a single non-private constructor, or one constructor annotated with @Inject for")
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 4K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/service/InjectUtil.java

         */
        static Constructor<?> selectConstructor(final Class<?> type) {
            if (isInnerClass(type)) {
                // The DI system doesn't support injecting non-static inner classes.
                throw new ServiceValidationException(
                    String.format(
                        "Unable to select constructor for non-static inner class %s.",
                        format(type)
                    )
                );
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 4K bytes
    - Viewed (0)
  4. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/service/RelevantMethods.java

                    if (method.getAnnotation(Provides.class) == null) {
                        throw new ServiceValidationException(String.format("Method %s.%s() must be annotated with @Provides.", type.getName(), method.getName()));
                    }
                    if (method.getReturnType().equals(Void.TYPE)) {
                        throw new ServiceValidationException(String.format("Method %s.%s() must not return void.", type.getName(), method.getName()));
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 27 12:53:25 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  5. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/service/DefaultServiceRegistry.java

                throw new ServiceValidationException("Locating services with array type is not supported.");
            }
            if (serviceClass.isAnnotation()) {
                throw new ServiceValidationException("Locating services with annotation type is not supported.");
            }
            if (serviceClass == Object.class) {
                throw new ServiceValidationException("Locating services with type Object is not supported.");
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 29 06:47:40 UTC 2024
    - 53.3K bytes
    - Viewed (0)
  6. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/service/DefaultServiceRegistryTest.groovy

        }
    
        def "does not support querying for Object.class"() {
            def registry = new DefaultServiceRegistry()
            when:
            registry.get(Object)
    
            then:
            ServiceValidationException e = thrown()
            e.message == "Locating services with type Object is not supported."
        }
    
        def createsInstanceOfServiceImplementation() {
            def registry = new DefaultServiceRegistry()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 27 12:53:25 UTC 2024
    - 59.8K bytes
    - Viewed (0)
Back to top