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

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

Introduction

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

Prototype

public Class getDeclaringClass() 

Source Link

Document

Returns the Class object representing the class or interface that declares the field.

Usage

From source file:com.github.antag99.retinazer.WireCache.java

License:Open Source License

public void wire(Object object) {
    final WireResolver[] wireResolvers = this.wireResolvers;

    fields: for (final Field field : fields) {
        for (WireResolver wireResolver : wireResolvers) {
            try {
                if (wireResolver.wire(engine, object, field)) {
                    continue fields;
                }/*ww w. j a v a  2  s  .c  o m*/
            } catch (Throwable ex) {
                throw Internal.sneakyThrow(ex);
            }
        }

        throw new RetinazerException(
                "Failed to wire field " + field.getName() + " of " + field.getDeclaringClass().getName()
                        + " of type " + field.getType().getName() + "; no resolver");
    }
}