• Nate Fischer's avatar
    Docs: fix documentation for java_cpp_strings · 93203246
    Nate Fischer authored
    No change to logic, only docs.
    
    This fixes several mistakes in the java_cpp_strings docs:
     * Do not need GENERATED_JAVA_PACKAGE
     * {NATIVE_STRINGS}, not {NATIVE_SWITCHES}
     * Do not need "This file is autogenerated..." boilerplate in the
       template
     * Consistent package name between template and generated file
     * Consistent class name between template and generated file
     * Change {YEAR} to $YEAR, as this must not be left templated, but
       should be filled in by the author
    
    This also adds some more opinionated changes:
     * Mark the class as "public final" not "public abstract" and mark the
       constructor private, as this is a more robust way to mark the class
       as non-instantiable
     * Include the boilerplate "This following string constants..." [sic]
       message in the generated file, as that's what the script inserts.
     * Use more realistic file names (foo_switches.cc and FooSwitches.java).
     * Add javadoc for the template file, as a suggestion for others to
       document the generated class.
    
    Bug: 1011991
    Test: tools/md_browser/md_browser.py
    Test: Upload to gerrit > open file > click "gitiles"
    Change-Id: Ia1aa96cf50842bf226f35440fd2cafe8a186f8b5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863866Reviewed-by: default avatarIan Vollick <vollick@chromium.org>
    Commit-Queue: Nate Fischer <ntfschr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#706456}
    93203246
android_accessing_cpp_switches_in_java.md 2.68 KB