Example usage for javax.lang.model.element TypeParameterElement getBounds

List of usage examples for javax.lang.model.element TypeParameterElement getBounds

Introduction

In this page you can find the example usage for javax.lang.model.element TypeParameterElement getBounds.

Prototype

List<? extends TypeMirror> getBounds();

Source Link

Document

Returns the bounds of this type parameter.

Usage

From source file:auto.parse.processor.AutoParseProcessor.java

private static String typeParameterString(TypeParameterElement type) {
    String s = type.getSimpleName().toString();
    List<? extends TypeMirror> bounds = type.getBounds();
    if (bounds.isEmpty()) {
        return s;
    } else {/*  ww  w  .  j  av a2s  . c  o m*/
        s += " extends ";
        String sep = "";
        for (TypeMirror bound : bounds) {
            s += sep + bound;
            sep = " & ";
        }
        return s;
    }
}