All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.powermock.reflect.internal.Constructor Maven / Gradle / Ivy

There is a newer version: 2.0.9
Show newest version
package org.powermock.reflect.internal;

class Constructor {

    private final Class[] parameterTypes;
    private java.lang.reflect.Constructor constructor;
    private boolean isVarArgs;

    Constructor(java.lang.reflect.Constructor constructor) {
        this.constructor = constructor;
        this.parameterTypes = constructor.getParameterTypes();
        this.isVarArgs = constructor.isVarArgs();
    }

    boolean canBeInvokeWith(Object[] arguments) {
        return new ParametersMatcher(isVarArgs, parameterTypes, arguments).match();
    }

    public java.lang.reflect.Constructor getJavaConstructor() {
        return constructor;
    }

    public boolean isVarArg() {
        return isVarArgs;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy