Bläddra i källkod

268419: testcode: dynamic proxies and generics

tags/pre268419
aclement 15 år sedan
förälder
incheckning
029749c295

+ 28
- 0
weaver5/java5-testsrc/$Proxy1.java Visa fil

@@ -0,0 +1,28 @@
/*******************************************************************************
* Copyright (c) 2009 Contributors
* 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:
* Andy Clement - initial API and implementation
*******************************************************************************/
import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class $Proxy1 extends Proxy implements MessageService {

protected $Proxy1(InvocationHandler arg0) {
super(arg0);
}

public Object get1(Long t) {
return null;
}

public Object get2(Serializable s) {
return null;
}
}

+ 17
- 0
weaver5/java5-testsrc/GenericService.java Visa fil

@@ -0,0 +1,17 @@
/*******************************************************************************
* Copyright (c) 2009 Contributors
* 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:
* Andy Clement - initial API and implementation
*******************************************************************************/
import java.io.Serializable;

public interface GenericService<T extends Serializable> {
Object get1(T t);

Object get2(Serializable s);
}

+ 13
- 0
weaver5/java5-testsrc/MessageService.java Visa fil

@@ -0,0 +1,13 @@
/*******************************************************************************
* Copyright (c) 2009 Contributors
* 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:
* Andy Clement - initial API and implementation
*******************************************************************************/
public interface MessageService extends GenericService<Long> {

}

Laddar…
Avbryt
Spara