blob: 81a67a00e5bd960c6a54427ec753daffd03205e6 [file] [log] [blame]
/*******************************************************************************
* 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 v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jem.internal.proxy.ide;
/*
*/
import org.eclipse.jem.internal.proxy.core.*;
/**
* Short BeanType Proxy.
*/
final class IDEShortTypeBeanTypeProxy extends IDEPrimitiveBeanTypeProxy {
protected IDEShortTypeBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass) {
super(aRegistry, aClass);
}
INumberBeanProxy createShortBeanProxy(short aShort){
return new IDENumberBeanProxy(fProxyFactoryRegistry,new Short(aShort),this);
}
int getPrimitiveType(){
return SHORT;
}
protected IIDEBeanProxy newBeanProxy(Object anObject){
Number n = anObject instanceof Character ? new Short((short) ((Character) anObject).charValue()) : (Number) anObject;
return new IDENumberBeanProxy(fProxyFactoryRegistry, n, this);
}
}