Example usage for java.lang.reflect TypeVariable toString

List of usage examples for java.lang.reflect TypeVariable toString

Introduction

In this page you can find the example usage for java.lang.reflect TypeVariable toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:net.firejack.platform.core.utils.Factory.java

public int getParameterTypeDeclarationIndex(TypeVariable typeVariable) {
    GenericDeclaration genericDeclaration = typeVariable.getGenericDeclaration();
    TypeVariable[] typeVariables = genericDeclaration.getTypeParameters();
    for (int i = 0; i < typeVariables.length; i++) {
        if (typeVariables[i].equals(typeVariable)) {
            return i;
        }//from   www  .j  a va 2 s.c  o m
    }
    throw new IllegalStateException(
            "Argument " + typeVariable.toString() + " is not found in " + genericDeclaration.toString() + ".");
}