org.eclipse.jem.proxy_2.0.400.v201101101900

roxy)fTypeFactory.getBeanTypeProxy(retParm.getClass().getName());
          if (type == null) {
            throw new IllegalArgumentException();
          }
          int classID = type.getID().intValue();
          worker.setAsObject(retParm, classID);
        }
      }
      else {
        worker.set();
      }
      return worker;
    }
  }
  
  public void run()
  {
    DataInputStream in = fConnection.in;
    DataOutputStream out = fConnection.out;
    InputStream ins = null;
    boolean shutdown = false;
    Commands.ValueObject valueObject = new Commands.ValueObject();
    BeanProxyValueSender valueSender = new BeanProxyValueSender(fFactory);
    try
    {
      boolean doLoop = true;
      while (doLoop)
      {
        byte cmd = 0;
        try
        {
          if (LINUX_1_3) {
            fConnection.fSocket.setSoTimeout(1000);
          }
          cmd = in.readByte();
          if (LINUX_1_3) {
            fConnection.fSocket.setSoTimeout(0);
          }
        }
        catch (InterruptedIOException localInterruptedIOException)
        {
          continue;
        }
        boolean isProxies;
        switch (cmd)
        {
        case 4: 
          doLoop = false;
          break;
        case 5: 
          doLoop = false;
          shutdown = true;
          break;
        case -1: 
          int callID = in.readInt();
          int msgID = in.readInt();
          Object parm = null;
          Object result = null;
          ICallback cb = null;
          try
          {
            fFactory.startTransaction();
            setIntransaction(true);
            isProxies = true;
            try
            {
              Commands.readValue(in, valueObject);
              if (type == 53)
              {
                valueSender.initialize(valueObject);
                Commands.readArray(in, anInt, valueSender, valueObject, false);
                if (valueSender.getException() != null) {
                  close();
                }
                parm = valueSender.getArray();
              }
              else
              {
                isProxies = false;
                parm = valueObject.getAsObject();
              }
            }
            finally
            {
              setIntransaction(false);
              fFactory.stopTransaction();
            }
            cb = fServer.getRegisteredCallback(callID);
            if (cb != null)
            {
              try
              {
                if (isProxies)
                {
                  if ((((Object[])parm).length == 1) && ((((Object[])parm)[0] == null) || ((((Object[])parm)[0] instanceof IBeanProxy)))) {
                    result = cb.calledBack(msgID, (IBeanProxy)((Object[])parm)[0]);
                  } else {
                    result = cb.calledBack(msgID, (Object[])parm);
                  }
                }
                else {
                  result = cb.calledBack(msgID, parm);
                }
                valueObject.set();
                if ((result instanceof IREMBeanProxy)) {
                  ((IREMBeanProxy)result).renderBean(valueObject);
                } else if ((result instanceof Object[])) {
                  valueObject.setArrayIDS(
                    new 1.Retriever((Object[])result), 
                    ((Object[])result).length, 
                    23);
                }
                Commands.sendCallbackDoneCommand(out, valueObject, 0);
              }
              catch (RuntimeException e)
              {
                valueObject.set(e.getClass().getName() + ':' + e.getLocalizedMessage());
                Commands.sendCallbackDoneCommand(out, valueObject, 7);
                ProxyPlugin.getPlugin().getLogger().log(e, Level.INFO);
              }
            }
            else
            {
              valueObject.set();
              Commands.sendCallbackDoneCommand(out, valueObject, 8);
            }
          }
          finally
          {
            parm = null;
            result = null;
            cb = null;
            valueObject.set();
            valueSender.clear();
          }
          break;
        case -3: 
          int callID = in.readInt();
          int msgID = in.readInt();
          ICallback cb = null;
          try
          {
            cb = fServer.getRegisteredCallback(callID);
            if (cb != null)
            {
              valueObject.set();
              Commands.sendCallbackDoneCommand(out, valueObject, 0);
              ins = new REMCallbackInputStream(in, out);
              try
              {
                cb.calledBackStream(msgID, ins);
              }
              finally
              {
                try
                {
                  ins.close();
                }
                catch (IOException e)
                {
                  doLoop = false;
                  ProxyPlugin.getPlugin().getLogger().log(new Status(4, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "In REMCallbackThread", e));
                }
              }
            }
            else
            {
              valueObject.set();
              Commands.sendCallbackDoneCommand(out, valueObject, 8);
            }
          }
          finally
          {
            cb = null;
            ins = null;
            valueObject.set();
          }
          break;
        case -2: 
        case 0: 
        case 1: 
        case 2: 
        case 3: 
        default: 
          ProxyPlugin.getPlugin().getLogger().log(new Status(4, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "REMCallback: Invalid cmd sent=" + cmd, null));
          doLoop = false;
        }
      }
    }
    catch (EOFException localEOFException) {}catch (Exception e)
    {
      if (!shuttingDown) {
        ProxyPlugin.getPlugin().getLogger().log(new Status(4, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "In REMCallbackThread", e));
      }
    }
    finally
    {
      if (in != null) {
        try
        {
          in.close();
        }
        catch (Exception localException1) {}
      }
      if (out != null) {
        try
        {
          out.close();
        }
        catch (Exception localException2) {}
      }
      close();
    }
    fServer.removeCallbackThread(this);
    if (shutdown) {
      fServer.requestShutdown();
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMCallbackThread
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.ICharacterBeanProxy;

final class REMCharacterClassBeanProxy
  extends REMConstantBeanProxy
  implements ICharacterBeanProxy
{
  protected Character fCharValue;
  
  REMCharacterClassBeanProxy(REMProxyFactoryRegistry aRegistry, Character value)
  {
    super(aRegistry);
    fCharValue = value;
  }
  
  public boolean equals(Object anObject)
  {
    if (this == anObject) {
      return true;
    }
    if ((anObject instanceof REMCharacterClassBeanProxy)) {
      return fCharValue.charValue() == ((REMCharacterClassBeanProxy)anObject).charValue();
    }
    if ((anObject instanceof Character)) {
      return fCharValue.charValue() == ((Character)anObject).charValue();
    }
    return false;
  }
  
  public char charValue()
  {
    return fCharValue.charValue();
  }
  
  public Character characterValue()
  {
    return fCharValue;
  }
  
  public String toBeanString()
  {
    return fCharValue.toString();
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    return fFactory.getBeanTypeProxyFactory()).characterClass;
  }
  
  public void renderBean(Commands.ValueObject value)
  {
    value.set(fCharValue);
  }
  
  public byte byteValue()
  {
    return (byte)fCharValue.charValue();
  }
  
  public double doubleValue()
  {
    return fCharValue.charValue();
  }
  
  public float floatValue()
  {
    return fCharValue.charValue();
  }
  
  public int intValue()
  {
    return fCharValue.charValue();
  }
  
  public long longValue()
  {
    return fCharValue.charValue();
  }
  
  public Number numberValue()
  {
    return new Integer(charValue());
  }
  
  public short shortValue()
  {
    return (short)fCharValue.charValue();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMCharacterClassBeanProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.ICharacterBeanProxy;

final class REMCharacterClassBeanTypeProxy
  extends REMAbstractBeanTypeProxy
  implements IREMConstantBeanTypeProxy
{
  final REMCharacterClassBeanProxy nilProxy;
  
  REMCharacterClassBeanTypeProxy(REMProxyFactoryRegistry aRegistry, IBeanTypeProxy objectType)
  {
    super(aRegistry, new Integer(8), Character.class.getName(), objectType);
    
    nilProxy = new REMCharacterClassBeanProxy(aRegistry, new Character('\000'));
  }
  
  ICharacterBeanProxy createCharacterBeanProxy(Character aCharacter)
  {
    return aCharacter.charValue() != 0 ? 
      new REMCharacterClassBeanProxy(fRegistry, aCharacter) : nilProxy;
  }
  
  public IREMBeanProxy newBeanProxy(Integer anID)
  {
    throw new UnsupportedOperationException();
  }
  
  public IREMBeanTypeProxy newBeanTypeForClass(Integer anID, String aClassname, boolean anAbstract)
  {
    throw new UnsupportedOperationException();
  }
  
  public IBeanProxy newInstance()
  {
    return nilProxy;
  }
  
  public IBeanProxy newBeanProxy(Commands.ValueObject value)
  {
    return createCharacterBeanProxy(new Character(aChar));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMCharacterClassBeanTypeProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.ICharacterBeanProxy;

final class REMCharacterTypeBeanProxy
  extends REMConstantBeanProxy
  implements ICharacterBeanProxy
{
  protected char fChar;
  
  REMCharacterTypeBeanProxy(REMProxyFactoryRegistry aRegistry, char value)
  {
    super(aRegistry);
    fChar = value;
  }
  
  public boolean equals(Object anObject)
  {
    if (this == anObject) {
      return true;
    }
    if ((anObject instanceof REMCharacterTypeBeanProxy)) {
      return fChar == ((REMCharacterTypeBeanProxy)anObject).charValue();
    }
    if ((anObject instanceof Character)) {
      return fChar == ((Character)anObject).charValue();
    }
    return false;
  }
  
  public boolean sameAs(IBeanProxy aBeanProxy)
  {
    if (this == aBeanProxy) {
      return true;
    }
    if ((aBeanProxy instanceof REMCharacterTypeBeanProxy)) {
      return fChar == ((REMCharacterTypeBeanProxy)aBeanProxy).charValue();
    }
    return false;
  }
  
  public char charValue()
  {
    return fChar;
  }
  
  public Character characterValue()
  {
    return new Character(fChar);
  }
  
  public String toBeanString()
  {
    return String.valueOf(fChar);
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    return fFactory.getBeanTypeProxyFactory()).charType;
  }
  
  public void renderBean(Commands.ValueObject value)
  {
    value.set(fChar);
  }
  
  public byte byteValue()
  {
    return (byte)fChar;
  }
  
  public double doubleValue()
  {
    return fChar;
  }
  
  public float floatValue()
  {
    return fChar;
  }
  
  public int intValue()
  {
    return fChar;
  }
  
  public long longValue()
  {
    return fChar;
  }
  
  public Number numberValue()
  {
    return new Integer(fChar);
  }
  
  public short shortValue()
  {
    return (short)fChar;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMCharacterTypeBeanProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.ICharacterBeanProxy;

final class REMCharacterTypeBeanTypeProxy
  extends REMPrimitiveBeanTypeProxy
{
  final REMCharacterTypeBeanProxy nilProxy;
  
  REMCharacterTypeBeanTypeProxy(REMProxyFactoryRegistry aRegistry)
  {
    super(aRegistry, new Integer(7), Character.TYPE.getName());
    
    nilProxy = new REMCharacterTypeBeanProxy(aRegistry, '\000');
  }
  
  ICharacterBeanProxy createCharacterBeanProxy(char aCharacter)
  {
    return new REMCharacterTypeBeanProxy(fRegistry, aCharacter);
  }
  
  public IBeanProxy newInstance()
  {
    return nilProxy;
  }
  
  public IBeanProxy newBeanProxy(Commands.ValueObject value)
  {
    return createCharacterBeanProxy(aChar);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMCharacterTypeBeanTypeProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;

final class REMClassBeanTypeProxy
  extends REMAbstractBeanTypeProxy
{
  REMClassBeanTypeProxy(REMProxyFactoryRegistry aRegistry, IBeanTypeProxy objectType)
  {
    super(aRegistry, new Integer(22), Class.class.getName(), objectType);
  }
  
  public IBeanProxy newInstance()
  {
    throw new UnsupportedOperationException();
  }
  
  public IBeanProxy newInstance(String initializationString)
  {
    throw new UnsupportedOperationException();
  }
  
  public IREMBeanTypeProxy newBeanTypeForClass(Integer anID, String aClassname, boolean anAbstract)
  {
    throw new UnsupportedOperationException();
  }
  
  public IREMBeanProxy newBeanProxy(Integer anID)
  {
    return ((REMStandardBeanTypeProxyFactory)fRegistry.getBeanTypeProxyFactory()).createBeanTypeProxy(anID);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMClassBeanTypeProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import org.eclipse.core.runtime.Status;
import org.eclipse.jem.internal.proxy.common.CommandException;
import org.eclipse.jem.internal.proxy.common.remote.CommandErrorException;
import org.eclipse.jem.internal.proxy.common.remote.Commands;
import org.eclipse.jem.internal.proxy.common.remote.Commands.GetClassIDReturn;
import org.eclipse.jem.internal.proxy.common.remote.Commands.GetClassReturn;
import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueSender;
import org.eclipse.jem.internal.proxy.common.remote.ExpressionCommands;
import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
import org.eclipse.jem.util.TimerTests;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.osgi.framework.Bundle;

public class REMConnection
  implements IREMConnection, IREMExpressionConnection
{
  public static final String INVOKE_STEP = "Invoke";
  public static final String INVOKE_METHOD_STEP = "Invoke Method";
  protected Socket fSocket = null;
  protected DataInputStream in = null;
  protected DataOutputStream out = null;
  private static final int TIME_OUT = 60000;
  
  public REMConnection(Socket socket, boolean noTimeouts)
  {
    try
    {
      fSocket = socket;
      fSocket.setSoLinger(true, 30);
      if (!noTimeouts) {
        fSocket.setSoTimeout(60000);
      }
      Integer bufSize = Integer.getInteger("proxyvm.bufsize");
      if (bufSize == null) {
        bufSize = new Integer(16000);
      }
      out = new DataOutputStream(new BufferedOutputStream(fSocket.getOutputStream(), bufSize.intValue()));
      in = new DataInputStream(new BufferedInputStream(fSocket.getInputStream(), bufSize.intValue()));
    }
    catch (IOException e)
    {
      ProxyPlugin.getPlugin().getLogger().log(new Status(4, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
      if (out != null) {
        try
        {
          out.close();
        }
        catch (IOException localIOException1) {}
      }
      if (in != null) {
        try
        {
          in.close();
        }
        catch (IOException localIOException2) {}
      }
      try
      {
        fSocket.close();
      }
      catch (IOException localIOException3) {}
      fSocket = null;
      in = null;
      out = null;
    }
  }
  
  public boolean isConnected()
  {
    return fSocket != null;
  }
  
  public void terminateServer()
  {
    if (isConnected())
    {
      try
      {
        Commands.sendTerminateCommand(out);
      }
      catch (IOException localIOException) {}
      close();
    }
  }
  
  public void close()
  {
    if (isConnected())
    {
      try
      {
        Commands.sendQuitCommand(out);
      }
      catch (IOException localIOException1) {}finally
      {
        try
        {
          out.close();
        }
        catch (IOException localIOException2) {}
        try
        {
          in.close();
        }
        catch (IOException localIOException3) {}
        try
        {
          fSocket.close();
        }
        catch (IOException localIOException4) {}
      }
      fSocket = null;
      in = null;
      out = null;
    }
  }
  
  public Commands.GetClassReturn getClass(String className)
    throws CommandException
  {
    if (isConnected()) {
      try
      {
        return Commands.sendGetClassCommand(out, in, className);
      }
      catch (CommandErrorException e)
      {
        if (e.getErrorCode() != 2) {
          throw e;
        }
      }
    }
    return null;
  }
  
  public Commands.GetClassIDReturn getClassFromID(int classID)
    throws CommandException
  {
    if (isConnected()) {
      return Commands.sendGetClassFromIDCommand(out, in, classID);
    }
    return null;
  }
  
  public void getObjectData(int classID, Commands.ValueObject valueReturn)
    throws CommandException
  {
    if (isConnected()) {
      Commands.sendGetObjectData(out, in, classID, valueReturn);
    } else {
      valueReturn.set();
    }
  }
  
  public void getNewInstance(int classID, String initString, Commands.ValueObject newInstance)
    throws CommandException
  {
    if (isConnected()) {
      Commands.sendNewInstance(out, in, classID, initString, newInstance);
    } else {
      newInstance.set();
    }
  }
  
  public void releaseID(int id)
  {
    if (isConnected()) {
      try
      {
        Commands.releaseObjectCommand(out, id);
      }
      catch (IOException localIOException) {}
    }
  }
  
  public void getArrayContents(int arrayID, Commands.ValueObject returnValue)
    throws CommandException
  {
    if (isConnected()) {
      Commands.sendGetArrayContentsCommand(out, in, arrayID, returnValue);
    }
  }
  
  public void invokeMethod(int methodID, Commands.ValueObject invokeOn, Commands.ValueObject parms, Commands.ValueObject returnValue)
    throws CommandException
  {
    if (isConnected())
    {
      TimerTests.basicTest.startCumulativeStep("Invoke Method");
      Commands.sendInvokeMethodCommand(out, in, methodID, invokeOn, parms, returnValue);
      TimerTests.basicTest.stopCumulativeStep("Invoke Method");
    }
  }
  
  public void invokeMethod(Commands.ValueObject classType, String methodName, Commands.ValueObject parmTypes, Commands.ValueObject invokeOn, Commands.ValueObject parms, Commands.ValueObject returnValue)
    throws CommandException
  {
    if (isConnected())
    {
      TimerTests.basicTest.startCumulativeStep("Invoke");
      Commands.sendInvokeMethodCommand(out, in, classType, methodName, parmTypes, invokeOn, parms, returnValue);
      TimerTests.basicTest.stopCumulativeStep("Invoke");
    }
  }
  
  public void startExpressionProcessing(int expressionID, byte trace)
    throws IOException
  {
    if (isConnected()) {
      ExpressionCommands.sendStartExpressionProcessingCommand(expressionID, trace, out);
    }
  }
  
  public void pushExpressionCommand(int expressionID, byte subcommand)
    throws IOException
  {
    if (isConnected()) {
      ExpressionCommands.sendExpressionCommand(expressionID, out, subcommand);
    }
  }
  
  public void stopExpressionProcessing(int expressionID)
    throws IOException
  {
    if (isConnected()) {
      ExpressionCommands.sendEndExpressionProcessingCommand(expressionID, out);
    }
  }
  
  public void pushValueObject(Commands.ValueObject valueObject)
    throws CommandException
  {
    if (isConnected()) {
      Commands.writeValue(out, valueObject, false);
    }
  }
  
  public void pushByte(byte abyte)
    throws IOException
  {
    if (isConnected()) {
      ExpressionCommands.sendByte(out, abyte);
    }
  }
  
  public void pushInt(int anInt)
    throws IOException
  {
    if (isConnected()) {
      ExpressionCommands.sendInt(out, anInt);
    }
  }
  
  public void pushString(String aString)
    throws IOException
  {
    if (isConnected()) {
      ExpressionCommands.sendString(out, aString);
    }
  }
  
  public void pushBoolean(boolean aBool)
    throws IOException
  {
    if (isConnected()) {
      ExpressionCommands.sendBoolean(out, aBool);
    }
  }
  
  public void getFinalValue(Commands.ValueObject result)
    throws CommandException
  {
    if (isConnected()) {
      Commands.readBackValue(in, result, (byte)-1);
    }
  }
  
  public void pullValue(int expressionID, Commands.ValueObject proxyids, Commands.ValueSender sender)
    throws CommandException
  {
    if (isConnected()) {
      ExpressionCommands.sendPullValueCommand(expressionID, out, in, proxyids, sender);
    }
  }
  
  public void sync(int expressionID, Commands.ValueObject proxyids, Commands.ValueSender sender)
    throws CommandException
  {
    if (isConnected()) {
      ExpressionCommands.sendSyncCommand(expressionID, out, in, proxyids, sender);
    }
  }
  
  public void readProxyArrayValues(Commands.ValueObject returnValue, Commands.ValueSender valueSender, boolean allowFlag)
    throws CommandException
  {
    if (isConnected()) {
      Commands.readArray(in, anInt, valueSender, returnValue, allowFlag);
    }
  }
  
  public void transferExpression(int expressionID, Commands.ValueObject expController)
    throws CommandException
  {
    if (isConnected()) {
      ExpressionCommands.sendTransferExpressionCommand(expressionID, out, in, expController);
    }
  }
  
  public void resumeExpression(int expressionID, Commands.ValueObject expController)
    throws CommandException
  {
    if (isConnected()) {
      ExpressionCommands.sendResumeExpressionCommand(expressionID, out, expController);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMConnection
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry;

public abstract class REMConstantBeanProxy
  implements IREMConstantBeanProxy
{
  protected final REMProxyFactoryRegistry fFactory;
  private static final Integer ID = new Integer(-1);
  
  protected REMConstantBeanProxy(REMProxyFactoryRegistry aFactory)
  {
    fFactory = aFactory;
  }
  
  public ProxyFactoryRegistry getProxyFactoryRegistry()
  {
    return fFactory;
  }
  
  public abstract boolean equals(Object paramObject);
  
  public boolean sameAs(IBeanProxy aBeanProxy)
  {
    return this == aBeanProxy;
  }
  
  public Integer getID()
  {
    return ID;
  }
  
  public boolean isValid()
  {
    return fFactory.isValid();
  }
  
  public void release() {}
  
  public final boolean isBeanProxy()
  {
    return true;
  }
  
  public final boolean isExpressionProxy()
  {
    return false;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMConstantBeanProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.core.runtime.Status;
import org.eclipse.jem.internal.proxy.common.remote.TransmitableArray;
import org.eclipse.jem.internal.proxy.core.IArrayBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.IConstructorProxy;
import org.eclipse.jem.internal.proxy.core.IMethodProxy;
import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
import org.eclipse.jem.internal.proxy.core.ThrowableProxy;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.osgi.framework.Bundle;

final class REMConstructorProxy
  extends REMAccessibleObjectProxy
  implements IConstructorProxy
{
  private IBeanTypeProxy[] fParameterTypes;
  
  REMConstructorProxy(REMProxyFactoryRegistry aRegistry, Integer anID)
  {
    super(aRegistry, anID);
  }
  
  public IBeanProxy newInstance()
    throws ThrowableProxy
  {
    return newInstance(null);
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    return fFactory.getMethodProxyFactory()).ctorType;
  }
  
  public IBeanProxy newInstance(IBeanProxy[] creationArguments)
    throws ThrowableProxy
  {
    IREMMethodProxy newInstanceMethod = 
      (IREMMethodProxy)REMStandardBeanProxyConstants.getConstants(fFactory).getConstructorNewInstance();
    
    Object[] parms = (Object[])null;
    if (creationArguments != null) {
      parms = new Object[] { new TransmitableArray(23, creationArguments) };
    }
    return newInstanceMethod.invokeWithParms(this, parms);
  }
  
  public IBeanProxy newInstanceCatchThrowableExceptions()
  {
    try
    {
      return newInstance();
    }
    catch (ThrowableProxy e)
    {
      ProxyPlugin.getPlugin().getLogger().log(new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
      fFactory.releaseProxy(e);
    }
    return null;
  }
  
  public IBeanProxy newInstanceCatchThrowableExceptions(IBeanProxy[] args)
  {
    try
    {
      return newInstance(args);
    }
    catch (ThrowableProxy e)
    {
      ProxyPlugin.getPlugin().getLogger().log(new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
      fFactory.releaseProxy(e);
    }
    return null;
  }
  
  public synchronized IBeanTypeProxy[] getParameterTypes()
  {
    if (fParameterTypes == null)
    {
      IArrayBeanProxy parmTypes = (IArrayBeanProxy)REMStandardBeanProxyConstants.getConstants(fFactory)
        .getConstructorParameterTypesMessage().invokeCatchThrowableExceptions(this);
      if (parmTypes == null)
      {
        fParameterTypes = new IBeanTypeProxy[0];
      }
      else
      {
        int len = parmTypes.getLength();
        fParameterTypes = new IBeanTypeProxy[len];
        for (int i = 0; i < len; i++) {
          try
          {
            fParameterTypes[i] = ((IBeanTypeProxy)parmTypes.get(i));
          }
          catch (ThrowableProxy localThrowableProxy) {}
        }
        fFactory.releaseProxy(parmTypes);
      }
    }
    return fParameterTypes;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMConstructorProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import java.lang.reflect.Constructor;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;

final class REMConstructorTypeProxy
  extends REMAbstractBeanTypeProxy
{
  REMConstructorTypeProxy(REMProxyFactoryRegistry aRegistry, IBeanTypeProxy accessibleTypeProxy)
  {
    super(aRegistry, new Integer(27), Constructor.class.getName(), accessibleTypeProxy);
  }
  
  public IREMBeanTypeProxy newBeanTypeForClass(Integer anID, String aClassname, boolean anAbstract)
  {
    throw new UnsupportedOperationException();
  }
  
  public IREMBeanProxy newBeanProxy(Integer objectID)
  {
    return new REMConstructorProxy(fRegistry, objectID);
  }
  
  public IBeanProxy newInstance()
  {
    throw new UnsupportedOperationException();
  }
  
  public IBeanProxy newInstance(String initializationString)
  {
    throw new UnsupportedOperationException();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMConstructorTypeProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

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

class REMDoubleClassBeanProxy
  extends REMNumberBeanProxy
{
  REMDoubleClassBeanProxy(REMProxyFactoryRegistry aRegistry, Double aDouble)
  {
    super(aRegistry, aDouble);
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    return fFactory.getBeanTypeProxyFactory()).doubleClass;
  }
  
  public void renderBean(Commands.ValueObject value)
  {
    value.set((Double)numberValue());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMDoubleClassBeanProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.INumberBeanProxy;

final class REMDoubleClassBeanTypeProxy
  extends REMAbstractNumberBeanTypeProxy
{
  private final INumberBeanProxy zeroProxy;
  
  REMDoubleClassBeanTypeProxy(REMProxyFactoryRegistry aRegistry, IBeanTypeProxy numberType)
  {
    super(aRegistry, new Integer(10), Double.class.getName(), numberType);
    
    zeroProxy = new REMDoubleClassBeanProxy(aRegistry, new Double(0.0D));
  }
  
  INumberBeanProxy createDoubleBeanProxy(Double aDouble)
  {
    return aDouble.doubleValue() != 0.0D ? 
      new REMDoubleClassBeanProxy(fRegistry, aDouble) : zeroProxy;
  }
  
  protected INumberBeanProxy createNumberBeanProxy(Number aNumber)
  {
    return createDoubleBeanProxy((Double)aNumber);
  }
  
  public IBeanProxy newInstance()
  {
    return zeroProxy;
  }
  
  public IBeanProxy newBeanProxy(Commands.ValueObject value)
  {
    return createDoubleBeanProxy(new Double(aDouble));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMDoubleClassBeanTypeProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.INumberBeanProxy;

class REMDoubleTypeBeanProxy
  extends REMConstantBeanProxy
  implements INumberBeanProxy
{
  private final double fDouble;
  
  REMDoubleTypeBeanProxy(REMProxyFactoryRegistry aRegistry, double aDouble)
  {
    super(aRegistry);
    fDouble = aDouble;
  }
  
  public boolean equals(Object anObject)
  {
    if (this == anObject) {
      return true;
    }
    if ((anObject instanceof REMDoubleTypeBeanProxy)) {
      return fDouble == ((REMDoubleTypeBeanProxy)anObject).doubleValue();
    }
    if ((anObject instanceof Double)) {
      return fDouble == ((Double)anObject).doubleValue();
    }
    return false;
  }
  
  public boolean sameAs(IBeanProxy aBeanProxy)
  {
    if (this == aBeanProxy) {
      return true;
    }
    if ((aBeanProxy instanceof REMDoubleTypeBeanProxy)) {
      return fDouble == ((REMDoubleTypeBeanProxy)aBeanProxy).doubleValue();
    }
    return false;
  }
  
  public byte byteValue()
  {
    return (byte)(int)fDouble;
  }
  
  public double doubleValue()
  {
    return fDouble;
  }
  
  public float floatValue()
  {
    return (float)fDouble;
  }
  
  public int intValue()
  {
    return (int)fDouble;
  }
  
  public long longValue()
  {
    return fDouble;
  }
  
  public Number numberValue()
  {
    return new Double(fDouble);
  }
  
  public short shortValue()
  {
    return (short)(int)fDouble;
  }
  
  public String toBeanString()
  {
    return String.valueOf(fDouble);
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    return fFactory.getBeanTypeProxyFactory()).doubleType;
  }
  
  public void renderBean(Commands.ValueObject value)
  {
    value.set(fDouble);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMDoubleTypeBeanProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.INumberBeanProxy;
import org.eclipse.jem.internal.proxy.core.IStandardBeanProxyFactory;
import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry;
import org.eclipse.jem.internal.proxy.core.ThrowableProxy;

final class REMDoubleTypeBeanTypeProxy
  extends REMPrimitiveBeanTypeProxy
{
  private final INumberBeanProxy zeroProxy;
  
  REMDoubleTypeBeanTypeProxy(REMProxyFactoryRegistry aRegistry)
  {
    super(aRegistry, new Integer(9), Double.TYPE.getName());
    
    zeroProxy = new REMDoubleTypeBeanProxy(aRegistry, 0.0D);
  }
  
  INumberBeanProxy createDoubleBeanProxy(double aDouble)
  {
    return aDouble != 0.0D ? 
      new REMDoubleTypeBeanProxy(fRegistry, aDouble) : zeroProxy;
  }
  
  public IBeanProxy newInstance()
  {
    return zeroProxy;
  }
  
  public IBeanProxy newBeanProxy(Commands.ValueObject value)
  {
    return createDoubleBeanProxy(aDouble);
  }
  
  public IBeanProxy newInstance(String initializationString)
    throws ThrowableProxy, ClassCastException, InstantiationException
  {
    String trim = initializationString.trim();
    if (trim.length() == 0) {
      return super.newInstance(initializationString);
    }
    if (trim.startsWith("(double)"))
    {
      Number v = parseString(trim.substring("(double)".length()).trim());
      double aDouble;
      if (v != null) {
        aDouble = v.doubleValue();
      } else {
        return super.newInstance(initializationString);
      }
    }
    else
    {
      try
      {
        aDouble = Double.valueOf(initializationString).doubleValue();
      }
      catch (NumberFormatException localNumberFormatException)
      {
        double aDouble;
        return super.newInstance(initializationString);
      }
    }
    double aDouble;
    return getProxyFactoryRegistry().getBeanProxyFactory().createBeanProxyWith(aDouble);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMDoubleTypeBeanTypeProxy
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import java.util.Iterator;
import java.util.List;
import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;
import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueRetrieve;
import org.eclipse.jem.internal.proxy.core.ExpressionProxy;

class REMExpression$1$ExpressionProxyRetriever
  implements Commands.ValueRetrieve
{
  Iterator expressionProxiesItr;
  Commands.ValueObject worker;
  final REMExpression this$0;
  
  public REMExpression$1$ExpressionProxyRetriever(REMExpression paramREMExpression, List expressionProxies)
  {
    this$0 = paramREMExpression;worker = new Commands.ValueObject();
    expressionProxiesItr = expressionProxies.iterator();
  }
  
  public Commands.ValueObject nextValue()
  {
    worker.set(-1);
    while (expressionProxiesItr.hasNext())
    {
      Object parm = expressionProxiesItr.next();
      if (parm != null)
      {
        worker.set(((ExpressionProxy)parm).getProxyID());
        break;
      }
    }
    return worker;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMExpression.1.ExpressionProxyRetriever
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import org.eclipse.jem.internal.proxy.common.remote.Commands.ValueObject;

class REMExpression$1
  extends BeanProxyValueSender
{
  final REMExpression this$0;
  
  REMExpression$1(REMExpression paramREMExpression, REMStandardBeanProxyFactory $anonymous0)
  {
    super($anonymous0);this$0 = paramREMExpression;
  }
  
  public void sendValue(Commands.ValueObject value)
  {
    if (value.getType() == 54) {
      switch (anInt)
      {
      case 1: 
        array[(index++)] = REMExpression.access$1();
        break;
      case 0: 
        array[(index++)] = REMExpression.access$2();
        break;
      }
    } else {
      super.sendValue(value);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMExpression.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import java.io.IOException;
import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
import org.eclipse.jem.util.logger.proxy.Logger;

class REMExpression$BlockBegin
  extends REMExpression.PendingTransaction
{
  public int blockNumber;
  
  public REMExpression$BlockBegin(int blockNumber)
  {
    this.blockNumber = blockNumber;
  }
  
  public void pushTransaction(REMExpression remExpression)
  {
    IREMExpressionConnection connection = remExpression.getConnection();
    try
    {
      connection.pushExpressionCommand(remExpression.getREMExpressionID(), (byte)18);
      connection.pushInt(blockNumber);
    }
    catch (IOException e)
    {
      connection.close();
      ProxyPlugin.getPlugin().getLogger().log(e);
      REMExpression.access$0(remExpression, e.getLocalizedMessage());
      remExpression.throwIllegalStateException(REMExpression.IO_EXCEPTION_MSG);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMExpression.BlockBegin
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import java.io.IOException;
import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
import org.eclipse.jem.util.logger.proxy.Logger;

class REMExpression$BlockBreak
  extends REMExpression.PendingTransaction
{
  public int blockNumber;
  
  public REMExpression$BlockBreak(int blockNumber)
  {
    this.blockNumber = blockNumber;
  }
  
  public void pushTransaction(REMExpression remExpression)
  {
    IREMExpressionConnection connection = remExpression.getConnection();
    try
    {
      connection.pushExpressionCommand(remExpression.getREMExpressionID(), (byte)19);
      connection.pushInt(blockNumber);
    }
    catch (IOException e)
    {
      connection.close();
      ProxyPlugin.getPlugin().getLogger().log(e);
      REMExpression.access$0(remExpression, e.getLocalizedMessage());
      remExpression.throwIllegalStateException(REMExpression.IO_EXCEPTION_MSG);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jem.internal.proxy.remote.REMExpression.BlockBreak
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jem.internal.proxy.remote;

import java.io.IOException;
import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
import org.eclipse.jem.util.logger.proxy.Logger;

class REMExpression$Mark
  extends REMExpression.PendingTransaction
{
  public int markID;
  
  public REMExpression$Mark(int markID)
  {
    this.markID = markID;
  }
  
  public void pushTransaction(
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

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd