FileDocCategorySizeDatePackage
InvokeDispatcher.javaAPI DocAndroid 5.1 API1871Thu Mar 12 22:22:10 GMT 2015android.hardware.camera2.dispatch

InvokeDispatcher

public class InvokeDispatcher extends Object implements Dispatchable

Fields Summary
private static final String
TAG
private final T
mTarget
Constructors Summary
public InvokeDispatcher(T target)


       
        mTarget = checkNotNull(target, "target must not be null");
    
Methods Summary
public java.lang.Objectdispatch(java.lang.reflect.Method method, java.lang.Object[] args)

        try {
            return method.invoke(mTarget, args);
        } catch (InvocationTargetException e) {
            Throwable t = e.getTargetException();
            // Potential UB. Hopefully 't' is a runtime exception.
            UncheckedThrow.throwAnyException(t);
        } catch (IllegalAccessException e) {
            // Impossible
            Log.wtf(TAG, "IllegalAccessException while invoking " + method, e);
        } catch (IllegalArgumentException e) {
            // Impossible
            Log.wtf(TAG, "IllegalArgumentException while invoking " + method, e);
        }

        // unreachable
        return null;