Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.InvalidInjectionException


            {
                return factory.newInjectionProvider( resolution, dependencyModel );
            }
            else
            {
                throw new InvalidInjectionException( "Unknown injection annotation @" + injectionAnnotationType.getSimpleName() );
            }
        }
        ModelDescriptor composite = resolution.model();
        Class<?> compositeType = composite.type();
        if( factory1 != null && ValueComposite.class.isAssignableFrom( compositeType ) )
View Full Code Here


        }
        else if( UnitOfWork.class.isAssignableFrom( dependencyModel.rawInjectionType() ) )
        {
            if( !( resolution.model() instanceof EntityDescriptor ) )
            {
                throw new InvalidInjectionException( "Only EntityComposites can be injected with '@State UnitOfWork'" );
            }
            return new UnitOfWorkInjectionProvider();
        }
        else if( Property.class.isAssignableFrom( dependencyModel.rawInjectionType() ) )
        {
View Full Code Here

                    }
                }

                if( !ok )
                {
                    throw new InvalidInjectionException( "Composite " + bindingContext.model()
                        .type()
                        .getName() + " does not implement @This type " + thisType.getName() + " in fragment " + dependencyModel
                        .injectedClass()
                        .getName() );
                }
            }

            return new ThisInjectionProvider( thisType );
        }
        else
        {
            throw new InvalidInjectionException( "Object " + dependencyModel.injectedClass() + " may not use @This" );
        }
    }
View Full Code Here

        {
            return new InvocationDependencyResolution( resolution, dependencyModel );
        }
        else
        {
            throw new InvalidInjectionException( "Invalid injection type " + injectionClass + " in " + dependencyModel.injectedClass()
                .getName() );
        }
    }
View Full Code Here

            {
                serviceQualifier = qualifier.value().newInstance().qualifier( qualifierAnnotation );
            }
            catch( Exception e )
            {
                throw new InvalidInjectionException( "Could not instantiate qualifier serviceQualifier", e );
            }
        }

        if( dependencyModel.rawInjectionType().equals( Iterable.class ) )
        {
View Full Code Here

            {
                return new ModifiedInjectionProvider();
            }
            else
            {
                throw new InvalidInjectionException( "Composite " + bindingContext.model()
                    .type() + " does not implement @ConcernFor type " + type.getName() + " in modifier " + dependencyModel.injectedClass().getName() );
            }
        }
        else
        {
            throw new InvalidInjectionException( "The class " + dependencyModel.injectedClass()
                .getName() + " is not a modifier" );
        }
    }
View Full Code Here

            {
                return factory.newInjectionProvider( resolution, dependencyModel );
            }
            else
            {
                throw new InvalidInjectionException( "Unknown injection annotation @" + injectionAnnotationType.getSimpleName() );
            }
        }
        ModelDescriptor composite = resolution.model();
        Class<?> compositeType = first( composite.types() );
        if( factory1 != null && ValueComposite.class.isAssignableFrom( compositeType ) )
View Full Code Here

        }
        else if( UnitOfWork.class.isAssignableFrom( dependencyModel.rawInjectionType() ) )
        {
            if( !( resolution.model() instanceof EntityDescriptor ) )
            {
                throw new InvalidInjectionException( "Only EntityComposites can be injected with '@State UnitOfWork'" );
            }
            return new UnitOfWorkInjectionProvider();
        }
        else if( Property.class.isAssignableFrom( dependencyModel.rawInjectionType() ) )
        {
View Full Code Here

                    }
                }

                if( injectionTypes == null )
                {
                    throw new InvalidInjectionException( "Composite " + bindingContext.model()
                                                         + " does not implement @This type " + thisType.getName() + " in fragment "
                                                         + dependencyModel.injectedClass().getName() );
                }
            }

            return new ThisInjectionProvider( injectionTypes );
        }
        else
        {
            throw new InvalidInjectionException( "Object " + dependencyModel.injectedClass() + " may not use @This" );
        }
    }
View Full Code Here

            return new InvocationDependencyResolution( resolution, dependencyModel );
        }
        else
        {
            String injectedTo = dependencyModel.injectedClass().getName();
            throw new InvalidInjectionException( "Invalid injection type " + injectionClass + " in " + injectedTo );
        }
    }
View Full Code Here

TOP

Related Classes of org.qi4j.bootstrap.InvalidInjectionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.