类 StringWrapper

java.lang.Object
com.palantir.javaformat.java.StringWrapper

public final class StringWrapper extends Object
Wraps string literals that exceed the column limit.
  • 字段详细资料

    • TEXT_BLOCK_DELIMITER

      public static final String TEXT_BLOCK_DELIMITER
      另请参阅:
    • STRING_CONCAT_DELIMITER

      public static final com.google.common.base.CharMatcher STRING_CONCAT_DELIMITER
  • 方法详细资料

    • getReflowReplacements

      public static com.google.common.collect.TreeRangeMap<Integer,String> getReflowReplacements(int columnLimit, String input) throws com.palantir.javaformat.java.FormatterException
      抛出:
      com.palantir.javaformat.java.FormatterException
    • linesNeedWrapping

      public static boolean linesNeedWrapping(int columnLimit, String input, com.google.common.collect.RangeSet<Integer> initialRangesToChange)
      Returns true if the lines containing the initialRangesToChange in the given Java source exceed the column limit or contain text blocks. Used by the Intellij plugin to check if we need to run StringWrapper.wrap. Keep this method and needWrapping in line.