Example usage for com.badlogic.gdx.utils.reflect Constructor getParameterTypes

List of usage examples for com.badlogic.gdx.utils.reflect Constructor getParameterTypes

Introduction

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

Prototype

public Class[] getParameterTypes() 

Source Link

Document

Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor.

Usage

From source file:com.algodal.gdxscreen.utils.GdxDebug.java

License:Apache License

public void assertContructorEmpty(String tag, Class<?> clazz) {
    if (debug()) {
        Constructor[] cstrs = ClassReflection.getConstructors(clazz);
        for (Constructor cstr : cstrs) {
            if (cstr.getParameterTypes().length == 0)
                return;
        }/*from w w w  . java  2s.c  om*/
        throw new GdxRuntimeException("failed: " + tag);
    }
}