|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
JavaProxyFactory.java | - | 100% | 100% | 100% |
|
1 | /* | |
2 | * Copyright (c) 2001-2006 OFFIS, Tammo Freese. | |
3 | * This program is made available under the terms of the MIT License. | |
4 | */ | |
5 | package org.easymock.internal; | |
6 | ||
7 | import java.lang.reflect.InvocationHandler; | |
8 | import java.lang.reflect.Proxy; | |
9 | ||
10 | public class JavaProxyFactory<T> implements IProxyFactory<T> { | |
11 | 366 | public T createProxy(Class<T> toMock, InvocationHandler handler) { |
12 | 366 | return (T) Proxy.newProxyInstance(toMock.getClassLoader(), |
13 | new Class[] { toMock }, handler); | |
14 | } | |
15 | } |
|