Package org.qi4j.runtime.value

Examples of org.qi4j.runtime.value.ValueModel


            }
        }
        else if( ValueCompositeType.isValueComposite( type ) )
        {
            // Find ValueModel in module/layer/used layers
            ValueModel model = new ValueFinder(layer, module, Classes.RAW_CLASS.map( type )).getFoundModel();

            if (model == null)
            {
                if (type.equals( ValueComposite.class ))
                {
                    // Create default model
                    MixinsModel mixinsModel = new MixinsModel();
                    model = new ValueModel( ValueComposite.class, (Iterable) Iterables.iterable(ValueComposite.class), Visibility.application, new MetaInfo( ), mixinsModel, new ValueStateModel( new PropertiesModel(), new AssociationsModel(), new ManyAssociationsModel() ), new CompositeMethodsModel( mixinsModel ) );
                } else
                    throw new InvalidApplicationException("["+module.name()+"] Could not find ValueComposite of type "+type);
            }

            return model.valueType();
        }
        else if( EnumType.isEnum( type ) )
        {
            valueType = new EnumType( Classes.RAW_CLASS.map(type)  );
        }else
View Full Code Here


                return true;
            else if (visited instanceof UsedLayersModel )
                return true;
            else if (visited instanceof ValueModel )
            {
                ValueModel valueModel = (ValueModel) visited;
                if (valueModel.type().equals( type ) && valueModel.visibility().ordinal() >= visibility.ordinal())
                {
                    foundModel = valueModel;
                }
            }
View Full Code Here

            }

            // Add state from methods and fields
            addState(constraintClasses);

            ValueModel valueModel = new ValueModel(
                compositeType, Iterables.prepend(compositeType, types), visibility, metaInfo, mixinsModel, (ValueStateModel) stateModel, compositeMethodsModel );

            return valueModel;
        }
        catch( Exception e )
View Full Code Here

            associationsModel = new AssociationsModel();
            manyAssociationsModel = new ManyAssociationsModel();
            namedAssociationsModel = new NamedAssociationsModel();
            buildComposite( helper, stateDeclarations );

            ValueModel valueModel = new ValueModel(
                types, visibility, metaInfo, mixinsModel, (ValueStateModel) stateModel, compositeMethodsModel );

            return valueModel;
        }
        catch( Exception e )
View Full Code Here

            }
        }
        else if( ValueCompositeType.isValueComposite( type ) )
        {
            // Find ValueModel in module/layer/used layers
            ValueModel model = new ValueFinder( layer, module, Classes.RAW_CLASS.map( type ) ).getFoundModel();

            if( model == null )
            {
                if( type.equals( ValueComposite.class ) )
                {
                    // Create default model
                    MixinsModel mixinsModel = new MixinsModel();
                    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 );
                }
            }

            return model.valueType();
        }
        else if( EnumType.isEnum( type ) )
        {
            valueType = new EnumType( Classes.RAW_CLASS.map( type ) );
        }
View Full Code Here

            {
                return true;
            }
            else if( visited instanceof ValueModel )
            {
                ValueModel valueModel = (ValueModel) visited;
                boolean typeEquality = Specifications.in( valueModel.types() ).satisfiedBy( type );
                if( typeEquality && valueModel.visibility().ordinal() >= visibility.ordinal() )
                {
                    foundModel = valueModel;
                }
            }
View Full Code Here

TOP

Related Classes of org.qi4j.runtime.value.ValueModel

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.