<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      I'm not sure what you mean with 'combine'. You can mix Java API
      and read from config too e.g. via<br>
      <br>
      graphHopper.init(CmdArgs.readFromConfig(..))<br>
      graphHopper.setEncodingManager(new YourFlagEncoder(), new
      CarFlagEncoder(), ...)<br>
      <br>
      > Could you elaborate a little bit more about the portability
      reason? I am new to reflection.<br>
      <br>
      It is just that we want to support JavaScript (TeaVM) and iOS, and
      for them we need to avoid some stuff.<br>
      <br>
      Kind Regards,<br>
      Peter<br>
      <br>
      On 28.05.2015 20:49, John Zhao wrote:<br>
    </div>
    <blockquote
cite="mid:CA+EBg9R007NykUMd2cixSo=agAP1ZZA4j8jd=_0yhyyHhnkdKw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Peter,
        <div><br>
        </div>
        <div>I want to keep the compatibility of combine the existing
          flagEncoder with my customized flagEncoder.</div>
        <div>And intialize them from the properties file.</div>
        <div><br>
        </div>
        <div>Could you elaborate a little bit more about the portability
          reason?</div>
        <div>I am new to reflection.</div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div class="gmail_signature"><b>Best Regards,</b>
            <div><b>ZhiQiang ZHAO</b></div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">On Thu, May 28, 2015 at 11:44 AM, Peter
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:graphhopper@gmx.de" target="_blank">graphhopper@gmx.de</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Hi John,<br>
                <br>
                if you have a custom flagencoder why not just call<br>
                new EncodingManager(new YourFlagEncoder()) ?<br>
                <br>
                Reflections was abandoned due to portability reasons but
                also it is not really necessary here, especially as you
                use it as a library and you have a custom flag encoder
                anyway.<br>
                <br>
                Regards,<br>
                Peter
                <div>
                  <div class="h5"><br>
                    <br>
                    On 28.05.2015 20:14, John Zhao wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">Hi,
                      <div><br>
                      </div>
                      <div>I have a project which use GH as a library.</div>
                      <div>I have implemented my own flag encoder, like
                        xxxFlagEncoder.</div>
                      <div>I don't figure out a good way to initialize
                        it, except to change the EncodingManger to
                        insert xxxFlagEncoder on parseEncoderString().</div>
                      <div>I think it's better the change the way
                        EncodingManger initialize all the flagEncoders.</div>
                      <div>EncodingManger can use reflection to find the
                        class or flagEncoder from its name, if we
                        standardize the name and toString method.</div>
                      <div><br>
                      </div>
                      <div>Do you think it's a good idea, or there is a
                        better way? </div>
                      <br>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>