blob: 7f15316ff806a7a0591e2306dd0ec7d8d5157515 [file] [log] [blame]
/*
* Copyright (c) 2020 Kentyou.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Kentyou - initial API and implementation
*/
package org.eclipse.sensinact.gateway.protocol.http.test;
import java.lang.reflect.Method;
public class Callback {
public final Object target;
public final Method method;
Callback(Object target, Method method) {
this.target = target;
this.method = method;
}
public Object invoke(Object[] parameters) throws Exception {
this.method.setAccessible(true);
return this.method.invoke(this.target, parameters);
}
}