Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for ObjectInstantiationException (0.55 sec)

  1. platforms/core-runtime/base-services/src/main/java/org/gradle/api/reflect/ObjectInstantiationException.java

    import org.gradle.internal.exceptions.Contextual;
    
    /**
     * Thrown when an object cannot be instantiated.
     *
     * @since 4.2
     */
    @Contextual
    public class ObjectInstantiationException extends RuntimeException {
        public ObjectInstantiationException(Class<?> targetType, Throwable throwable) {
            super(String.format("Could not create an instance of type %s.", targetType.getName()), throwable);
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/instantiation/generator/DependencyInjectingInstantiatorTest.groovy

            ObjectInstantiationException e = thrown()
            e.cause instanceof IllegalArgumentException
            e.cause.message == "Unable to determine constructor argument #1: value 12 is not assignable to type String, or no service of type String."
        }
    
        def "fails on non-static inner class"() {
            when:
            instantiator.newInstance(NonStatic, "param")
    
            then:
            ObjectInstantiationException e = thrown()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Mar 19 04:41:06 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/reflect/Instantiator.java

        /**
         * Create a new instance of T, using {@code parameters} as the construction parameters.
         *
         * @throws ObjectInstantiationException On failure to create the new instance.
         */
        <T> T newInstance(Class<? extends T> type, Object... parameters) throws ObjectInstantiationException;
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/generator/DefaultInstantiationScheme.java

                } catch (InvocationTargetException e) {
                    throw new ObjectInstantiationException(implType, e.getCause());
                } catch (Exception e) {
                    throw new ObjectInstantiationException(implType, e);
                }
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  5. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/instantiation/generator/DependencyInjectionUsingLenientConstructorSelectorTest.groovy

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package org.gradle.internal.instantiation.generator
    
    import org.gradle.api.reflect.ObjectInstantiationException
    import org.gradle.internal.service.ServiceLookup
    import org.gradle.util.internal.TextUtil
    import spock.lang.Specification
    
    class DependencyInjectionUsingLenientConstructorSelectorTest extends Specification {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 8K bytes
    - Viewed (0)
  6. platforms/software/dependency-management/src/main/java/org/gradle/internal/resolve/caching/ImplicitInputsCapturingInstantiator.java

            return factory.inject(serviceRegistry).newInstance(type, parameters);
        }
    
        public Instantiator capturing(final ImplicitInputRecorder registrar) {
            return new Instantiator() {
                @Override
                public <T> T newInstance(Class<? extends T> type, Object... parameters) throws ObjectInstantiationException {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Nov 17 11:08:22 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/DeserializationInstantiator.java

    import org.gradle.api.reflect.ObjectInstantiationException;
    
    /**
     * Creates instance of objects in preparation for deserialization of their state.
     */
    public interface DeserializationInstantiator {
        /**
         * Creates an instance of the given type without invoking its constructor. Invokes the constructor of the given base class.
         *
         * @throws ObjectInstantiationException On failure to create the new instance.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. subprojects/core/src/main/java/org/gradle/api/internal/plugins/PluginInstantiator.java

     * limitations under the License.
     */
    
    package org.gradle.api.internal.plugins;
    
    import org.gradle.api.NonNullApi;
    import org.gradle.api.reflect.ObjectInstantiationException;
    import org.gradle.internal.reflect.Instantiator;
    
    import java.lang.reflect.Modifier;
    
    /**
     * An instantiator that uses the correct instantiation scheme depending on the plugin type.  This allows
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:42:35 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  9. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/instantiation/InstanceGenerator.java

         *
         * @throws ObjectInstantiationException On failure to create the new instance.
         */
        <T> T newInstanceWithDisplayName(Class<? extends T> type, Describable displayName, Object... parameters) throws ObjectInstantiationException;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Mar 12 02:21:10 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/reflect/DirectInstantiator.java

                }
                return type.cast(match.newInstance(params));
            } catch (InvocationTargetException e) {
                throw new ObjectInstantiationException(type, e.getCause());
            } catch (Throwable t) {
                throw new ObjectInstantiationException(type, t);
            }
        }
    
        private Class<?>[] wrapArgs(Object[] params) {
            Class<?>[] result = new Class<?>[params.length];
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 5.9K bytes
    - Viewed (0)
Back to top