Example usage for org.springframework.boot.configurationprocessor.metadata ItemMetadata getDefaultValue

List of usage examples for org.springframework.boot.configurationprocessor.metadata ItemMetadata getDefaultValue

Introduction

In this page you can find the example usage for org.springframework.boot.configurationprocessor.metadata ItemMetadata getDefaultValue.

Prototype

public Object getDefaultValue() 

Source Link

Usage

From source file:com.keevosh.springframework.boot.netbeans.SpringBootConfigurationCompletionDocumentation.java

@Override
public String getText() {
    ItemMetadata configurationItem = item.getConfigurationItem();

    String deprecatedText = configurationItem.isDeprecated() ? ("<br/><br/><b>Deprecated</b>") : "";
    String defaultValueText = (null != configurationItem.getDefaultValue())
            ? ("<br/><i>Default Value:</i> " + String.valueOf(configurationItem.getDefaultValue()))
            : "";
    String descriptionText = (null != configurationItem.getDescription())
            ? ("<br/><br/>" + configurationItem.getDescription())
            : "";
    String text = "<b>" + configurationItem.getName() + "</b>" + "<br/><a>" + configurationItem.getType()
            + "</a>" + defaultValueText + deprecatedText + descriptionText;

    return text;// w ww .  j a v  a  2 s.co m
}