Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 236 for getters (0.13 sec)

  1. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/reflect/ClassInspectorTest.groovy

        }
    
        def "ignores overridden property getters and setters"() {
            expect:
            def details = ClassInspector.inspect(Overrides)
    
            def prop = details.getProperty('prop')
            prop.getters.size() == 1
            prop.getters[0].declaringClass == Overrides
            prop.setters.size() == 1
            prop.setters[0].declaringClass == Overrides
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Nov 01 23:46:06 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/reflect/annotations/impl/DefaultTypeAnnotationMetadataStore.java

                // Do we have an 'is'-getter as well as a 'get'-getter?
                if (previouslySeenBuilder != null) {
                    // It is okay to have redundant generated 'is'-getters
                    if (generatedMethodDetector.test(metadataBuilder.getter)) {
                        continue;
                    }
                    // The 'is'-getter is ignored, we can skip it in favor of the 'get'-getter
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 06 21:54:36 UTC 2024
    - 37.6K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/InterfaceBackedManagedTypeIntegrationTest.groovy

            '''
    
            then:
            succeeds "echo"
    
            and:
            output.contains("name: Alan Turing")
        }
    
        def "generative getters implemented as default methods cannot call setters"() {
            when:
            file('buildSrc/src/main/java/Rules.java') << '''
                import org.gradle.api.*;
                import org.gradle.model.*;
    
                @Managed
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  4. platforms/documentation/docs/src/docs/userguide/troubleshooting/validation_problems.adoc

        x.set(123)
    }
    ```
    
    [[redundant_getters]]
    == Redundant getters
    
    This error indicates that a `boolean` property has both a `get` and an `is` getter method.
    This is a problem because both getters can be annotated differently and Gradle cannot know which ones to use.
    
    The solution to this problem is to get rid of one of the getters or to mark one of the getters with link:{javadocPath}/org/gradle/api/tasks/Internal.html[@Internal]
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Mar 23 22:37:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/compilerFacility/AbstractCompilerFacilityTest.kt

                )
            }
        }
    
        /**
         * This class recursively visits all calls of functions and getters, and if the function or the getter used for a call has
         * an annotation whose FqName is [annotationFqName], it runs [handleFunctionWithAnnotation] for the function or the getter.
         */
        private class CheckCallsWithAnnotationVisitor(
            private val annotationFqName: String,
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  6. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/reflect/validation/ValidationMessageCheckerTest.groovy

            }
    
            then:
            outputEquals """
    Type 'Person' property 'nice' has redundant getters: 'getNice()' and 'isNice()'.
    
    Reason: Boolean property 'nice' has both an `is` and a `get` getter.
    
    Possible solutions:
      1. Remove one of the getters.
      2. Annotate one of the getters with @Internal.
    
    ${validationMessage("redundant_getters")}
    """
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 25.5K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/testFixtures/groovy/org/gradle/internal/reflect/validation/ValidationMessageChecker.groovy

            config.description("has redundant getters: 'get${config.property.capitalize()}()' and 'is${config.property.capitalize()}()'")
                .reason("Boolean property '${config.property}' has both an `is` and a `get` getter")
                .solution("Remove one of the getters")
                .solution("Annotate one of the getters with @Internal")
                .render()
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 11:49:03 UTC 2024
    - 42.1K bytes
    - Viewed (0)
  8. platforms/extensibility/plugin-development/src/integTest/groovy/org/gradle/plugin/devel/tasks/AbstractPluginValidationIntegrationSpec.groovy

                    contextualLabel == 'Type \'MyTask\' property \'badTime\' is private and annotated with @Input'
                    details == 'Annotations on private getters are ignored'
                    solutions == [
                        'Make the getter public',
                        'Annotate the public version of the getter',
                    ]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 09:03:53 UTC 2024
    - 40.7K bytes
    - Viewed (0)
  9. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/manage/schema/extract/DefaultModelSchemaExtractorTest.groovy

        }
    
        @Managed
        interface HasSingleCharGetter {
            String getA()
            void setA(String a)
        }
    
        def "allow single char getters"() {
            when:
            def schema = store.getSchema(HasSingleCharGetter)
    
            then:
            schema instanceof ManagedImplSchema
            def a = schema.properties[0]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 29.9K bytes
    - Viewed (0)
  10. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/manage/binding/DefaultStructBindingsStoreTest.groovy

        def "should not allow 'is' as a prefix for getter on non boolean in #type"() {
            when: extract IsNotAllowedForOtherTypeThanBoolean
            then: def ex = thrown InvalidManagedTypeException
            ex.message == """Type ${fullyQualifiedNameOf(IsNotAllowedForOtherTypeThanBoolean)} is not a valid managed type:
    - Property 'thing' is not valid: it must both have an abstract getter and a setter"""
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 26.8K bytes
    - Viewed (0)
Back to top