Inlined hasDefaultValue().
This commit is contained in:
@@ -76,16 +76,6 @@ public class DescriptorRendererImpl implements DescriptorRenderer {
|
|||||||
this.textFormat = textFormat;
|
this.textFormat = textFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasDefaultValue(ValueParameterDescriptor descriptor) {
|
|
||||||
if (debugMode) {
|
|
||||||
// hasDefaultValue() has effects
|
|
||||||
return descriptor.declaresDefaultValue();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return descriptor.hasDefaultValue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private String renderKeyword(String keyword) {
|
private String renderKeyword(String keyword) {
|
||||||
switch (textFormat) {
|
switch (textFormat) {
|
||||||
case PLAIN:
|
case PLAIN:
|
||||||
@@ -296,7 +286,8 @@ public class DescriptorRendererImpl implements DescriptorRenderer {
|
|||||||
|
|
||||||
private void renderValueParameterOfFunction(ValueParameterDescriptor descriptor, StringBuilder builder) {
|
private void renderValueParameterOfFunction(ValueParameterDescriptor descriptor, StringBuilder builder) {
|
||||||
rootVisitor.visitVariableDescriptor(descriptor, builder, true);
|
rootVisitor.visitVariableDescriptor(descriptor, builder, true);
|
||||||
if (hasDefaultValue(descriptor)) {
|
boolean withDefaultValue = debugMode ? descriptor.declaresDefaultValue() : descriptor.hasDefaultValue();
|
||||||
|
if (withDefaultValue) {
|
||||||
builder.append(" = ...");
|
builder.append(" = ...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user