Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for GeneratedConstructor (0.23 sec)

  1. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/instantiation/generator/ConstructorComparatorTest.groovy

            first.parameterTypes >> [String]
            def second = Stub(ClassGenerator.GeneratedConstructor)
            second.parameterTypes >> [String, Boolean]
            def third = Stub(ClassGenerator.GeneratedConstructor)
            third.parameterTypes >> [String, Number, Boolean]
    
            def list = [second, third, first]
            expect:
            list.sort(false, comparator) == [first, second, third]
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/Jsr330ConstructorSelector.java

                    validateType(type);
                    ClassGenerator.GeneratedClass<?> implClass = classGenerator.generate(type);
                    ClassGenerator.GeneratedConstructor<?> generatedConstructor = InjectUtil.selectConstructor(implClass, type);
                    return CachedConstructor.of(generatedConstructor);
                } catch (RuntimeException e) {
                    return CachedConstructor.of(e);
                }
            });
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 29 07:52:37 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/ParamsMatchingConstructorSelector.java

            this.classGenerator = classGenerator;
        }
    
        @Override
        public void vetoParameters(ClassGenerator.GeneratedConstructor<?> constructor, Object[] parameters) {
            // Don't care
        }
    
        @Override
        public <T> ClassGenerator.GeneratedConstructor<? extends T> forType(Class<T> type) throws UnsupportedOperationException {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/ConstructorComparator.java

     * types of the parameters.
     *
     */
    public class ConstructorComparator implements Comparator<ClassGenerator.GeneratedConstructor<?>> {
        @Override
        public int compare(ClassGenerator.GeneratedConstructor<?> o1, ClassGenerator.GeneratedConstructor<?> o2) {
            int parameterSort = Integer.compare(o1.getParameterTypes().length, o2.getParameterTypes().length);
            if (parameterSort == 0) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  5. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/InjectUtil.java

         */
        public static <T> ClassGenerator.GeneratedConstructor<T> selectConstructor(ClassGenerator.GeneratedClass<T> type, Class<?> reportAs) {
            List<ClassGenerator.GeneratedConstructor<T>> constructors = type.getConstructors();
    
            if (constructors.size() == 1) {
                ClassGenerator.GeneratedConstructor<T> constructor = constructors.get(0);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  6. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/instantiation/generator/IdentityClassGenerator.java

                }
    
                @Override
                public List<GeneratedConstructor<T>> getConstructors() {
                    List<GeneratedConstructor<T>> constructors = new ArrayList<GeneratedConstructor<T>>();
                    for (final Constructor<?> constructor : type.getDeclaredConstructors()) {
                        constructors.add(new GeneratedConstructor<T>() {
                            @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/ClassGenerator.java

            /**
             * Returns the enclosing type, when this type is a non-static inner class.
             */
            @Nullable
            Class<?> getOuterType();
    
            List<GeneratedConstructor<T>> getConstructors();
    
            /**
             * Creates a serialization constructor. Note: this can be expensive and does not perform any caching.
             */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  8. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/ConstructorSelector.java

         */
        <T> ClassGenerator.GeneratedConstructor<? extends T> forParams(Class<T> type, Object[] params);
    
        /**
         * Locates the constructor that should be used to create instances of the given type.
         *
         * @throws UnsupportedOperationException When this selector requires the parameters in order to select a constructor.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/DependencyInjectingInstantiator.java

        }
    
        @Nonnull
        private <T> T doCreate(Class<? extends T> type, @Nullable Describable displayName, Object[] parameters) {
            try {
                ClassGenerator.GeneratedConstructor<? extends T> constructor = constructorSelector.forParams(type, parameters);
                Object[] resolvedParameters = convertParameters(type, constructor, services, parameters);
                try {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  10. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/AbstractClassGenerator.java

            private final Class<?> outerType;
            private final List<Class<?>> injectedServices;
            private final List<Class<? extends Annotation>> annotationsTriggeringServiceInjection;
            private final List<GeneratedConstructor<Object>> constructors;
    
            public GeneratedClassImpl(Class<?> generatedClass, @Nullable Class<?> outerType, List<Class<?>> injectedServices, List<Class<? extends Annotation>> annotationsTriggeringServiceInjection) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 06 21:54:37 UTC 2024
    - 63K bytes
    - Viewed (0)
Back to top