blob: 3916e97a7ce9589b099d17a41bab2c8e2420542a [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.*;
/**
* Byte BeanType Proxy.
*/
final class IDEByteTypeBeanTypeProxy extends IDEPrimitiveBeanTypeProxy {
protected IDEByteTypeBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass) {
super(aRegistry, aClass);
}
INumberBeanProxy createByteBeanProxy(byte aByte){
return new IDENumberBeanProxy(fProxyFactoryRegistry,new Byte(aByte),this);
}
int getPrimitiveType(){
return BYTE;
}
protected IIDEBeanProxy newBeanProxy(Object anObject){
Number n = anObject instanceof Character ? new Byte((byte)((Character) anObject).charValue()) : (Number) anObject;
return new IDENumberBeanProxy(fProxyFactoryRegistry, n, this);
}
}