bson/src/main/org/bson/codecs/pojo/PropertyModelBuilder.java
@SuppressWarnings({"rawtypes", "unchecked"})
    public PropertyModel<T> build() {
        if (!isReadable() && !isWritable()) {
            throw new IllegalStateException(format("Invalid PropertyModel '%s', neither readable or writable,", name));
        }
        return new PropertyModel(
                stateNotNull("propertyName", name),
                readName,
                writeName,
                stateNotNull("typeData", typeData),
                codec,
                stateNotNull("propertySerialization", propertySerialization),
                discriminatorEnabled,
                stateNotNull("propertyAccessor", propertyAccessor));
    }
@SuppressWarnings({"rawtypes", "unchecked"})
    public PropertyModel<T> build() {
        if (!isReadable() && !isWritable()) {
            throw new IllegalStateException(format("Invalid PropertyModel '%s', neither readable or writable,", name));
        }
        return new PropertyModel(
                stateNotNull("propertyName", name),
                readName,
                writeName,
                stateNotNull("typeData", typeData),
                codec,
                stateNotNull("propertySerialization", propertySerialization),
                discriminatorEnabled,
                stateNotNull("propertyAccessor", propertyAccessor));
    }
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public PropertyModel < T > build ( ) { if ( ! isReadable ( ) && ! isWritable ( ) ) { throw new IllegalStateException ( format ( "Invalid PropertyModel '%s', neither readable or writable," , name ) ) ; } return new PropertyModel ( stateNotNull ( "propertyName" , name ) , readName , writeName , stateNotNull ( "typeData" , typeData ) , codec , stateNotNull ( "propertySerialization" , propertySerialization ) , discriminatorEnabled , stateNotNull ( "propertyAccessor" , propertyAccessor ) ) ; }
Creates the {@link PropertyModel}.

@return the PropertyModel
Creates the { @link PropertyModel } .