@Override public Object getPropertyState( PropertyDescriptor propertyDescriptor ) { return propertyDescriptor.resolveInitialValue( module ); }
private <T> T getNumber( Preferences prefs, ModuleDescriptor module, PropertyDescriptor pDesc, NumberParser<T> parser ) { Object initialValue = pDesc.resolveInitialValue( module ); String str = prefs.get( pDesc.qualifiedName().name(), initialValue == null ? null : initialValue.toString() ); T result = null; if( str != null ) { result = parser.parse( str ); } return result; }
private <T> T getNumber( Preferences prefs, ModuleDescriptor module, PropertyDescriptor pDesc, NumberParser<T> parser ) { Object initialValue = pDesc.resolveInitialValue( module ); String str = prefs.get( pDesc.qualifiedName().name(), initialValue == null ? null : initialValue.toString() ); T result = null; if( str != null ) { result = parser.parse( str ); } return result; }
@Override public <T> TransientBuilder<T> newTransientBuilder( Class<T> mixinType ) throws NoSuchTransientTypeException { Objects.requireNonNull( mixinType, "mixinType" ); TransientDescriptor model = typeLookup.lookupTransientModel( mixinType ); if( model == null ) { throw new NoSuchTransientTypeException( mixinType.getName(), descriptor() ); } Map<AccessibleObject, Property<?>> properties = new HashMap<>(); model.state().properties().forEach( propertyModel -> { Object initialValue = propertyModel.resolveInitialValue( model.module() ); Property<?> property = new PropertyInstance<>( ( (PropertyModel) propertyModel ).getBuilderInfo(), initialValue ); properties.put( propertyModel.accessor(), property ); } ); TransientStateInstance state = new TransientStateInstance( properties ); return new TransientBuilderInstance<>( model, state, UsesInstance.EMPTY_USES ); }
return property.resolveInitialValue( module ); };
return property.resolveInitialValue( module ); };
return property.resolveInitialValue( module ); };
return property.resolveInitialValue( module ); };
if( value == null ) Object initialValue = propertyDescriptor.resolveInitialValue(module.descriptor()); if( initialValue != null )
Object initialValue = propertyDescriptor.resolveInitialValue( module ); properties.put( propertyDescriptor.qualifiedName(), initialValue ); status[ 0 ] = EntityStatus.UPDATED;
if( value == null ) Object initialValue = propertyDescriptor.resolveInitialValue(module.descriptor()); if( initialValue != null )
Boolean initialValue = (Boolean) persistentPropertyDescriptor.resolveInitialValue(module); properties.put( persistentPropertyDescriptor.qualifiedName(), propsPrefs.getBoolean( persistentPropertyDescriptor.qualifiedName().name(), if( string == null ) if( persistentPropertyDescriptor.resolveInitialValue( module ) != null ) persistentPropertyDescriptor.resolveInitialValue( module ) );
Boolean initialValue = (Boolean) persistentPropertyDescriptor.resolveInitialValue(module); properties.put( persistentPropertyDescriptor.qualifiedName(), propsPrefs.getBoolean( persistentPropertyDescriptor.qualifiedName().name(), if( string == null ) if( persistentPropertyDescriptor.resolveInitialValue( module ) != null ) persistentPropertyDescriptor.resolveInitialValue( module ) );
Object o = property.resolveInitialValue( module ); if( o == null )
Object o = property.resolveInitialValue( module ); if( o == null )
Object initialValue = property.resolveInitialValue( module ); properties.put( property.qualifiedName(), initialValue ); status[ 0 ] = EntityStatus.UPDATED;
Object initialValue = property.resolveInitialValue( module ); properties.put( property.qualifiedName(), initialValue ); status[ 0 ] = EntityStatus.UPDATED;