org.eclipse.jem.proxy_2.0.400.v201101101900

      ep.setProxy(fieldProxy);
      eproc.allocateExpressionProxy(ep);
    }
    catch (ThrowableProxy e)
    {
      ((IDEFieldExpressionProxy)proxy).setThrowable(e);
      eproc.processException(e);
    }
  }
  
  protected IDEFieldProxy getIDEFieldProxy(IProxyField field)
    throws ThrowableProxy
  {
    IDEFieldProxy fieldProxy;
    IDEFieldProxy fieldProxy;
    if (field.isExpressionProxy()) {
      fieldProxy = ((IDEFieldExpressionProxy)field).getFieldProxy();
    } else {
      fieldProxy = (IDEFieldProxy)field;
    }
    return fieldProxy;
  }
  
  protected void pushIfTestToProxy()
  {
    eproc.pushIfElse();
  }
  
  protected void pushIfElseToProxy(InternalIfElseOperandType clauseType)
  {
    eproc.pushIfElse(clauseType);
  }
  
  protected void pushNewInstanceToProxy(String initializationString, IProxyBeanType resultType)
  {
    try
    {
      eproc.pushNewInstanceFromString(initializationString, getIDEBeanTypeProxy(resultType).getTypeClass(), getIDERegistryfClassLoader);
    }
    catch (ThrowableProxy e)
    {
      eproc.processException(e);
    }
  }
  
  protected void pushMarkToProxy(int markID)
  {
    eproc.pushMark(markID);
  }
  
  protected void pushEndmarkToProxy(int markID, boolean restore)
  {
    eproc.pushEndmark(markID, restore);
  }
  
  protected void pushBeginTransferThreadToProxy() {}
  
  protected void pushTransferThreadToProxy() {}
  
  protected void pushSubexpressionBeginToProxy(int subexpressionNumber)
  {
    eproc.pushSubexpressionBegin(subexpressionNumber);
  }
  
  protected void pushSubexpressionEndToProxy(int subexpressionNumber)
  {
    eproc.pushSubexpressionEnd(subexpressionNumber);
  }
}

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

import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxyFactory;
import org.eclipse.jem.internal.proxy.core.IExpression;
import org.eclipse.jem.internal.proxy.core.IProxyBeanType;

public abstract interface IDEExtensionBeanTypeProxyFactory
  extends IBeanTypeProxyFactory
{
  public abstract IDEBeanTypeProxy getExtensionBeanTypeProxy(String paramString);
  
  public abstract IDEBeanTypeProxy getExtensionBeanTypeProxy(String paramString, IBeanTypeProxy paramIBeanTypeProxy);
  
  public abstract IProxyBeanType getExtensionBeanTypeProxy(String paramString, IExpression paramIExpression);
}

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

import java.lang.reflect.Field;
import org.eclipse.core.runtime.Status;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
import org.eclipse.jem.internal.proxy.core.IFieldProxy;
import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.osgi.framework.Bundle;

public class IDEFieldProxy
  extends IDEAccessibleObjectProxy
  implements IFieldProxy
{
  protected IBeanTypeProxy fFieldType;
  
  IDEFieldProxy(IDEProxyFactoryRegistry aRegistry, Field aField)
  {
    super(aRegistry, aField);
  }
  
  public IBeanProxy get(IBeanProxy aSubject)
  {
    Object result = null;
    try
    {
      result = ((Field)getBean()).get(aSubject != null ? ((IIDEBeanProxy)aSubject).getBean() : null);
    }
    catch (Exception e)
    {
      ProxyPlugin.getPlugin().getLogger().log(
        new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
    }
    if (result != null) {
      return fProxyFactoryRegistry.getBeanProxy(((Field)getBean()).getType(), result);
    }
    return null;
  }
  
  public void set(IBeanProxy aSubject, IBeanProxy argument)
  {
    try
    {
      ((Field)getBean()).set(
        aSubject != null ? ((IIDEBeanProxy)aSubject).getBean() : null, 
        argument != null ? ((IIDEBeanProxy)argument).getBean() : null);
    }
    catch (Exception e)
    {
      ProxyPlugin.getPlugin().getLogger().log(
        new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
    }
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    return fProxyFactoryRegistry.getMethodProxyFactory()).fieldType;
  }
  
  public IBeanTypeProxy getFieldType()
  {
    if (fFieldType == null) {
      fFieldType = 
        ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(
        ((Field)getBean()).getType());
    }
    return fFieldType;
  }
}

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

import java.lang.reflect.Field;

public class IDEFieldTypeProxy
  extends IDEBeanTypeProxy
{
  IDEFieldTypeProxy(IDEProxyFactoryRegistry registry)
  {
    super(registry, Field.class);
  }
  
  protected IIDEBeanProxy newBeanProxy(Object anObject)
  {
    return new IDEFieldProxy(fProxyFactoryRegistry, (Field)anObject);
  }
}

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

import org.eclipse.jem.internal.proxy.core.INumberBeanProxy;

final class IDEFloatClassBeanTypeProxy
  extends IDENumberBeanTypeProxy
{
  protected IDEFloatClassBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass)
  {
    super(aRegistry, aClass, new Float(0.0F));
  }
  
  INumberBeanProxy createFloatBeanProxy(Float aFloat)
  {
    return new IDENumberBeanProxy(fProxyFactoryRegistry, aFloat, this);
  }
}

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

import org.eclipse.jem.internal.proxy.core.INumberBeanProxy;

final class IDEFloatTypeBeanTypeProxy
  extends IDEPrimitiveBeanTypeProxy
{
  protected IDEFloatTypeBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass)
  {
    super(aRegistry, aClass);
  }
  
  INumberBeanProxy createFloatBeanProxy(float aFloat)
  {
    return new IDENumberBeanProxy(fProxyFactoryRegistry, new Float(aFloat), this);
  }
  
  int getPrimitiveType()
  {
    return 5;
  }
  
  protected IIDEBeanProxy newBeanProxy(Object anObject)
  {
    Number n = (anObject instanceof Character) ? new Float(((Character)anObject).charValue()) : (Number)anObject;
    return new IDENumberBeanProxy(fProxyFactoryRegistry, n, this);
  }
}

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

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.IFieldProxy;
import org.eclipse.jem.internal.proxy.core.IMethodProxy;

public class IDEInitErrorBeanTypeProxy
  extends IDEBeanTypeProxy
{
  protected String classname;
  protected String initializationError;
  protected Throwable cause;
  
  protected IDEInitErrorBeanTypeProxy(IDEProxyFactoryRegistry registry, String classname, String initializationError, Throwable cause)
  {
    super(registry, null);
    this.classname = classname;
    this.initializationError = initializationError;
    this.cause = cause;
  }
  
  public Throwable getCause()
  {
    return cause;
  }
  
  public IConstructorProxy getConstructorProxy(String[] argumentClassNames)
  {
    return null;
  }
  
  public IConstructorProxy getConstructorProxy(IBeanTypeProxy[] argumentTypes)
  {
    return null;
  }
  
  public IConstructorProxy[] getConstructors()
  {
    return null;
  }
  
  public IConstructorProxy getDeclaredConstructorProxy(String[] argumentClassNames)
  {
    return null;
  }
  
  public IConstructorProxy getDeclaredConstructorProxy(IBeanTypeProxy[] argumentTypes)
  {
    return null;
  }
  
  public IConstructorProxy[] getDeclaredConstructors()
  {
    return null;
  }
  
  public IFieldProxy[] getFields()
  {
    return null;
  }
  
  public IFieldProxy[] getDeclaredFields()
  {
    return null;
  }
  
  public IFieldProxy getFieldProxy(String fieldName)
  {
    return null;
  }
  
  public IMethodProxy[] getMethods()
  {
    return null;
  }
  
  public IMethodProxy[] getDeclaredMethods()
  {
    return null;
  }
  
  public IMethodProxy getMethodProxy(String methodName)
  {
    return null;
  }
  
  public IMethodProxy getMethodProxy(String methodName, String[] argumentClassNames)
  {
    return null;
  }
  
  public IMethodProxy getMethodProxy(String methodName, String argumentClassName)
  {
    return null;
  }
  
  public IMethodProxy getMethodProxy(String methodName, IBeanTypeProxy[] argumentTypes)
  {
    return null;
  }
  
  public IMethodProxy getDeclaredMethodProxy(String methodName, String[] argumentClassNames)
  {
    return null;
  }
  
  public IMethodProxy getDeclaredMethodProxy(String methodName, IBeanTypeProxy[] argumentTypes)
  {
    return null;
  }
  
  public IConstructorProxy getNullConstructorProxy()
  {
    return null;
  }
  
  public IBeanTypeProxy getSuperBeanTypeProxy()
  {
    return null;
  }
  
  public String getTypeName()
  {
    return classname;
  }
  
  public String getFormalTypeName()
  {
    return getTypeName();
  }
  
  public boolean isArray()
  {
    return false;
  }
  
  public boolean isInterface()
  {
    return false;
  }
  
  public boolean isPrimitive()
  {
    return false;
  }
  
  public boolean isKindOf(IBeanTypeProxy aBeanProxyType)
  {
    return false;
  }
  
  public IBeanProxy newInstance()
  {
    return null;
  }
  
  public IBeanProxy newInstance(String initializationString)
  {
    return null;
  }
  
  public String getInitializationError()
  {
    return initializationError;
  }
  
  public String toBeanString()
  {
    return classname;
  }
  
  public boolean isValid()
  {
    return false;
  }
  
  public IConstructorProxy getCompatibleConstructor(IBeanTypeProxy[] argumentTypes)
  {
    return null;
  }
  
  public IMethodProxy getCompatibleMethod(String methodName, IBeanTypeProxy[] argumentTypes)
  {
    return null;
  }
}

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

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

public class IDEIntegerBeanProxy
  extends IDENumberBeanProxy
  implements IIntegerBeanProxy
{
  protected int fIntValue;
  
  IDEIntegerBeanProxy(IDEProxyFactoryRegistry aRegistry, Number anInteger, IBeanTypeProxy aBeanTypeProxy)
  {
    super(aRegistry, anInteger, aBeanTypeProxy);
    fIntValue = anInteger.intValue();
  }
  
  public int intValue()
  {
    return fIntValue;
  }
}

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

import org.eclipse.jem.internal.proxy.core.IIntegerBeanProxy;

final class IDEIntegerClassBeanTypeProxy
  extends IDENumberBeanTypeProxy
{
  private final IDEIntegerBeanProxy zeroIntProxy;
  private final IDEIntegerBeanProxy oneIntProxy;
  private final IDEIntegerBeanProxy twoIntProxy;
  private final IDEIntegerBeanProxy threeIntProxy;
  
  IDEIntegerClassBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass)
  {
    super(aRegistry, aClass, new Integer(0));
    
    zeroIntProxy = new IDEIntegerBeanProxy(aRegistry, new Integer(0), this);
    oneIntProxy = new IDEIntegerBeanProxy(aRegistry, new Integer(1), this);
    twoIntProxy = new IDEIntegerBeanProxy(aRegistry, new Integer(2), this);
    threeIntProxy = new IDEIntegerBeanProxy(aRegistry, new Integer(3), this);
  }
  
  IIntegerBeanProxy createIntegerBeanProxy(Integer anInteger)
  {
    switch (anInteger.intValue())
    {
    case 0: 
      return zeroIntProxy;
    case 1: 
      return oneIntProxy;
    case 2: 
      return twoIntProxy;
    case 3: 
      return threeIntProxy;
    }
    return new IDEIntegerBeanProxy(fProxyFactoryRegistry, anInteger, this);
  }
  
  protected IIDEBeanProxy newBeanProxy(Object anObject)
  {
    return (IIDEBeanProxy)createIntegerBeanProxy((Integer)anObject);
  }
}

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

import org.eclipse.jem.internal.proxy.core.IIntegerBeanProxy;

final class IDEIntegerTypeBeanTypeProxy
  extends IDEPrimitiveBeanTypeProxy
{
  private final IDEIntegerBeanProxy zeroProxy;
  private final IDEIntegerBeanProxy oneProxy;
  private final IDEIntegerBeanProxy twoProxy;
  private final IDEIntegerBeanProxy threeProxy;
  
  IDEIntegerTypeBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass)
  {
    super(aRegistry, aClass);
    
    zeroProxy = new IDEIntegerBeanProxy(aRegistry, new Integer(0), this);
    oneProxy = new IDEIntegerBeanProxy(aRegistry, new Integer(1), this);
    twoProxy = new IDEIntegerBeanProxy(aRegistry, new Integer(2), this);
    threeProxy = new IDEIntegerBeanProxy(aRegistry, new Integer(3), this);
  }
  
  IIntegerBeanProxy createIntegerBeanProxy(int anInt)
  {
    switch (anInt)
    {
    case 0: 
      return zeroProxy;
    case 1: 
      return oneProxy;
    case 2: 
      return twoProxy;
    case 3: 
      return threeProxy;
    }
    return new IDEIntegerBeanProxy(fProxyFactoryRegistry, new Integer(anInt), this);
  }
  
  protected IIDEBeanProxy newBeanProxy(Object anObject)
  {
    Number n = (anObject instanceof Character) ? new Integer(((Character)anObject).charValue()) : (Number)anObject;
    switch (n.intValue())
    {
    case 0: 
      return zeroProxy;
    case 1: 
      return oneProxy;
    case 2: 
      return twoProxy;
    case 3: 
      return threeProxy;
    }
    return new IDEIntegerBeanProxy(fProxyFactoryRegistry, n, this);
  }
  
  int getPrimitiveType()
  {
    return 6;
  }
}

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

import org.eclipse.jem.internal.proxy.core.INumberBeanProxy;

final class IDELongClassBeanTypeProxy
  extends IDENumberBeanTypeProxy
{
  protected IDELongClassBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass)
  {
    super(aRegistry, aClass, new Long(0L));
  }
  
  INumberBeanProxy createLongBeanProxy(Long aLong)
  {
    return new IDENumberBeanProxy(fProxyFactoryRegistry, aLong, this);
  }
}

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

import org.eclipse.jem.internal.proxy.core.INumberBeanProxy;

final class IDELongTypeBeanTypeProxy
  extends IDEPrimitiveBeanTypeProxy
{
  protected IDELongTypeBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass)
  {
    super(aRegistry, aClass);
  }
  
  INumberBeanProxy createLongBeanProxy(long aLong)
  {
    return new IDENumberBeanProxy(fProxyFactoryRegistry, new Long(aLong), this);
  }
  
  int getPrimitiveType()
  {
    return 7;
  }
  
  protected IIDEBeanProxy newBeanProxy(Object anObject)
  {
    Number n = (anObject instanceof Character) ? new Long(((Character)anObject).charValue()) : (Number)anObject;
    return new IDENumberBeanProxy(fProxyFactoryRegistry, n, this);
  }
}

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

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.eclipse.core.runtime.Status;
import org.eclipse.jem.internal.proxy.core.IBeanProxy;
import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
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;

public class IDEMethodProxy
  extends IDEAccessibleObjectProxy
  implements IMethodProxy
{
  protected IDEMethodProxy(IDEProxyFactoryRegistry aRegistry, Method aMethod)
  {
    super(aRegistry, aMethod);
  }
  
  public IBeanTypeProxy getClassType()
  {
    return ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(
      ((Method)getBean()).getDeclaringClass());
  }
  
  public IBeanTypeProxy getReturnType()
  {
    return ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(
      ((Method)getBean()).getReturnType());
  }
  
  public IBeanTypeProxy[] getParameterTypes()
  {
    Class[] parmClasses = ((Method)getBean()).getParameterTypes();
    IBeanTypeProxy[] parmTypes = new IBeanTypeProxy[parmClasses.length];
    IDEStandardBeanTypeProxyFactory factory = (IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory();
    for (int i = 0; i < parmClasses.length; i++) {
      parmTypes[i] = factory.getBeanTypeProxy(parmClasses[i]);
    }
    return parmTypes;
  }
  
  public String getName()
  {
    return ((Method)getBean()).getName();
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    return fProxyFactoryRegistry.getMethodProxyFactory()).methodType;
  }
  
  public IBeanProxy invoke(IBeanProxy subject)
    throws ThrowableProxy
  {
    try
    {
      Object result = ((Method)getBean()).invoke(subject != null ? ((IIDEBeanProxy)subject).getBean() : null, new Object[0]);
      if (result == null) {
        return null;
      }
      Class returnType = ((Method)getBean()).getReturnType();
      return getBeanProxy(returnType, result);
    }
    catch (InvocationTargetException e)
    {
      IBeanTypeProxy exceptionTypeProxy = 
        ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(
        e.getTargetException().getClass());
      throw new IDEThrowableProxy(e.getTargetException(), exceptionTypeProxy);
    }
    catch (Exception exc)
    {
      IBeanTypeProxy exceptionTypeProxy = 
        ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(exc.getClass());
      throw new IDEThrowableProxy(exc, exceptionTypeProxy);
    }
  }
  
  public IBeanProxy invokeCatchThrowableExceptions(IBeanProxy subject)
  {
    try
    {
      return invoke(subject);
    }
    catch (ThrowableProxy exc)
    {
      ProxyPlugin.getPlugin().getLogger().log(
        new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", exc));
    }
    return null;
  }
  
  public IBeanProxy invoke(IBeanProxy subject, IBeanProxy argument)
    throws ThrowableProxy
  {
    try
    {
      Object result = 
        ((Method)getBean()).invoke(
        subject != null ? ((IIDEBeanProxy)subject).getBean() : null, 
        new Object[] { argument != null ? ((IIDEBeanProxy)argument).getBean() : null });
      if (result == null) {
        return null;
      }
      Class returnType = ((Method)getBean()).getReturnType();
      return getBeanProxy(returnType, result);
    }
    catch (InvocationTargetException e)
    {
      IBeanTypeProxy exceptionTypeProxy = 
        ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(
        e.getTargetException().getClass());
      throw new IDEThrowableProxy(e.getTargetException(), exceptionTypeProxy);
    }
    catch (Exception exc)
    {
      IBeanTypeProxy exceptionTypeProxy = 
        ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(exc.getClass());
      throw new IDEThrowableProxy(exc, exceptionTypeProxy);
    }
  }
  
  public IBeanProxy invokeCatchThrowableExceptions(IBeanProxy subject, IBeanProxy argument)
  {
    try
    {
      return invoke(subject, argument);
    }
    catch (ThrowableProxy exc)
    {
      ProxyPlugin.getPlugin().getLogger().log(
        new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", exc));
    }
    return null;
  }
  
  public IBeanProxy invoke(IBeanProxy subject, IBeanProxy[] arguments)
    throws ThrowableProxy
  {
    Object[] beanArguments = new Object[arguments.length];
    for (int i = 0; i < arguments.length; i++) {
      if (arguments[i] != null) {
        beanArguments[i] = ((IIDEBeanProxy)arguments[i]).getBean();
      }
    }
    try
    {
      Object result = ((Method)getBean()).invoke(subject != null ? ((IIDEBeanProxy)subject).getBean() : null, beanArguments);
      if (result == null) {
        return null;
      }
      Class returnType = ((Method)getBean()).getReturnType();
      return getBeanProxy(returnType, result);
    }
    catch (InvocationTargetException e)
    {
      IBeanTypeProxy exceptionTypeProxy = 
        ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(
        e.getTargetException().getClass());
      throw new IDEThrowableProxy(e.getTargetException(), exceptionTypeProxy);
    }
    catch (Exception exc)
    {
      IBeanTypeProxy exceptionTypeProxy = 
        ((IDEStandardBeanTypeProxyFactory)fProxyFactoryRegistry.getBeanTypeProxyFactory()).getBeanTypeProxy(exc.getClass());
      throw new IDEThrowableProxy(exc, exceptionTypeProxy);
    }
  }
  
  public IBeanProxy invokeCatchThrowableExceptions(IBeanProxy subject, IBeanProxy[] arguments)
  {
    try
    {
      return invoke(subject, arguments);
    }
    catch (ThrowableProxy exc)
    {
      ProxyPlugin.getPlugin().getLogger().log(
        new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", exc));
    }
    return null;
  }
  
  IBeanProxy getBeanProxy(Class returnType, Object bean)
  {
    return fProxyFactoryRegistry.getBeanProxy(returnType, bean);
  }
}

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

import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.Status;
import org.eclipse.jem.internal.proxy.common.AmbiguousMethodException;
import org.eclipse.jem.internal.proxy.common.MethodHelper;
import org.eclipse.jem.internal.proxy.core.IConstructorProxy;
import org.eclipse.jem.internal.proxy.core.IExpression;
import org.eclipse.jem.internal.proxy.core.IFieldProxy;
import org.eclipse.jem.internal.proxy.core.IInvokable;
import org.eclipse.jem.internal.proxy.core.IMethodProxy;
import org.eclipse.jem.internal.proxy.core.IMethodProxyFactory;
import org.eclipse.jem.internal.proxy.core.IProxyBeanType;
import org.eclipse.jem.internal.proxy.core.IProxyField;
import org.eclipse.jem.internal.proxy.core.IProxyMethod;
import org.eclipse.jem.internal.proxy.core.IStandardBeanTypeProxyFactory;
import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
import org.eclipse.jem.util.logger.proxy.Logger;
import org.osgi.framework.Bundle;

public class IDEMethodProxyFactory
  implements IMethodProxyFactory
{
  protected final IDEProxyFactoryRegistry fProxyFactoryRegistry;
  protected static final Map primLookup = new HashMap();
  IDEBeanTypeProxy accessibleType;
  IDEBeanTypeProxy fieldType;
  IDEBeanTypeProxy methodType;
  IDEBeanTypeProxy constructorType;
  
  static
  {
    primLookup.put("int", Integer.TYPE);
    primLookup.put("char", Character.TYPE);
    primLookup.put("long", Long.TYPE);
    primLookup.put("short", Short.TYPE);
    primLookup.put("double", Double.TYPE);
    primLookup.put("boolean", Boolean.TYPE);
    primLookup.put("byte", Byte.TYPE);
    primLookup.put("float", Float.TYPE);
  }
  
  IDEMethodProxyFactory(IDEProxyFactoryRegistry aRegistry)
  {
    fProxyFactoryRegistry = aRegistry;
    fProxyFactoryRegistry.registerMethodProxyFactory(this);
    accessibleType = new IDEBeanTypeProxy(aRegistry, AccessibleObject.class);
    fieldType = new IDEFieldTypeProxy(aRegistry);
    methodType = new IDEMethodTypeProxy(aRegistry);
    constructorType = new IDEConstructorTypeProxy(aRegistry);
    fProxyFactoryRegistry.getBeanTypeProxyFactory().registerBeanTypeProxy(accessibleType, true);
    fProxyFactoryRegistry.getBeanTypeProxyFactory().registerBeanTypeProxy(fieldType, true);
    fProxyFactoryRegistry.getBeanTypeProxyFactory().registerBeanTypeProxy(methodType, true);
    fProxyFactoryRegistry.getBeanTypeProxyFactory().registerBeanTypeProxy(constructorType, true);
  }
  
  IConstructorProxy getConstructorProxy(Constructor aConstructor)
  {
    return (IConstructorProxy)constructorType.newBeanProxy(aConstructor);
  }
  
  IConstructorProxy[] getConstructors(Class aClass)
  {
    Constructor[] ctors = aClass.getConstructors();
    IConstructorProxy[] ctorProxies = new IConstructorProxy[ctors.length];
    for (int i = 0; i < ctors.length; i++) {
      ctorProxies[i] = getConstructorProxy(ctors[i]);
    }
    return ctorProxies;
  }
  
  IConstructorProxy[] getDeclaredConstructors(Class aClass)
  {
    Constructor[] ctors = aClass.getDeclaredConstructors();
    IConstructorProxy[] ctorProxies = new IConstructorProxy[ctors.length];
    for (int i = 0; i < ctors.length; i++) {
      ctorProxies[i] = getConstructorProxy(ctors[i]);
    }
    return ctorProxies;
  }
  
  IConstructorProxy getConstructorProxy(Class aClass, Class[] args)
  {
    try
    {
      Constructor ctor = aClass.getConstructor(args);
      return getConstructorProxy(ctor);
    }
    catch (NoSuchMethodException localNoSuchMethodException) {}
    return null;
  }
  
  IConstructorProxy getDeclaredConstructorProxy(Class aClass, Class[] args)
  {
    try
    {
      Constructor ctor = aClass.getDeclaredConstructor(args);
      return getConstructorProxy(ctor);
    }
    catch (NoSuchMethodException localNoSuchMethodException) {}
    return null;
  }
  
  IFieldProxy[] getFields(Class aClass)
  {
    Field[] fields = aClass.getFields();
    IFieldProxy[] fieldProxies = new IFieldProxy[fields.length];
    for (int i = 0; i < fields.length; i++) {
      fieldProxies[i] = getFieldProxy(fields[i]);
    }
    return fieldProxies;
  }
  
  IFieldProxy[] getDeclaredFields(Class aClass)
  {
    Field[] fields = aClass.getDeclaredFields();
    IFieldProxy[] fieldProxies = new IFieldProxy[fields.length];
    for (int i = 0; i < fields.length; i++) {
      fieldProxies[i] = getFieldProxy(fields[i]);
    }
    return fieldProxies;
  }
  
  IFieldProxy getFieldProxy(Field aField)
  {
    return (IFieldProxy)fieldType.newBeanProxy(aField);
  }
  
  public IProxyField getFieldProxy(IExpression expression, String className, String fieldName)
  {
    IStandardBeanTypeProxyFactory beanTypeProxyFactory = fProxyFactoryRegistry.getBeanTypeProxyFactory();
    IProxyBeanType beanType = beanTypeProxyFactory.getBeanTypeProxy(expression, className);
    return beanType.getFieldProxy(expression, fieldName);
  }
  
  IDEMethodProxy getMethodProxy(Method aMethod)
  {
    return (IDEMethodProxy)methodType.newBeanProxy(aMethod);
  }
  
  public IMethodProxy getMethodProxy(String className, String methodName, String[] parameterTypes)
  {
    try
    {
      Class aClass = fProxyFactoryRegistry.loadClass(className);
      return getMethodProxy(aClass, methodName, parameterTypes);
    }
    catch (ClassNotFoundException exc)
    {
      ProxyPlugin.getPlugin().getLogger().log(new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", exc));
    }
    return null;
  }
  
  public IProxyMethod getMethodProxy(IExpression expression, String className, String methodName, String[] parameterTypes)
  {
    IStandardBeanTypeProxyFactory beanTypeProxyFactory = fProxyFactoryRegistry.getBeanTypeProxyFactory();
    IProxyBeanType beanType = beanTypeProxyFactory.getBeanTypeProxy(expression, className);
    IProxyBeanType[] parmTypes = getParameterTypes(expression, parameterTypes, beanTypeProxyFactory);
    return beanType.getMethodProxy(expression, methodName, parmTypes);
  }
  
  public IProxyMethod getMethodProxy(IExpression expression, IProxyBeanType classType, String methodName, String[] parameterTypes)
  {
    IStandardBeanTypeProxyFactory beanTypeProxyFactory = fProxyFactoryRegistry.getBeanTypeProxyFactory();
    IProxyBeanType[] parmTypes = getParameterTypes(expression, parameterTypes, beanTypeProxyFactory);
    return classType.getMethodProxy(expression, methodName, parmTypes);
  }
  
  protected IProxyBeanType[] getParameterTypes(IExpression expression, String[] parameterTypes, IStandardBeanTypeProxyFactory beanTypeProxyFactory)
  {
    IProxyBeanType[] parmTypes;
    IProxyBeanType[] parmTypes;
    if ((parameterTypes == null) || (parameterTypes.length == 0))
    {
      parmTypes = (IProxyBeanType[])null;
    }
    else
    {
      parmTypes = new IProxyBeanType[parameterTypes.length];
      for (int i = 0; i < parameterTypes.length; i++) {
        parmTypes[i] = beanTypeProxyFactory.getBeanTypeProxy(expression, parameterTypes[i]);
      }
    }
    return parmTypes;
  }
  
  public IMethodProxy getMethodProxy(Class cls, String methodName, String[] parameterTypes)
  {
    try
    {
      Class[] parmClasses = (Class[])null;
      if (parameterTypes != null)
      {
        parmClasses = new Class[parameterTypes.length];
        for (int i = 0; i < parmClasses.length; i++)
        {
          Class temp = (Class)primLookup.get(parameterTypes[i]);
          if (temp == null) {
            temp = fProxyFactoryRegistry.loadClass(parameterTypes[i]);
          }
          parmClasses[i] = temp;
        }
      }
      return getMethodProxy(cls.getMethod(methodName, parmClasses));
    }
    catch (ClassNotFoundException e)
    {
      ProxyPlugin.getPlugin().getLogger().log(new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
    }
    catch (NoSuchMethodException e)
    {
      ProxyPlugin.getPlugin().getLogger().log(new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
    }
    return null;
  }
  
  IMethodProxy getDeclaredMethodProxy(Class cls, String methodName, String[] parameterTypes)
  {
    try
    {
      Class[] parmClasses = (Class[])null;
      if (parameterTypes != null)
      {
        parmClasses = new Class[parameterTypes.length];
        for (int i = 0; i < parmClasses.length; i++)
        {
          Class temp = (Class)primLookup.get(parameterTypes[i]);
          if (temp == null) {
            temp = fProxyFactoryRegistry.loadClass(parameterTypes[i]);
          }
          parmClasses[i] = temp;
        }
      }
      return getMethodProxy(cls.getDeclaredMethod(methodName, parmClasses));
    }
    catch (ClassNotFoundException e)
    {
      ProxyPlugin.getPlugin().getLogger().log(new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
    }
    catch (NoSuchMethodException e)
    {
      ProxyPlugin.getPlugin().getLogger().log(new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", e));
    }
    return null;
  }
  
  IDEMethodProxy getMethodProxy(Class aClass, String methodName, Class[] args)
  {
    try
    {
      Method method = aClass.getMethod(methodName, args);
      return getMethodProxy(method);
    }
    catch (NoSuchMethodException exc)
    {
      ProxyPlugin.getPlugin().getLogger().log(
        new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "Unable to find method " + aClass.getName() + 
        ":" + methodName + " args=" + args, exc));
    }
    return null;
  }
  
  IMethodProxy getDeclaredMethodProxy(Class aClass, String methodName, Class[] args)
  {
    try
    {
      Method method = aClass.getDeclaredMethod(methodName, args);
      return getMethodProxy(method);
    }
    catch (NoSuchMethodException exc)
    {
      ProxyPlugin.getPlugin().getLogger().log(
        new Status(2, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "Unable to find method " + aClass.getName() + 
        ":" + methodName + " args=" + args, exc));
    }
    return null;
  }
  
  IMethodProxy getMethodProxy(IDEBeanTypeProxy aTypeProxy, String methodName, String[] parameterTypes)
  {
    return getMethodProxy(fClass, methodName, parameterTypes);
  }
  
  IMethodProxy[] getMethods(Class aClass)
  {
    Method[] methods = aClass.getMethods();
    IMethodProxy[] methodProxies = new IMethodProxy[methods.length];
    for (int i = 0; i < methods.length; i++) {
      methodProxies[i] = getMethodProxy(methods[i]);
    }
    return methodProxies;
  }
  
  IMethodProxy getCompatibleMethod(Class aClass, String methodName, Class[] parmTypes)
    throws NoSuchMethodException, AmbiguousMethodException
  {
    Method method = MethodHelper.findCompatibleMethod(aClass, methodName, parmTypes);
    return getMethodProxy(method);
  }
  
  IConstructorProxy getCompatibleConstructor(Class aClass, Class[] parmTypes)
    throws AmbiguousMethodException, NoSuchMethodException, IllegalAccessException
  {
    Constructor method = MethodHelper.findCompatibleConstructor(aClass, parmTypes);
    return getConstructorProxy(method);
  }
  
  IMethodProxy[] getDeclaredMethods(Class aClass)
  {
    Method[] methods = aClass.getDeclaredMethods();
    IMethodProxy[] methodProxies = new IMethodProxy[methods.length];
    for (int i = 0; i < methods.length; i++) {
      methodProxies[i] = getMethodProxy(methods[i]);
    }
    return methodProxies;
  }
  
  public IInvokable getInvokable(String className, String methodName, String[] parameterTypes)
  {
    return getMethodProxy(className, methodName, parameterTypes);
  }
  
  public void terminateFactory(boolean wait) {}
}

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

import java.lang.reflect.Method;

public class IDEMethodTypeProxy
  extends IDEBeanTypeProxy
{
  IDEMethodTypeProxy(IDEProxyFactoryRegistry registry)
  {
    super(registry, Method.class);
  }
  
  protected IIDEBeanProxy newBeanProxy(Object anObject)
  {
    return new IDEMethodProxy(fProxyFactoryRegistry, (Method)anObject);
  }
}

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

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

public class IDENumberBeanProxy
  extends IDEBeanProxy
  implements INumberBeanProxy
{
  private final Number fNumberValue;
  protected IBeanTypeProxy fBeanTypeProxy;
  
  IDENumberBeanProxy(IDEProxyFactoryRegistry aRegistry, Number aNumber, IBeanTypeProxy aBeanTypeProxy)
  {
    super(aRegistry, aNumber);
    fNumberValue = aNumber;
    fBeanTypeProxy = aBeanTypeProxy;
  }
  
  public boolean equals(Object anObject)
  {
    if (this == anObject) {
      return true;
    }
    if ((anObject instanceof IDENumberBeanProxy)) {
      return fNumberValue.equals(((IDENumberBeanProxy)anObject).numberValue());
    }
    if ((anObject instanceof Number)) {
      return fNumberValue.equals(anObject);
    }
    return false;
  }
  
  public byte byteValue()
  {
    return fNumberValue.byteValue();
  }
  
  public double doubleValue()
  {
    return fNumberValue.doubleValue();
  }
  
  public float floatValue()
  {
    return fNumberValue.floatValue();
  }
  
  public int intValue()
  {
    return fNumberValue.intValue();
  }
  
  public long longValue()
  {
    return fNumberValue.longValue();
  }
  
  public Number numberValue()
  {
    return fNumberValue;
  }
  
  public short shortValue()
  {
    return fNumberValue.shortValue();
  }
  
  public String toBeanString()
  {
    return fNumberValue.toString();
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    return fBeanTypeProxy;
  }
}

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

import org.eclipse.jem.internal.proxy.core.INumberBeanProxy;

public abstract class IDENumberBeanTypeProxy
  extends IDEBeanTypeProxy
{
  protected final IDENumberBeanProxy zeroProxy;
  
  protected IDENumberBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass, Number zeroNumber)
  {
    super(aRegistry, aClass);
    
    zeroProxy = new IDENumberBeanProxy(aRegistry, zeroNumber, this);
  }
  
  INumberBeanProxy createNumberBeanProxy(Number aNumber)
  {
    if ((aNumber == null) || (zeroProxy.fBean.equals(aNumber))) {
      return zeroProxy;
    }
    return new IDENumberBeanProxy(fProxyFactoryRegistry, aNumber, this);
  }
  
  protected IIDEBeanProxy newBeanProxy(Object anObject)
  {
    return (IIDEBeanProxy)createNumberBeanProxy((Number)anObject);
  }
}

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

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

public class IDEObjectBeanProxy
  extends IDEBeanProxy
{
  protected IBeanTypeProxy fBeanTypeProxy;
  
  protected IDEObjectBeanProxy(IDEProxyFactoryRegistry aRegistry)
  {
    super(aRegistry);
  }
  
  protected IDEObjectBeanProxy(IDEProxyFactoryRegistry aRegistry, Object aBean, IBeanTypeProxy aBeanTypeProxy)
  {
    this(aRegistry, aBean);
    fBeanTypeProxy = aBeanTypeProxy;
  }
  
  protected IDEObjectBeanProxy(IDEProxyFactoryRegistry aRegistry, Object aBean)
  {
    this(aRegistry);
    
    fBean = aBean;
  }
  
  public IBeanTypeProxy getTypeProxy()
  {
    if (fBeanTypeProxy == null) {
      fBeanTypeProxy = fProxyFactoryRegistry.getBeanTypeProxyFactory().getBeanTypeProxy(fBean.getClass().getName());
    }
    return fBeanTypeProxy;
  }
}

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

public abstract class IDEPrimitiveBeanTypeProxy
  extends IDEBeanTypeProxy
{
  static final int BOOLEAN = 1;
  static final int BYTE = 2;
  static final int CHAR = 3;
  static final int DOUBLE = 4;
  static final int FLOAT = 5;
  static final int INTEGER = 6;
  static final int LONG = 7;
  static final int SHORT = 8;
  
  public IDEPrimitiveBeanTypeProxy(IDEProxyFactoryRegistry aRegistry, Class aClass)
  {
    super(aRegistry, aClass);
  }
  
  public boolean isPrimitive()
  {
    return true;
  }
  
  abstract int getPrimitiveType();
}

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

import java.net.URL;
import java.net.URLClassLoader;
import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
import org.osgi.framework.Bundle;

class IDEProxyFactoryRegistry$IDESpecialClassLoader
  extends URLClassLoader
{
  priv
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