|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
JavaProxyFactory.java | - | 100% | 100% | 100% |
|
1 | /* | |
2 | * Copyright (c) 2001-2005 OFFIS. This program is made available under the terms of | |
3 | * 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 | 291 | public T createProxy(Class<T> toMock, InvocationHandler handler) { |
12 | 291 | return (T) Proxy.newProxyInstance(toMock.getClassLoader(), |
13 | new Class[] { toMock }, handler); | |
14 | } | |
15 | } |
|