Example usage for javax.lang.model.element VariableElement getKind

List of usage examples for javax.lang.model.element VariableElement getKind

Introduction

In this page you can find the example usage for javax.lang.model.element VariableElement getKind.

Prototype

ElementKind getKind();

Source Link

Document

Returns the kind of this element.

Usage

From source file:org.mule.devkit.generation.mule.studio.editor.MuleStudioUtils.java

public String getFormattedDescription(VariableElement element) {
    Summary description = element.getAnnotation(Summary.class);
    if (description != null && StringUtils.isNotBlank(description.value())) {
        return formatDescription(description.value());
    }//from  ww w.j  a v a2s.com
    if (element.getKind() == ElementKind.PARAMETER) {
        Element executableElement = element.getEnclosingElement();
        return formatDescription(
                javaDocUtils.getParameterSummary(element.getSimpleName().toString(), executableElement));
    }
    return formatDescription(javaDocUtils.getSummary(element));
}