Examples of InvalidCompositeException


Examples of org.qi4j.api.composite.InvalidCompositeException

            try
            {
                proxyConstructor = proxyClass.getConstructor( InvocationHandler.class );
            } catch( NoSuchMethodException e )
            {
                throw (InvalidCompositeException) new InvalidCompositeException( "Could not get proxy constructor").initCause( e );
            }
            proxyConstructor.setAccessible( true );
        } else
        {
            try
            {
                proxyClass = new TransientClassLoader( getClass().getClassLoader() ).loadFragmentClass( type );
                proxyConstructor = (Constructor<? extends Composite>) proxyClass.getConstructors()[0];
            } catch( ClassNotFoundException e )
            {
                throw (InvalidCompositeException) new InvalidCompositeException( "Could not get proxy constructor").initCause( e );
            }
        }
    }
View Full Code Here

Examples of org.qi4j.api.composite.InvalidCompositeException

        if( mixinClass != null )
        {
            return implementMethodWithClass( method, mixinClass );
        }

        throw new InvalidCompositeException( "No implementation found for method " + method.toGenericString() + " in " + compositeType.getName() );
    }
View Full Code Here

Examples of org.qi4j.api.composite.InvalidCompositeException

                CompositeConstraintModel compositeConstraintModel = new CompositeConstraintModel( constraintAnnotation, valueConstraintsModel );
                constraintModels.add( compositeConstraintModel );
                continue nextConstraint;
            }

            throw new InvalidCompositeException( "Cannot find implementation of constraint @" + constraintAnnotation.annotationType().getSimpleName() + " for " + valueType + " in method "+((Member)accessor).getName()+" of composite " + compositeType );
        }

        return new ValueConstraintsModel( constraintModels, name, optional );
    }
View Full Code Here

Examples of org.qi4j.api.composite.InvalidCompositeException

        }
        catch( Throwable e )
        {
            if( fragment == null )
            {
                throw new InvalidCompositeException("No fragment available for method "+method.getName());
            }
            throw cleanStackTrace( e, proxy, method );
        }
    }
View Full Code Here

Examples of org.qi4j.api.composite.InvalidCompositeException

        if( mixinClass != null )
        {
            return implementMethodWithClass( method, mixinClass );
        }

        throw new InvalidCompositeException( "No implementation found for method \n    " + method.toGenericString()
                                             + "\nin\n    " + types );
    }
View Full Code Here

Examples of org.qi4j.api.composite.InvalidCompositeException

                    valueConstraintsModel );
                constraintModels.add( compositeConstraintModel );
                continue nextConstraint;
            }

            throw new InvalidCompositeException(
                "Cannot find implementation of constraint @"
                + annotationType.getSimpleName()
                + " for "
                + valueType
                + " in method "
View Full Code Here

Examples of org.qi4j.api.composite.InvalidCompositeException

            {
                proxyConstructor = proxyClass.getConstructor( InvocationHandler.class );
            }
            catch( NoSuchMethodException e )
            {
                throw (InvalidCompositeException) new InvalidCompositeException( "Could not get proxy constructor" ).initCause( e );
            }
            proxyConstructor.setAccessible( true );
        }
        else
        {
            try
            {
                proxyClass = new TransientClassLoader( getClass().getClassLoader() ).loadFragmentClass( mainType );
                proxyConstructor = (Constructor<? extends Composite>) proxyClass.getConstructors()[ 0 ];
            }
            catch( ClassNotFoundException e )
            {
                throw (InvalidCompositeException) new InvalidCompositeException( "Could not get proxy constructor" ).initCause( e );
            }
        }
    }
View Full Code Here

Examples of org.qi4j.api.composite.InvalidCompositeException

        }
        if( Modifier.isStatic( fragmentClass.getModifiers() ) )
        {
            return;
        }
        throw new InvalidCompositeException( "Inner classes can not be used. Use static nested classes instead: " + fragmentClass );
    }
View Full Code Here

Examples of org.qi4j.api.composite.InvalidCompositeException

        }
        catch( Throwable e )
        {
            if( fragment == null )
            {
                throw new InvalidCompositeException( "No fragment available for method " + method.getName() );
            }
            throw cleanStackTrace( e, proxy, method );
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.