org.eclipse.jem.proxy_2.0.400.v201101101900

16:45:19.434 INFO  jd.cli.Main - Decompiling org.eclipse.jem.proxy_2.0.400.v201101101900.jar
package org.eclipse.jem.internal.proxy.awt;

import org.eclipse.jem.internal.proxy.core.IBeanProxyFactory;
import org.eclipse.jem.internal.proxy.core.IDimensionBeanProxy;
import org.eclipse.jem.internal.proxy.core.IPointBeanProxy;
import org.eclipse.jem.internal.proxy.core.IRectangleBeanProxy;

public abstract interface IStandardAwtBeanProxyFactory
  extends IBeanProxyFactory
{
  public static final String REGISTRY_KEY = "standard-java.awt";
  
  public abstract IDimensionBeanProxy createDimensionBeanProxyWith(int paramInt1, int paramInt2);
  
  public abstract IPointBeanProxy createPointBeanProxyWith(int paramInt1, int paramInt2);
  
  public abstract IRectangleBeanProxy createBeanProxyWith(int paramInt1, int paramInt2, int paramInt3, int paramInt4);
}

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

import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.IFieldProxy;
import org.eclipse.jem.internal.proxy.core.IMethodProxy;
import org.eclipse.jem.internal.proxy.core.IStandardBeanTypeProxyFactory;
import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry;

public final class JavaStandardAwtBeanConstants
{
  public static final Object REGISTRY_KEY = new Object();
  final boolean AWTLoaded;
  final boolean AWTRegistered;
  final IFieldProxy dimensionHeightProxy;
  final IFieldProxy dimensionWidthProxy;
  final IMethodProxy setDimensionSizeHWProxy;
  final IMethodProxy setDimensionSizeDProxy;
  final IFieldProxy pointXProxy;
  final IFieldProxy pointYProxy;
  final IMethodProxy setPointLocationXYProxy;
  final IMethodProxy setPointLocationPProxy;
  final IFieldProxy rectangleHeightProxy;
  final IFieldProxy rectangleWidthProxy;
  final IFieldProxy rectangleXProxy;
  final IFieldProxy rectangleYProxy;
  final IMethodProxy setRectangleSizeHWProxy;
  final IMethodProxy setRectangleSizeDProxy;
  final IMethodProxy setRectangleLocationXYProxy;
  final IMethodProxy setRectangleLocationPProxy;
  final IMethodProxy setRectangleBoundsXYHWProxy;
  final IMethodProxy setRectangleBoundsRProxy;
  
  public static JavaStandardAwtBeanConstants getConstants(ProxyFactoryRegistry registry)
  {
    JavaStandardAwtBeanConstants constants = (JavaStandardAwtBeanConstants)registry.getConstants(REGISTRY_KEY);
    if (constants == null) {
      registry.registerConstants(REGISTRY_KEY, constants = new JavaStandardAwtBeanConstants(registry, registry.getBeanProxyFactoryExtension("standard-java.awt") != null));
    }
    return constants;
  }
  
  public JavaStandardAwtBeanConstants(ProxyFactoryRegistry registry, boolean isRegistered)
  {
    AWTRegistered = isRegistered;
    if (!AWTRegistered)
    {
      AWTLoaded = false;
      dimensionHeightProxy = (dimensionWidthProxy = pointXProxy = pointYProxy = rectangleHeightProxy = rectangleWidthProxy = rectangleXProxy = rectangleYProxy = null);
      setDimensionSizeHWProxy = (setDimensionSizeDProxy = setPointLocationXYProxy = setPointLocationPProxy = setRectangleSizeHWProxy = setRectangleSizeDProxy = setRectangleLocationXYProxy = setRectangleLocationPProxy = setRectangleBoundsXYHWProxy = setRectangleBoundsRProxy = null);
      return;
    }
    IStandardBeanTypeProxyFactory typeFactory = registry.getBeanTypeProxyFactory();
    
    IBeanTypeProxy dimensionTypeProxy = typeFactory.getBeanTypeProxy("java.awt.Dimension");
    if (dimensionTypeProxy != null)
    {
      AWTLoaded = true;
      IBeanTypeProxy intTypeProxy = typeFactory.getBeanTypeProxy("int");
      
      dimensionHeightProxy = dimensionTypeProxy.getFieldProxy("height");
      dimensionWidthProxy = dimensionTypeProxy.getFieldProxy("width");
      setDimensionSizeHWProxy = dimensionTypeProxy.getMethodProxy("setSize", new IBeanTypeProxy[] { intTypeProxy, intTypeProxy });
      setDimensionSizeDProxy = dimensionTypeProxy.getMethodProxy("setSize", new IBeanTypeProxy[] { dimensionTypeProxy });
      
      IBeanTypeProxy pointTypeProxy = typeFactory.getBeanTypeProxy("java.awt.Point");
      pointXProxy = pointTypeProxy.getFieldProxy("x");
      pointYProxy = pointTypeProxy.getFieldProxy("y");
      setPointLocationXYProxy = pointTypeProxy.getMethodProxy("setLocation", new IBeanTypeProxy[] { intTypeProxy, intTypeProxy });
      setPointLocationPProxy = pointTypeProxy.getMethodProxy("setLocation", new IBeanTypeProxy[] { pointTypeProxy });
      
      IBeanTypeProxy rectangleTypeProxy = typeFactory.getBeanTypeProxy("java.awt.Rectangle");
      rectangleHeightProxy = rectangleTypeProxy.getFieldProxy("height");
      rectangleWidthProxy = rectangleTypeProxy.getFieldProxy("width");
      rectangleXProxy = rectangleTypeProxy.getFieldProxy("x");
      rectangleYProxy = rectangleTypeProxy.getFieldProxy("y");
      setRectangleSizeHWProxy = rectangleTypeProxy.getMethodProxy("setSize", new IBeanTypeProxy[] { intTypeProxy, intTypeProxy });
      setRectangleSizeDProxy = rectangleTypeProxy.getMethodProxy("setSize", new IBeanTypeProxy[] { dimensionTypeProxy });
      setRectangleLocationXYProxy = rectangleTypeProxy.getMethodProxy("setLocation", new IBeanTypeProxy[] { intTypeProxy, intTypeProxy });
      setRectangleLocationPProxy = rectangleTypeProxy.getMethodProxy("setLocation", new IBeanTypeProxy[] { pointTypeProxy });
      setRectangleBoundsXYHWProxy = rectangleTypeProxy.getMethodProxy("setBounds", new IBeanTypeProxy[] { intTypeProxy, intTypeProxy, intTypeProxy, intTypeProxy });
      setRectangleBoundsRProxy = rectangleTypeProxy.getMethodProxy("setBounds", new IBeanTypeProxy[] { rectangleTypeProxy });
    }
    else
    {
      AWTLoaded = false;
      dimensionHeightProxy = (dimensionWidthProxy = pointXProxy = pointYProxy = rectangleHeightProxy = rectangleWidthProxy = rectangleXProxy = rectangleYProxy = null);
      setDimensionSizeHWProxy = (setDimensionSizeDProxy = setPointLocationXYProxy = setPointLocationPProxy = setRectangleSizeHWProxy = setRectangleSizeDProxy = setRectangleLocationXYProxy = setRectangleLocationPProxy = setRectangleBoundsXYHWProxy = setRectangleBoundsRProxy = null);
    }
  }
  
  public boolean isAWTAvailable()
  {
    return AWTLoaded;
  }
  
  public boolean isAWTRegistered()
  {
    return AWTRegistered;
  }
  
  public IFieldProxy getDimensionHeightFieldProxy()
  {
    return dimensionHeightProxy;
  }
  
  public IFieldProxy getDimensionWidthFieldProxy()
  {
    return dimensionWidthProxy;
  }
  
  public IMethodProxy getDimensionSetSizeHWProxy()
  {
    return setDimensionSizeHWProxy;
  }
  
  public IMethodProxy getDimensionSetSizeDProxy()
  {
    return setDimensionSizeDProxy;
  }
  
  public IFieldProxy getPointXFieldProxy()
  {
    return pointXProxy;
  }
  
  public IFieldProxy getPointYFieldProxy()
  {
    return pointYProxy;
  }
  
  public IMethodProxy getPointSetLocationXYProxy()
  {
    return setPointLocationXYProxy;
  }
  
  public IMethodProxy getPointSetLocationPProxy()
  {
    return setPointLocationPProxy;
  }
  
  public IFieldProxy getRectangleHeightFieldProxy()
  {
    return rectangleHeightProxy;
  }
  
  public IFieldProxy getRectangleWidthFieldProxy()
  {
    return rectangleWidthProxy;
  }
  
  public IFieldProxy getRectangleXFieldProxy()
  {
    return rectangleXProxy;
  }
  
  public IFieldProxy getRectangleYFieldProxy()
  {
    return rectangleYProxy;
  }
  
  public IMethodProxy getRectangleSetSizeHWProxy()
  {
    return setRectangleSizeHWProxy;
  }
  
  public IMethodProxy getRectangleSetSizeDProxy()
  {
    return setRectangleSizeDProxy;
  }
  
  public IMethodProxy getRectangleSetLocationXYProxy()
  {
    return setRectangleLocationXYProxy;
  }
  
  public IMethodProxy getRectangleSetLocationPProxy()
  {
    return setRectangleLocationPProxy;
  }
  
  public IMethodProxy getRectangleSetBoundsXYHWProxy()
  {
    return setRectangleBoundsXYHWProxy;
  }
  
  public IMethodProxy getRectangleSetBoundsRProxy()
  {
    return setRectangleBoundsRProxy;
  }
}

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

public class AmbiguousMethodException
  extends Exception
{
  private static final long serialVersionUID = -7084137612344373381L;
  
  public AmbiguousMethodException() {}
  
  public AmbiguousMethodException(String msg)
  {
    super(msg);
  }
}

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

public class CommandException
  extends Exception
{
  private static final long serialVersionUID = -2519238571145682514L;
  protected final Object fExceptionData;
  
  public CommandException()
  {
    fExceptionData = null;
  }
  
  public CommandException(Object data)
  {
    fExceptionData = data;
  }
  
  public CommandException(String msg, Object data)
  {
    super(msg);
    fExceptionData = data;
  }
  
  public Object getExceptionData()
  {
    return fExceptionData;
  }
  
  public boolean isRecoverable()
  {
    return false;
  }
}

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

import java.util.LinkedList;

class GenericEventQueue$EventThread
  extends Thread
{
  private boolean run;
  final GenericEventQueue this$0;
  
  public GenericEventQueue$EventThread(GenericEventQueue paramGenericEventQueue, String title)
  {
    super(title);this$0 = paramGenericEventQueue;run = true;
  }
  
  public void close()
  {
    synchronized (GenericEventQueue.access$0(this$0))
    {
      run = false;
      GenericEventQueue.access$0(this$0).clear();
      GenericEventQueue.access$0(this$0).notifyAll();
    }
  }
  
  public void postEvent(Runnable run)
  {
    if (!isAlive()) {
      throw new IllegalStateException("Event queue thread is not executing.");
    }
    synchronized (GenericEventQueue.access$0(this$0))
    {
      if (run != null) {
        GenericEventQueue.access$0(this$0).addLast(run);
      }
      GenericEventQueue.access$0(this$0).notifyAll();
    }
  }
  
  public void run()
  {
    for (;;)
    {
      Runnable runnable;
      synchronized (GenericEventQueue.access$0(this$0))
      {
        continue;
        try
        {
          GenericEventQueue.access$0(this$0).wait();
        }
        catch (InterruptedException localInterruptedException) {}
        if ((run) && (GenericEventQueue.access$0(this$0).isEmpty())) {
          continue;
        }
        if (!run) {
          return;
        }
        runnable = (Runnable)GenericEventQueue.access$0(this$0).removeFirst();
      }
      try
      {
        runnable.run();
      }
      catch (RuntimeException e)
      {
        e.printStackTrace();
      }
      finally
      {
        Runnable runnable = null;
      }
    }
  }
}

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

import java.util.LinkedList;

public class GenericEventQueue
{
  private LinkedList queue = new LinkedList();
  private EventThread eventThread;
  
  private class EventThread
    extends Thread
  {
    private boolean run = true;
    
    public EventThread(String title)
    {
      super();
    }
    
    public void close()
    {
      synchronized (queue)
      {
        run = false;
        queue.clear();
        queue.notifyAll();
      }
    }
    
    public void postEvent(Runnable run)
    {
      if (!isAlive()) {
        throw new IllegalStateException("Event queue thread is not executing.");
      }
      synchronized (queue)
      {
        if (run != null) {
          queue.addLast(run);
        }
        queue.notifyAll();
      }
    }
    
    public void run()
    {
      for (;;)
      {
        Runnable runnable;
        synchronized (queue)
        {
          continue;
          try
          {
            queue.wait();
          }
          catch (InterruptedException localInterruptedException) {}
          if ((run) && (queue.isEmpty())) {
            continue;
          }
          if (!run) {
            return;
          }
          runnable = (Runnable)queue.removeFirst();
        }
        try
        {
          runnable.run();
        }
        catch (RuntimeException e)
        {
          e.printStackTrace();
        }
        finally
        {
          Runnable runnable = null;
        }
      }
    }
  }
  
  public GenericEventQueue(String queueTitle)
  {
    this(queueTitle, Thread.currentThread().getPriority());
  }
  
  public GenericEventQueue(String queueTitle, int priority)
  {
    eventThread = new EventThread(queueTitle);
    eventThread.setPriority(priority);
    synchronized (queue)
    {
      eventThread.start();
      try
      {
        queue.wait(100L);
      }
      catch (InterruptedException localInterruptedException) {}
    }
  }
  
  public void close()
  {
    eventThread.close();
  }
  
  public void postEvent(Runnable runnable)
  {
    eventThread.postEvent(runnable);
  }
}

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

public abstract interface ICallback
{
  public abstract void initializeCallback(IVMCallbackServer paramIVMCallbackServer, int paramInt);
}

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

public class ICallbackHandler$TransmitableArray
{
  protected final Object[] fArray;
  
  public ICallbackHandler$TransmitableArray(Object[] array)
  {
    fArray = array;
  }
  
  public Object[] getArray()
  {
    return fArray;
  }
}

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

public abstract interface ICallbackHandler
{
  public abstract Object callbackAsConstants(int paramInt1, int paramInt2, Object paramObject)
    throws CommandException;
  
  public abstract Object callbackWithParms(int paramInt1, int paramInt2, Object[] paramArrayOfObject)
    throws CommandException;
  
  public static class TransmitableArray
  {
    protected final Object[] fArray;
    
    public TransmitableArray(Object[] array)
    {
      fArray = array;
    }
    
    public Object[] getArray()
    {
      return fArray;
    }
  }
}

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

public abstract interface ICallbackRunnable
{
  public abstract Object run(ICallbackHandler paramICallbackHandler)
    throws CommandException;
}

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

public class ICommandException {}

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

import java.io.OutputStream;

public abstract interface IVMCallbackServer
{
  public abstract IVMServer getIVMServer();
  
  public abstract Object doCallback(ICallbackRunnable paramICallbackRunnable)
    throws CommandException;
  
  public abstract OutputStream requestStream(int paramInt1, int paramInt2)
    throws CommandException;
}

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

public abstract interface IVMServer
{
  public abstract void addShutdownListener(Runnable paramRunnable);
  
  public abstract void removeShutdownListener(Runnable paramRunnable);
}

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

import java.util.HashMap;

public class MapTypes
{
  public static final HashMap MAP_SHORTSIG_TO_TYPE = new HashMap(8);
  public static final HashMap MAP_TYPENAME_TO_SHORTSIG = new HashMap(8);
  
  static
  {
    MAP_SHORTSIG_TO_TYPE.put("B", Byte.TYPE);
    MAP_SHORTSIG_TO_TYPE.put("C", Character.TYPE);
    MAP_SHORTSIG_TO_TYPE.put("D", Double.TYPE);
    MAP_SHORTSIG_TO_TYPE.put("F", Float.TYPE);
    MAP_SHORTSIG_TO_TYPE.put("I", Integer.TYPE);
    MAP_SHORTSIG_TO_TYPE.put("J", Long.TYPE);
    MAP_SHORTSIG_TO_TYPE.put("S", Short.TYPE);
    MAP_SHORTSIG_TO_TYPE.put("Z", Boolean.TYPE);
    
    MAP_TYPENAME_TO_SHORTSIG.put("byte", "B");
    MAP_TYPENAME_TO_SHORTSIG.put("char", "C");
    MAP_TYPENAME_TO_SHORTSIG.put("double", "D");
    MAP_TYPENAME_TO_SHORTSIG.put("float", "F");
    MAP_TYPENAME_TO_SHORTSIG.put("int", "I");
    MAP_TYPENAME_TO_SHORTSIG.put("long", "J");
    MAP_TYPENAME_TO_SHORTSIG.put("short", "S");
    MAP_TYPENAME_TO_SHORTSIG.put("boolean", "Z");
  }
  
  public static String getJNIFormatName(String classname)
  {
    if ((classname.length() == 0) || (!classname.endsWith("]"))) {
      return classname;
    }
    StringBuffer jni = new StringBuffer(classname.length());
    int firstOpenBracket = classname.indexOf('[');
    int ob = firstOpenBracket;
    while (ob > -1)
    {
      int cb = classname.indexOf(']', ob);
      if (cb == -1) {
        break;
      }
      jni.append('[');
      ob = classname.indexOf('[', cb);
    }
    String finalType = classname.substring(0, firstOpenBracket).trim();
    if (finalType != null)
    {
      String shortSig = (String)MAP_TYPENAME_TO_SHORTSIG.get(finalType);
      if (shortSig == null)
      {
        jni.append('L');
        jni.append(finalType);
        jni.append(';');
      }
      else
      {
        jni.append(shortSig);
      }
    }
    return jni.toString();
  }
  
  public static String getFormalTypeName(String jniName)
  {
    if (jniName.charAt(0) == '[')
    {
      int dims = jniName.lastIndexOf('[') + 1;
      int startType = dims;
      StringBuffer fName = new StringBuffer(jniName.length() + 2 * dims);
      if (jniName.charAt(startType) == 'L')
      {
        fName.append(jniName.substring(startType + 1, jniName.length() - 1));
      }
      else if (jniName.length() == startType + 1)
      {
        Class type = (Class)MAP_SHORTSIG_TO_TYPE.get(jniName.substring(startType, startType + 1));
        if (type != null)
        {
          fName.append(type.getName());
          break label128;
        }
        return "";
      }
      label128:
      while (dims-- > 0) {
        fName.append("[]");
      }
      return fName.toString();
    }
    if (jniName.length() == 1)
    {
      Class type = (Class)MAP_SHORTSIG_TO_TYPE.get(jniName);
      if (type != null) {
        return type.getName();
      }
    }
    return jniName;
  }
  
  public static String getJNITypeName(String finalComponent, int dimensions)
  {
    StringBuffer jni = new StringBuffer(finalComponent.length() + dimensions + 2);
    while (dimensions-- > 0) {
      jni.append('[');
    }
    String shortSig = (String)MAP_TYPENAME_TO_SHORTSIG.get(finalComponent);
    if (shortSig == null)
    {
      jni.append('L');
      jni.append(finalComponent);
      jni.append(';');
    }
    else
    {
      jni.append(shortSig);
    }
    return jni.toString();
  }
}

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

import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class Messages
{
  private static final String BUNDLE_NAME = "org.eclipse.jem.internal.proxy.common.messages";
  private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle("org.eclipse.jem.internal.proxy.common.messages");
  
  public static String getString(String key)
  {
    try
    {
      return RESOURCE_BUNDLE.getString(key);
    }
    catch (MissingResourceException localMissingResourceException) {}
    return '!' + key + '!';
  }
}

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

class MethodHelper$NULL_CLASS {}

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

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class MethodHelper
{
  public static final Class NULL_TYPE = NULL_CLASS.class;
  static final ArrayList sPrimitivesOrder = new ArrayList(6);
  
  static
  {
    sPrimitivesOrder.add(Byte.TYPE);
    sPrimitivesOrder.add(Short.TYPE);
    sPrimitivesOrder.add(Integer.TYPE);
    sPrimitivesOrder.add(Long.TYPE);
    sPrimitivesOrder.add(Float.TYPE);
    sPrimitivesOrder.add(Double.TYPE);
  }
  
  static final int sCharPos = sPrimitivesOrder.indexOf(Short.TYPE);
  
  public static boolean isAssignableFrom(Class type1, Class type2)
  {
    if (type1 == type2) {
      return true;
    }
    if (type1.isPrimitive())
    {
      if (type2.isPrimitive())
      {
        if ((type1 == Boolean.TYPE) || (type2 == Boolean.TYPE)) {
          return false;
        }
        int type1Pos = type1 != Character.TYPE ? sPrimitivesOrder.indexOf(type1) : sCharPos;
        int type2Pos = type2 != Character.TYPE ? sPrimitivesOrder.indexOf(type2) : sCharPos;
        return type1Pos > type2Pos;
      }
      return false;
    }
    if (type2 == NULL_TYPE) {
      return true;
    }
    return type1.isAssignableFrom(type2);
  }
  
  public static boolean isAssignableFrom(Class[] types1, Class[] types2)
  {
    if (types1.length != types2.length) {
      return false;
    }
    for (int i = 0; i < types1.length; i++) {
      if (!isAssignableFrom(types1[i], types2[i])) {
        return false;
      }
    }
    return true;
  }
  
  private static int findMostCompatible(List methods, List parms, String ambiguousName)
    throws AmbiguousMethodException
  {
    Class[][] parmsCopy = (Class[][])parms.toArray(new Class[parms.size()][]);
    int size = parmsCopy.length;
    for (int i = 0; i < size; i++)
    {
      Class dclClassi = methods != null ? ((Method)methods.get(i)).getDeclaringClass() : null;
      Class[] parmsi = parmsCopy[i];
      for (int j = 0; j < size; j++) {
        if (i != j)
        {
          if ((dclClassi != null) && 
          
            (!isAssignableFrom(((Method)methods.get(j)).getDeclaringClass(), dclClassi))) {
            break;
          }
          Class[] parmsj = parmsCopy[j];
          if (!isAssignableFrom(parmsj, parmsi)) {
            break;
          }
        }
      }
      return i;
    }
    throw new AmbiguousMethodException(ambiguousName);
  }
  
  public static Method findCompatibleMethod(Class receiver, String methodName, Class[] arguments)
    throws NoSuchMethodException, AmbiguousMethodException
  {
    try
    {
      return receiver.getMethod(methodName, arguments);
    }
    catch (NoSuchMethodException exc)
    {
      if (arguments != null)
      {
        ArrayList parmsList = new ArrayList();
        ArrayList mthdsList = new ArrayList();
        Class cls = receiver;
        while (cls != null)
        {
          Method[] mthds = cls.getDeclaredMethods();
          for (int i = 0; i < mthds.length; i++)
          {
            Method mthd = mthds[i];
            if (mthd.getName().equals(methodName))
            {
              int modifiers = mthd.getModifiers();
              if ((Modifier.isPublic(modifiers)) || (Modifier.isProtected(modifiers)))
              {
                Class[] parms = mthd.getParameterTypes();
                if (Arrays.equals(arguments, parms)) {
                  return makeMethodAccessable(mthd);
                }
                if (isAssignableFrom(parms, arguments))
                {
                  int size = parmsList.size();
                  for (int j = 0; j < size; j++) {
                    if (!Arrays.equals(parms, (Object[])parmsList.get(j))) {}
                  }
                  parmsList.add(parms);
                  mthdsList.add(mthd);
                }
              }
            }
          }
          cls = cls.getSuperclass();
        }
        if (parmsList.size() == 0) {
          throw throwFixedNoSuchMethod(exc, receiver, methodName, arguments);
        }
        if (parmsList.size() == 1) {
          return makeMethodAccessable((Method)mthdsList.get(0));
        }
        int mostCompatible = findMostCompatible(mthdsList, parmsList, methodName);
        return makeMethodAccessable((Method)mthdsList.get(mostCompatible));
      }
      throw throwFixedNoSuchMethod(exc, receiver, methodName, arguments);
    }
  }
  
  private static Method makeMethodAccessable(Method m)
  {
    m.setAccessible(true);
    return m;
  }
  
  private static NoSuchMethodException throwFixedNoSuchMethod(NoSuchMethodException e, Class declareClass, String methodName, Class[] argClasses)
  {
    StringBuffer s = new StringBuffer();
    s.append(declareClass.getName());
    s.append('.');
    s.append(methodName);
    s.append('(');
    if (argClasses != null) {
      for (int i = 0; i < argClasses.length; i++)
      {
        if (i > 0) {
          s.append(',');
        }
        s.append(argClasses[i].getName());
      }
    }
    s.append(')');
    NoSuchMethodException ne = new NoSuchMethodException(s.toString());
    ne.setStackTrace(e.getStackTrace());
    return ne;
  }
  
  public static Constructor findCompatibleConstructor(Class receiver, Class[] arguments)
    throws NoSuchMethodException, AmbiguousMethodException, IllegalAccessException
  {
    if ((receiver.getDeclaringClass() != null) && (!Modifier.isStatic(receiver.getModifiers()))) {
      throw new IllegalAccessException(MessageFormat.format(Messages.getString("MethodHelper.NONSTATICINNERCLASS_WARNING"), new Object[] { receiver.getName() }));
    }
    try
    {
      Constructor ctor = receiver.getDeclaredConstructor(arguments);
      ctor.setAccessible(true);
      return ctor;
    }
    catch (NoSuchMethodException exc)
    {
      if (arguments != null)
      {
        Constructor[] ctors = receiver.getDeclaredConstructors();
        ArrayList parmsList = new ArrayList(ctors.length);
        ArrayList ctorsList = new ArrayList(ctors.length);
        for (int i = 0; i < ctors.length; i++)
        {
          Constructor ctor = ctors[i];
          Class[] parms = ctor.getParameterTypes();
          if (isAssignableFrom(parms, arguments))
          {
            parmsList.add(parms);
            ctorsList.add(ctor);
          }
        }
        if (parmsList.size() == 0) {
          throw exc;
        }
        if (parmsList.size() == 1)
        {
          Constructor ctor = (Constructor)ctorsList.get(0);
          ctor.setAccessible(true);
          return ctor;
        }
        int mostCompatible = findMostCompatible(null, parmsList, receiver.getName());
        Constructor ctor = (Constructor)ctorsList.get(mostCompatible);
        ctor.setAccessible(true);
        return ctor;
      }
      throw exc;
    }
  }
  
  private static class NULL_CLASS {}
}

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

public class UnresolvedCompilationError
  extends Error
{
  private static final long serialVersionUID = 7778842211073592790L;
  
  public UnresolvedCompilationError(Error error)
  {
    super(error.getMessage());
    setStackTrace(error.getStackTrace());
  }
}

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

import org.eclipse.jem.internal.proxy.common.CommandException;

public class CommandErrorException
  extends CommandException
{
  private static final long serialVersionUID = 1701752035606593305L;
  private final Object fErrorObject;
  private final int fErrorCode;
  
  public CommandErrorException(int errorCode, Commands.ValueObject errorData)
  {
    super(errorData.clone());
    fErrorObject = null;
    fErrorCode = errorCode;
  }
  
  public CommandErrorException(String msg, int errorCode, Commands.ValueObject errorData, Object errorObject)
  {
    super(msg, errorData.clone());
    fErrorObject = errorObject;
    fErrorCode = errorCode;
  }
  
  public Commands.ValueObject getValue()
  {
    return (Commands.ValueObject)getExceptionData();
  }
  
  public boolean isRecoverable()
  {
    return true;
  }
  
  public int getErrorCode()
  {
    return fErrorCode;
  }
  
  public Object getErrorObject()
  {
    return fErrorObject;
  }
  
  public String toString()
  {
    return super.toString() + "-- Error code:" + getErrorCode() + (getValue() != null ? " Value data:\"" + getValue().getAsObject() + "\"" : " ") + (fErrorObject != null ? " Error object:\"" + fErrorObject.toString() + "\"" : " ");
  }
}

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

class Commands$1
  implements Commands.ValueSender
{
  public void sendValue(Commands.ValueObject value) {}
  
  public Commands.ValueSender nestedArray(Commands.ValueObject arrayValue)
  {
    return this;
  }
  
  public void initialize(Commands.ValueObject arrayHeader) {}
}

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

public class Commands$GetClassIDReturn
{
  public String className;
  public boolean isInterface;
  public boolean isAbstract;
  public String superClassname;
}

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

public class Commands$GetClassReturn
{
  public int classID;
  public boolean isInterface;
  public boolean isAbstract;
  public String superClassname;
}

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

public class Commands$ValueObject
  implements Cloneable
{
  public byte type;
  public byte aByte;
  public char aChar;
  public double aDouble;
  public float aFloat;
  public int anInt;
  public short aShort;
  public long aLong;
  public boolean aBool;
  public int objectID;
  public int classID;
  public Object anObject;
  
  public Commands$ValueObject()
  {
    type = 0;
  }
  
  public Object clone()
  {
    try
    {
      return super.clone();
    }
    catch (CloneNotSupportedException localCloneNotSupportedException) {}
    return null;
  }
  
  public boolean isPrimitive()
  {
    return getPrimitiveType().isPrimitive();
  }
  
  public Class getPrimitiveType()
  {
    switch (type)
    {
    case 5: 
      return Byte.TYPE;
    case 7: 
      return Character.TYPE;
    case 9: 
      return Double.TYPE;
    case 11: 
      return Float.TYPE;
    case 3: 
      return Integer.TYPE;
    case 13: 
      return Short.TYPE;
    case 15: 
      return Long.TYPE;
    case 1: 
      return Boolean.TYPE;
    }
    Class tmp115_112 = Commands.class$0;
    if (tmp115_112 == null)
    {
      tmp115_112;
      try
      {
        tmpTernaryOp = (Commands.class$0 = Class.forName("java.lang.Object"));
      }
      catch (ClassNotFoundException localClassNotFoundException)
      {
        throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
      }
    }
    return tmp115_112;
  }
  
  public int getType()
  {
    return type;
  }
  
  public Object getAsObject()
  {
    switch (type)
    {
    case 0: 
      return null;
    case 5: 
    case 6: 
      return new Byte(aByte);
    case 7: 
    case 8: 
      return new Character(aChar);
    case 9: 
    case 10: 
      return new Double(aDouble);
    case 11: 
    case 12: 
      return new Float(aFloat);
    case 3: 
    case 4: 
      return new Integer(anInt);
    case 13: 
    case 14: 
      return new Short(aShort);
    case 15: 
    case 16: 
      return new Long(aLong);
    case 1: 
    case 2: 
      return aBool ? Boolean.TRUE : Boolean.FALSE;
    case 17: 
      return anObject;
    case 23: 
      return anObject;
    }
    return null;
  }
  
  public void setAsObject(Object value, int valueClassID)
  {
    switch (valueClassID)
    {
    case 0: 
      set();
      break;
    case 6: 
      set((Byte)value);
      break;
    case 8: 
      set((Character)value);
      break;
    case 10: 
      set((Double)value);
      break;
    case 12: 
      set((Float)value);
      break;
    case 4: 
      set((Integer)value);
      break;
    case 14: 
      set((Short)value);
      break;
    case 16: 
      set((Long)value);
      break;
    case 2: 
      set((Boolean)value);
      break;
    case 17: 
      set((String)value);
      break;
    case 1: 
    case 3: 
    case 5: 
    case 7: 
    case 9: 
    case 11: 
    case 13: 
    case 15: 
    default: 
      set(value, valueClassID);
    }
  }
  
  public void set()
  {
    type = 0;
    anObject = null;
  }
  
  public void setFlag(int flag)
  {
    type = 54;
    anInt = flag;
  }
  
  public void set(byte value)
  {
    type = 5;
    aByte = value;
    anObject = null;
  }
  
  public void set(Byte value)
  {
    if (value != null)
    {
      type = 6;
      aByte = value.byteValue();
      anObject = null;
    }
    else
    {
      set();
    }
  }
  
  public void set(char value)
  {
    type = 7;
    aChar = value;
    anObject = null;
  }
  
  public void set(Character value)
  {
    if (value != null)
    {
      type = 8;
      aChar = value.charValue();
      anObject = null;
    }
    else
    {
      set();
    }
  }
  
  public void set(double value)
  {
    type = 9;
    aDouble = value;
    anObject = null;
  }
  
  public void set(Double value)
  {
    if (value != null)
    {
      type = 10;
      aDouble = value.doubleValue();
      anObject = null;
    }
    else
    {
      set();
    }
  }
  
  public void set(float value)
  {
    type = 11;
    aFloat = value;
    anObject = null;
  }
  
  public void set(Float value)
  {
    if (value != null)
    {
      type = 12;
      aFloat = value.floatValue();
      anObject = null;
    }
    else
    {
      set();
    }
  }
  
  public void set(int value)
  {
    type = 3;
    anInt = value;
    anObject = null;
  }
  
  public void set(Integer value)
  {
    if (value != null)
    {
      type = 4;
      anInt = value.intValue();
      anObject = null;
    }
    else
    {
      set();
    }
  }
  
  public void set(short value)
  {
    type = 13;
    aShort = value;
    anObject = null;
  }
  
  public void set(Short value)
  {
    if (value != null)
    {
      type = 14;
      aShort = value.shortValue();
      anObject = null;
    }
    else
    {
      set();
    }
  }
  
  public void set(long value)
  {
    type = 15;
    aLong = value;
    anObject = null;
  }
  
  public void set(Long value)
  {
    type = 16;
    aLong = value.longValue();
    anObject = null;
  }
  
  public void set(boolean value)
  {
    type = 1;
    aBool = value;
    anObject = null;
  }
  
  public void set(Boolean value)
  {
    if (value != null)
    {
      type = 2;
      aBool = value.booleanValue();
      anObject = null;
    }
    else
    {
      set();
    }
  }
  
  public void set(String value)
  {
    if (value != null)
    {
      type = 17;
      anObject = value;
    }
    else
    {
      set();
    }
  }
  
  public void set(Object value, int classObjectID)
  {
    if (value != null)
    {
      type = 23;
      classID = classObjectID;
      anObject = value;
    }
    else
    {
      set();
    }
  }
  
  public void setObjectID(int value)
  {
    type = 50;
    objectID = value;
    anObject = null;
  }
  
  public void setArrayIDS(Commands.ValueRetrieve retriever, int arraySize, int componentType)
  {
    type = 53;
    classID = componentType;
    anInt = arraySize;
    anObject = retriever;
  }
  
  public void setObjectID(int value, int classObjectID)
  {
    type = 51;
    objectID = value;
    classID = classObjectID;
    anObject = null;
  }
  
  public void setException(int throwID, int throwClassID)
  {
    type = 52;
    objectID = throwID;
    classID = throwClassID;
    anObject = null;
  }
}

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

import java.io.EOFException;

public abstract interface Commands$ValueRetrieve
{
  public abstract Commands.ValueObject nextValue()
    throws EOFException;
}

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

public abstract interface Commands$ValueSender
{
  public abstract void sendValue(Commands.ValueObject paramValueObject);
  
  public abstract ValueSender nestedArray(Commands.ValueObject paramValueObject);
  
  public abstract void initialize(Commands.ValueObject paramValueObject);
}

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

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import org.eclipse.jem.internal.proxy.common.CommandException;

public class Commands
{
  public static final byte GET_CLASS = 1;
  public static final byte VALUE = 2;
  public static final byte QUIT_CONNECTION = 4;
  public static final byte TERMINATE_SERVER = 5;
  public static final byte ERROR = 6;
  public static final byte RELEASE_OBJECT = 7;
  public static final byte GET_CLASS_RETURN = 8;
  public static final byte NEW_INIT_STRING = 11;
  public static final byte GET_CLASS_FROM_ID = 12;
  public static final byte GET_CLASS_ID_RETURN = 13;
  public static final byte GET_OBJECT_DATA = 14;
  public static final byte INVOKE = 15;
  public static final byte ALIVE = 16;
  public static final byte REMOTE_STARTED = 17;
  public static fi
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