Example usage for com.badlogic.gdx.utils.reflect Field getElementType

List of usage examples for com.badlogic.gdx.utils.reflect Field getElementType

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils.reflect Field getElementType.

Prototype

public Class getElementType(int index) 

Source Link

Document

If the type of the field is parameterized, returns the Class object representing the parameter type at the specified index, null otherwise.

Usage

From source file:com.github.antag99.retinazer.resolvers.MapperWireResolver.java

License:Open Source License

@SuppressWarnings("unchecked")
private Class<? extends Component> getType(Field field) {
    if (field.getType() != Mapper.class)
        return null;
    return field.getElementType(0);
}