Package org.qi4j.runtime.value

Examples of org.qi4j.runtime.value.ValueInstance


        return EntityInstance.getEntityInstance( composite ).state();
    }

    public ValueDescriptor getValueDescriptor( ValueComposite value )
    {
        ValueInstance valueInstance = ValueInstance.getValueInstance( value );
        return valueInstance.descriptor();
    }
View Full Code Here


    @Override
    public ValueDescriptor valueDescriptorFor( Object value )
    {
        if( value instanceof ValueComposite )
        {
            ValueInstance valueInstance = ValueInstance.valueInstanceOf( (ValueComposite) value );
            return valueInstance.descriptor();
        }
        throw new IllegalArgumentException( "Wrong type. Must be subtype of " + ValueComposite.class );
    }
View Full Code Here

    @SuppressWarnings( "unchecked" )
    public <T> ValueBuilder<T> newValueBuilderWithPrototype( T prototype )
    {
        NullArgumentException.validateNotNull( "prototype", prototype );

        ValueInstance valueInstance = ValueInstance.valueInstanceOf( (ValueComposite) prototype );
        Class<Composite> valueType = (Class<Composite>) first( valueInstance.types() );

        ModelModule<ValueModel> modelModule = typeLookup.lookupValueModel( valueType );

        if( modelModule == null )
        {
View Full Code Here

TOP

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

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.