Skip to main content
summaryrefslogtreecommitdiffstats
blob: 34375b6cc296512974277d8d481f167e080576a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*******************************************************************************
 * Copyright (c) 2001, 2005 IBM Corporation and others.
 * 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:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jem.internal.proxy.remote;
/*
 *  $RCSfile: REMInterfaceBeanTypeProxy.java,v $
 *  $Revision: 1.3 $  $Date: 2005/08/24 20:39:06 $ 
 */


import org.eclipse.jem.internal.proxy.core.*;
/**
 * Default beantype proxy for an interface.
 */

public class REMInterfaceBeanTypeProxy extends REMAbstractBeanTypeProxy {
	
	protected REMInterfaceBeanTypeProxy(REMProxyFactoryRegistry aRegistry, Integer anID, String aClassname) {
		super(aRegistry, anID, aClassname, null);
	}
	
	/** 
	 * Interfaces are interfaces.
	 */
	public boolean isInterface() {
		return true;
	}
	
	/**
	 * Create a new bean proxy with the specified id.
	 *
	 * For all of the interface types, this is an invalid operation. 
	 */
	public IREMBeanProxy newBeanProxy(Integer anID) {
		throw new UnsupportedOperationException();
	}
	
	/**
	 * newBeanTypeForClass: Create a new beantypeproxy of this kind for the given class.
	 * This is used by beantype proxy factory when creating a beantype proxy for a subclass.
	 * This is because subclasses, unless explicitly overridden, should use the same kind
	 * of beantype proxy. This way if anything special is needed for a specific type, then
	 * that can be done.
	 *
	 * For all of the interface types, you can't create a newBeanType for subclasses since
	 * interface aren't subclassable, only extendable.
	 */
	public IREMBeanTypeProxy newBeanTypeForClass(Integer anID, String aClassname, boolean anAbstact) {
		throw new UnsupportedOperationException();
	}
	
	/**
	 * Note: Since new instances of interfaces can never be done,
	 * this function is not supported.
	 */
	public IBeanProxy newInstance() { 
		throw new UnsupportedOperationException();
	}
	
	/**
	 * newInstance(initializationString) is valid because it can be used to create
	 * an instance of an implementation of the interface.
	 */

}

Back to the top