类 OpenOp
java.lang.Object
com.palantir.javaformat.doc.HasUniqueId
com.palantir.javaformat.OpenOp
- 所有已实现的接口:
Op
An
OpenOp opens a level. It is an Op in the sequence of Ops generated by OpsBuilder.
When the sequence is turned into a Doc by DocBuilder, Input.Toks delimited by
OpenOp-CloseOp pairs turn into nested Levels.-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidadd(DocBuilder builder) Add anOpto aDocBuilder.If it's the last level of its parent, when to inline this level rather than break the parent.When this level doesn't fit on one line, controls whether this level is to be broken (its breaks taken) or partially inlined onto the current line.static OpenOp.Builderbuilder()Builder @see ImmutableOpenOp.Builder#Builder().abstract OptionalIntCustom max column limit that contents of this level before the last break may not exceed.A level is "simple" if it doesn't have multiple parameters (in the case of a method call), or multiple chained method calls.static OpMake an ordinaryOpenOp.abstract IndentThe extra indent inside this level.从类继承的方法 com.palantir.javaformat.doc.HasUniqueId
id
-
构造器详细资料
-
OpenOp
public OpenOp()
-
-
方法详细资料
-
plusIndent
The extra indent inside this level. -
breakBehaviour
When this level doesn't fit on one line, controls whether this level is to be broken (its breaks taken) or partially inlined onto the current line. -
breakabilityIfLastLevel
If it's the last level of its parent, when to inline this level rather than break the parent. -
partialInlineability
-
complexity
A level is "simple" if it doesn't have multiple parameters (in the case of a method call), or multiple chained method calls.This is used to poison the ability to partially inline method arguments down the line if a parent level was too complicated, so that you can't end up with this:
method(arg1, arg2, arg3.foo().stream() .filter(...) .map(...));orlog.info("Message", exception, SafeArg.of( "foo", foo);But you can still get this (see test B20128760):Stream
or this:itemIdsStream = stream(members).flatMap(m -> m.getFieldValues().entrySet().stream() .filter(...) .map(...)); method(anotherMethod(arg3.foo().stream() .filter(...) .map(...)));or this:method(anotherMethod( ...)); // long arguments -
debugName
-
columnLimitBeforeLastBreak
Custom max column limit that contents of this level before the last break may not exceed. -
make
Make an ordinaryOpenOp.- 另请参阅:
-
add
从接口复制的说明:OpAdd anOpto aDocBuilder.- 指定者:
add在接口中Op- 参数:
builder- theDocBuilder
-
builder
Builder @see ImmutableOpenOp.Builder#Builder().
-