code: public static ReferenceValueFactory newInstance( TextDecoder decoder,
                                                       ValueFactories factories,
                                                       boolean weak,
                                                       boolean simple ) {
          if (simple) {
              return new ReferenceValueFactory(PropertyType.SIMPLEREFERENCE, decoder, factories, weak, simple);
          }
          return new ReferenceValueFactory(weak ? PropertyType.WEAKREFERENCE : PropertyType.REFERENCE, decoder, factories, weak,
                                           simple);
      }
docs: Create a new instance.
  
  @param decoder the text decoder; may be null if the default decoder should be used
  @param factories the set of value factories, used to obtain the {@link ValueFactories#getStringFactory() string value
  factory}; may not be null
  @param weak true if this factory should create weak references, or false if it should create strong references
  @param simple true if this factory should create simple references, false otherwise
  @return the new reference factory; never null