Package org.qi4j.api.common

Examples of org.qi4j.api.common.MetaInfo


        ValueConstraintsInstance namedValueConstraintsInstance = null;
        if( valueConstraintsModel.isConstrained() )
        {
            namedValueConstraintsInstance = valueConstraintsModel.newInstance();
        }
        MetaInfo metaInfo = namedAssociationDeclarations.metaInfoFor( accessor );
        NamedAssociationModel associationModel = new NamedAssociationModel( accessor, valueConstraintsInstance, namedValueConstraintsInstance, metaInfo );
        return associationModel;
    }
View Full Code Here


                    Iterable valueComposite = (Iterable) Iterables.iterable( ValueComposite.class );
                    ValueStateModel valueStateModel = new ValueStateModel( new PropertiesModel(),
                                                                           new AssociationsModel(),
                                                                           new ManyAssociationsModel(),
                                                                           new NamedAssociationsModel() );
                    model = new ValueModel( valueComposite, Visibility.application, new MetaInfo(),
                                            mixinsModel, valueStateModel, new CompositeMethodsModel( mixinsModel ) );
                }
                else
                {
                    throw new InvalidApplicationException( "[" + module.name() + "] Could not find ValueComposite of type " + type );
View Full Code Here

            ImportedServiceModel serviceModel = new ImportedServiceModel( serviceType,
                                                                          visibility,
                                                                          serviceProvider,
                                                                          id,
                                                                          importOnStartup,
                                                                          new MetaInfo( metaInfo ).withAnnotations( serviceType ),
                                                                          new ActivatorsModel( activators ),
                                                                          moduleAssembly.name() );
            serviceModels.add( serviceModel );
        }
        catch( Exception e )
View Full Code Here

    public MetaInfo metaInfoFor( AccessibleObject accessor )
    {
        for( Map.Entry<Class<?>, InfoHolder<?>> entry : mixinPropertyDeclarations.entrySet() )
        {
            InfoHolder<?> holder = entry.getValue();
            MetaInfo metaInfo = holder.metaInfoFor( accessor );
            if( metaInfo != null )
            {
                Class<?> mixinType = entry.getKey();
                return metaInfo.withAnnotations( mixinType )
                    .withAnnotations( accessor )
                    .withAnnotations( accessor instanceof Method ? ( (Method) accessor ).getReturnType() : ( (Field) accessor )
                        .getType() );
            }
        }
        // TODO is this code reached at all??
        Class<?> declaringType = ( (Member) accessor ).getDeclaringClass();
        return new MetaInfo().withAnnotations( declaringType )
            .withAnnotations( accessor )
            .withAnnotations( accessor instanceof Method ? ( (Method) accessor ).getReturnType() : ( (Field) accessor ).getType() );
    }
View Full Code Here

        @Override
        public MixinDeclaration<T> setMetaInfo( Object info )
        {
            if( metaInfo == null )
            {
                metaInfo = new MetaInfo();
            }
            metaInfo.set( info );
            return this;
        }
View Full Code Here

            }
            if( !found )
            {
                @SuppressWarnings( "raw" )
                Class<? extends ServiceImporter> serviceFactoryType = importedServiceModel.serviceImporter();
                ObjectModel objectModel = new ObjectModel( serviceFactoryType, Visibility.module, new MetaInfo() );
                objectModels.add( objectModel );
            }
        }

        return moduleModel;
View Full Code Here

    @Override
    public ApplicationInstance newInstance( Qi4j runtime, Object... importedServiceInstances )
        throws InvalidApplicationException
    {
        MetaInfo instanceMetaInfo = new MetaInfo( metaInfo );
        for( Object importedServiceInstance : importedServiceInstances )
        {
            instanceMetaInfo.set( importedServiceInstance );
        }

        ApplicationInstance applicationInstance = new ApplicationInstance( this, (Qi4jRuntime) runtime, instanceMetaInfo );

        // Create layer instances
View Full Code Here

TOP

Related Classes of org.qi4j.api.common.MetaInfo

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.