Skip to main content
summaryrefslogtreecommitdiffstats
blob: 417310a4ba5070ea40c2ddddd93bfeee25b91aed (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
/*******************************************************************************
 * 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: REMCharacterTypeBeanTypeProxy.java,v $
 *  $Revision: 1.3 $  $Date: 2005/08/24 20:39:07 $ 
 */


import org.eclipse.jem.internal.proxy.core.*;
import org.eclipse.jem.internal.proxy.common.remote.Commands;

/**
 * Character.TYPE BeanType Proxy.
 * Creation date: (2/23/00 1:59:02 PM)
 * @author: Richard Lee Kulp
 */
final class REMCharacterTypeBeanTypeProxy extends REMPrimitiveBeanTypeProxy {

	final REMCharacterTypeBeanProxy nilProxy;	// Value of '\0'
/**
 * REMCharacterBeanTypeProxy constructor comment.
 * @param aClass java.lang.Class
 */
REMCharacterTypeBeanTypeProxy(REMProxyFactoryRegistry aRegistry) {
	super(aRegistry, new Integer(Commands.CHARACTER_TYPE), Character.TYPE.getName());
	
	nilProxy = new REMCharacterTypeBeanProxy(aRegistry, '\0');
}

/**
 * Static helper to create a bean proxy
 * Package protected because everyone should go through the factory API
 * that is defined as part of IBeanProxyFactory
 * Use the cache.
 */
ICharacterBeanProxy createCharacterBeanProxy(char aCharacter) {
	return new REMCharacterTypeBeanProxy(fRegistry, aCharacter);
}

/**
 * newInstance method. Character doesn't have a default ctor, so the standard way won't work.
 * Return the nilProxy for this case because that is the default value.
 */
public IBeanProxy newInstance() {
	return nilProxy;
}

/**
 * Create a new bean proxy the ValueObject passed in.
 * We will assume the object is correct type.
 */
public IBeanProxy newBeanProxy(Commands.ValueObject value) {
	return createCharacterBeanProxy(value.aChar);
}
}


Back to the top