wms-winstone-jsp

16:54:39.005 INFO  jd.cli.Main - Decompiling wms-winstone-jsp.jar
package javax.el;

import java.beans.FeatureDescriptor;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

public class ArrayELResolver
  extends ELResolver
{
  private final boolean readOnly;
  
  public ArrayELResolver()
  {
    readOnly = false;
  }
  
  public ArrayELResolver(boolean readOnly)
  {
    this.readOnly = readOnly;
  }
  
  public Object getValue(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base != null) && (base.getClass().isArray()))
    {
      context.setPropertyResolved(true);
      int idx = coerce(property);
      if ((idx < 0) || (idx >= Array.getLength(base))) {
        return null;
      }
      return Array.get(base, idx);
    }
    return null;
  }
  
  public Class<?> getType(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base != null) && (base.getClass().isArray()))
    {
      context.setPropertyResolved(true);
      int idx = coerce(property);
      checkBounds(base, idx);
      return base.getClass().getComponentType();
    }
    return null;
  }
  
  public void setValue(ELContext context, Object base, Object property, Object value)
    throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base != null) && (base.getClass().isArray()))
    {
      context.setPropertyResolved(true);
      if (readOnly) {
        throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass().getName() }));
      }
      int idx = coerce(property);
      checkBounds(base, idx);
      Array.set(base, idx, value);
    }
  }
  
  public boolean isReadOnly(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base != null) && (base.getClass().isArray()))
    {
      context.setPropertyResolved(true);
      int idx = coerce(property);
      checkBounds(base, idx);
    }
    return readOnly;
  }
  
  public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
  {
    if ((base != null) && (base.getClass().isArray()))
    {
      FeatureDescriptor[] descs = new FeatureDescriptor[Array.getLength(base)];
      for (int i = 0; i < descs.length; i++)
      {
        descs[i] = new FeatureDescriptor();
        descs[i].setDisplayName("[" + i + "]");
        descs[i].setExpert(false);
        descs[i].setHidden(false);
        descs[i].setName("" + i);
        descs[i].setPreferred(true);
        descs[i].setValue("resolvableAtDesignTime", Boolean.FALSE);
        descs[i].setValue("type", Integer.class);
      }
      return Arrays.asList(descs).iterator();
    }
    return null;
  }
  
  public Class<?> getCommonPropertyType(ELContext context, Object base)
  {
    if ((base != null) && (base.getClass().isArray())) {
      return Integer.class;
    }
    return null;
  }
  
  private static final void checkBounds(Object base, int idx)
  {
    if ((idx < 0) || (idx >= Array.getLength(base))) {
      throw new PropertyNotFoundException(new ArrayIndexOutOfBoundsException(idx).getMessage());
    }
  }
  
  private static final int coerce(Object property)
  {
    if ((property instanceof Number)) {
      return ((Number)property).intValue();
    }
    if ((property instanceof Character)) {
      return ((Character)property).charValue();
    }
    if ((property instanceof Boolean)) {
      return ((Boolean)property).booleanValue() ? 1 : 0;
    }
    if ((property instanceof String)) {
      return Integer.parseInt((String)property);
    }
    throw new IllegalArgumentException(property != null ? property.toString() : "null");
  }
}

/* Location:
 * Qualified Name:     javax.el.ArrayELResolver
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.util.HashMap;
import java.util.Map;

public final class BeanELResolver$BeanProperties
{
  private final Map<String, BeanELResolver.BeanProperty> properties;
  private final Class<?> type;
  
  public BeanELResolver$BeanProperties(Class<?> type)
    throws ELException
  {
    this.type = type;
    properties = new HashMap();
    try
    {
      BeanInfo info = Introspector.getBeanInfo(this.type);
      PropertyDescriptor[] pds = info.getPropertyDescriptors();
      for (int i = 0; i < pds.length; i++) {
        properties.put(pds[i].getName(), new BeanELResolver.BeanProperty(type, pds[i]));
      }
    }
    catch (IntrospectionException ie)
    {
      throw new ELException(ie);
    }
  }
  
  private BeanELResolver.BeanProperty get(ELContext ctx, String name)
  {
    BeanELResolver.BeanProperty property = (BeanELResolver.BeanProperty)properties.get(name);
    if (property == null) {
      throw new PropertyNotFoundException(ELResolver.message(ctx, "propertyNotFound", new Object[] { type.getName(), name }));
    }
    return property;
  }
  
  public BeanELResolver.BeanProperty getBeanProperty(String name)
  {
    return get(null, name);
  }
  
  private Class<?> getType()
  {
    return type;
  }
}

/* Location:
 * Qualified Name:     javax.el.BeanELResolver.BeanProperties
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;

public final class BeanELResolver$BeanProperty
{
  private final Class type;
  private final Class owner;
  private final PropertyDescriptor descriptor;
  private Method read;
  private Method write;
  
  public BeanELResolver$BeanProperty(Class<?> owner, PropertyDescriptor descriptor)
  {
    this.owner = owner;
    this.descriptor = descriptor;
    type = descriptor.getPropertyType();
  }
  
  public Class getPropertyType()
  {
    return type;
  }
  
  public boolean isReadOnly()
  {
    return (write == null) && (null == (write = BeanELResolver.access$200(owner, descriptor.getWriteMethod())));
  }
  
  public Method getWriteMethod()
  {
    return write(null);
  }
  
  public Method getReadMethod()
  {
    return read(null);
  }
  
  private Method write(ELContext ctx)
  {
    if (write == null)
    {
      write = BeanELResolver.access$200(owner, descriptor.getWriteMethod());
      if (write == null) {
        throw new PropertyNotFoundException(ELResolver.message(ctx, "propertyNotWritable", new Object[] { type.getName(), descriptor.getName() }));
      }
    }
    return write;
  }
  
  private Method read(ELContext ctx)
  {
    if (read == null)
    {
      read = BeanELResolver.access$200(owner, descriptor.getReadMethod());
      if (read == null) {
        throw new PropertyNotFoundException(ELResolver.message(ctx, "propertyNotReadable", new Object[] { type.getName(), descriptor.getName() }));
      }
    }
    return read;
  }
}

/* Location:
 * Qualified Name:     javax.el.BeanELResolver.BeanProperty
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;

final class BeanELResolver$ConcurrentCache<K, V>
{
  private final int size;
  private final Map<K, V> eden;
  private final Map<K, V> longterm;
  
  public BeanELResolver$ConcurrentCache(int size)
  {
    this.size = size;
    eden = new ConcurrentHashMap(size);
    longterm = new WeakHashMap(size);
  }
  
  public V get(K key)
  {
    V value = eden.get(key);
    if (value == null)
    {
      value = longterm.get(key);
      if (value != null) {
        eden.put(key, value);
      }
    }
    return value;
  }
  
  public void put(K key, V value)
  {
    if (eden.size() >= size)
    {
      longterm.putAll(eden);
      eden.clear();
    }
    eden.put(key, value);
  }
}

/* Location:
 * Qualified Name:     javax.el.BeanELResolver.ConcurrentCache
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.beans.BeanInfo;
import java.beans.FeatureDescriptor;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;

public class BeanELResolver
  extends ELResolver
{
  private final boolean readOnly;
  private final ConcurrentCache<String, BeanProperties> cache = new ConcurrentCache(1000);
  
  public BeanELResolver()
  {
    readOnly = false;
  }
  
  public BeanELResolver(boolean readOnly)
  {
    this.readOnly = readOnly;
  }
  
  public Object getValue(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base == null) || (property == null)) {
      return null;
    }
    context.setPropertyResolved(true);
    Method m = property(context, base, property).read(context);
    try
    {
      return m.invoke(base, (Object[])null);
    }
    catch (IllegalAccessException e)
    {
      throw new ELException(e);
    }
    catch (InvocationTargetException e)
    {
      throw new ELException(message(context, "propertyReadError", new Object[] { base.getClass().getName(), property.toString() }), e.getCause());
    }
    catch (Exception e)
    {
      throw new ELException(e);
    }
  }
  
  public Class<?> getType(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base == null) || (property == null)) {
      return null;
    }
    context.setPropertyResolved(true);
    return property(context, base, property).getPropertyType();
  }
  
  public void setValue(ELContext context, Object base, Object property, Object value)
    throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base == null) || (property == null)) {
      return;
    }
    context.setPropertyResolved(true);
    if (readOnly) {
      throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass().getName() }));
    }
    Method m = property(context, base, property).write(context);
    try
    {
      m.invoke(base, new Object[] { value });
    }
    catch (IllegalAccessException e)
    {
      throw new ELException(e);
    }
    catch (InvocationTargetException e)
    {
      throw new ELException(message(context, "propertyWriteError", new Object[] { base.getClass().getName(), property.toString() }), e.getCause());
    }
    catch (Exception e)
    {
      throw new ELException(e);
    }
  }
  
  public boolean isReadOnly(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base == null) || (property == null)) {
      return false;
    }
    context.setPropertyResolved(true);
    return (readOnly) || (property(context, base, property).isReadOnly());
  }
  
  public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if (base == null) {
      return null;
    }
    try
    {
      BeanInfo info = Introspector.getBeanInfo(base.getClass());
      PropertyDescriptor[] pds = info.getPropertyDescriptors();
      for (int i = 0; i < pds.length; i++)
      {
        pds[i].setValue("resolvableAtDesignTime", Boolean.TRUE);
        pds[i].setValue("type", pds[i].getPropertyType());
      }
      return Arrays.asList((FeatureDescriptor[])pds).iterator();
    }
    catch (IntrospectionException e) {}
    return null;
  }
  
  public Class<?> getCommonPropertyType(ELContext context, Object base)
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if (base != null) {
      return Object.class;
    }
    return null;
  }
  
  protected static final class BeanProperties
  {
    private final Map<String, BeanELResolver.BeanProperty> properties;
    private final Class<?> type;
    
    public BeanProperties(Class<?> type)
      throws ELException
    {
      this.type = type;
      properties = new HashMap();
      try
      {
        BeanInfo info = Introspector.getBeanInfo(this.type);
        PropertyDescriptor[] pds = info.getPropertyDescriptors();
        for (int i = 0; i < pds.length; i++) {
          properties.put(pds[i].getName(), new BeanELResolver.BeanProperty(type, pds[i]));
        }
      }
      catch (IntrospectionException ie)
      {
        throw new ELException(ie);
      }
    }
    
    private BeanELResolver.BeanProperty get(ELContext ctx, String name)
    {
      BeanELResolver.BeanProperty property = (BeanELResolver.BeanProperty)properties.get(name);
      if (property == null) {
        throw new PropertyNotFoundException(ELResolver.message(ctx, "propertyNotFound", new Object[] { type.getName(), name }));
      }
      return property;
    }
    
    public BeanELResolver.BeanProperty getBeanProperty(String name)
    {
      return get(null, name);
    }
    
    private Class<?> getType()
    {
      return type;
    }
  }
  
  protected static final class BeanProperty
  {
    private final Class type;
    private final Class owner;
    private final PropertyDescriptor descriptor;
    private Method read;
    private Method write;
    
    public BeanProperty(Class<?> owner, PropertyDescriptor descriptor)
    {
      this.owner = owner;
      this.descriptor = descriptor;
      type = descriptor.getPropertyType();
    }
    
    public Class getPropertyType()
    {
      return type;
    }
    
    public boolean isReadOnly()
    {
      return (write == null) && (null == (write = BeanELResolver.getMethod(owner, descriptor.getWriteMethod())));
    }
    
    public Method getWriteMethod()
    {
      return write(null);
    }
    
    public Method getReadMethod()
    {
      return read(null);
    }
    
    private Method write(ELContext ctx)
    {
      if (write == null)
      {
        write = BeanELResolver.getMethod(owner, descriptor.getWriteMethod());
        if (write == null) {
          throw new PropertyNotFoundException(ELResolver.message(ctx, "propertyNotWritable", new Object[] { type.getName(), descriptor.getName() }));
        }
      }
      return write;
    }
    
    private Method read(ELContext ctx)
    {
      if (read == null)
      {
        read = BeanELResolver.getMethod(owner, descriptor.getReadMethod());
        if (read == null) {
          throw new PropertyNotFoundException(ELResolver.message(ctx, "propertyNotReadable", new Object[] { type.getName(), descriptor.getName() }));
        }
      }
      return read;
    }
  }
  
  private final BeanProperty property(ELContext ctx, Object base, Object property)
  {
    Class<?> type = base.getClass();
    String prop = property.toString();
    
    BeanProperties props = (BeanProperties)cache.get(type.getName());
    if ((props == null) || (type != props.getType()))
    {
      props = new BeanProperties(type);
      cache.put(type.getName(), props);
    }
    return props.get(ctx, prop);
  }
  
  private static final Method getMethod(Class type, Method m)
  {
    if ((m == null) || (Modifier.isPublic(type.getModifiers()))) {
      return m;
    }
    Class[] inf = type.getInterfaces();
    Method mp = null;
    for (int i = 0; i < inf.length; i++) {
      try
      {
        mp = inf[i].getMethod(m.getName(), (Class[])m.getParameterTypes());
        mp = getMethod(mp.getDeclaringClass(), mp);
        if (mp != null) {
          return mp;
        }
      }
      catch (NoSuchMethodException e) {}
    }
    Class sup = type.getSuperclass();
    if (sup != null) {
      try
      {
        mp = sup.getMethod(m.getName(), (Class[])m.getParameterTypes());
        mp = getMethod(mp.getDeclaringClass(), mp);
        if (mp != null) {
          return mp;
        }
      }
      catch (NoSuchMethodException e) {}
    }
    return null;
  }
  
  private static final class ConcurrentCache<K, V>
  {
    private final int size;
    private final Map<K, V> eden;
    private final Map<K, V> longterm;
    
    public ConcurrentCache(int size)
    {
      this.size = size;
      eden = new ConcurrentHashMap(size);
      longterm = new WeakHashMap(size);
    }
    
    public V get(K key)
    {
      V value = eden.get(key);
      if (value == null)
      {
        value = longterm.get(key);
        if (value != null) {
          eden.put(key, value);
        }
      }
      return value;
    }
    
    public void put(K key, V value)
    {
      if (eden.size() >= size)
      {
        longterm.putAll(eden);
        eden.clear();
      }
      eden.put(key, value);
    }
  }
}

/* Location:
 * Qualified Name:     javax.el.BeanELResolver
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.beans.FeatureDescriptor;
import java.util.Iterator;

final class CompositeELResolver$FeatureIterator
  implements Iterator<FeatureDescriptor>
{
  private final ELContext context;
  private final Object base;
  private final ELResolver[] resolvers;
  private final int size;
  private Iterator itr;
  private int idx;
  
  public CompositeELResolver$FeatureIterator(ELContext context, Object base, ELResolver[] resolvers, int size)
  {
    this.context = context;
    this.base = base;
    this.resolvers = resolvers;
    this.size = size;
    
    idx = 0;
    guaranteeIterator();
  }
  
  private void guaranteeIterator()
  {
    while ((itr == null) && (idx < size))
    {
      itr = resolvers[idx].getFeatureDescriptors(context, base);
      
      idx += 1;
    }
  }
  
  public boolean hasNext()
  {
    return itr != null;
  }
  
  public FeatureDescriptor next()
  {
    Object result = null;
    if ((itr != null) && 
      (itr.hasNext()))
    {
      result = itr.next();
      if (!itr.hasNext())
      {
        itr = null;
        guaranteeIterator();
      }
    }
    return (FeatureDescriptor)result;
  }
  
  public void remove()
  {
    throw new UnsupportedOperationException();
  }
}

/* Location:
 * Qualified Name:     javax.el.CompositeELResolver.FeatureIterator
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.beans.FeatureDescriptor;
import java.util.Iterator;

public class CompositeELResolver
  extends ELResolver
{
  private int size;
  private ELResolver[] resolvers;
  
  public CompositeELResolver()
  {
    size = 0;
    resolvers = new ELResolver[2];
  }
  
  public void add(ELResolver elResolver)
  {
    if (elResolver == null) {
      throw new NullPointerException();
    }
    if (size >= resolvers.length)
    {
      ELResolver[] nr = new ELResolver[size * 2];
      System.arraycopy(resolvers, 0, nr, 0, size);
      resolvers = nr;
    }
    resolvers[(size++)] = elResolver;
  }
  
  public Object getValue(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    context.setPropertyResolved(false);
    int sz = size;
    Object result = null;
    for (int i = 0; i < sz; i++)
    {
      result = resolvers[i].getValue(context, base, property);
      if (context.isPropertyResolved()) {
        return result;
      }
    }
    return null;
  }
  
  public void setValue(ELContext context, Object base, Object property, Object value)
    throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
  {
    context.setPropertyResolved(false);
    int sz = size;
    for (int i = 0; i < sz; i++)
    {
      resolvers[i].setValue(context, base, property, value);
      if (context.isPropertyResolved()) {
        return;
      }
    }
  }
  
  public boolean isReadOnly(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    context.setPropertyResolved(false);
    int sz = size;
    boolean readOnly = false;
    for (int i = 0; i < sz; i++)
    {
      readOnly = resolvers[i].isReadOnly(context, base, property);
      if (context.isPropertyResolved()) {
        return readOnly;
      }
    }
    return false;
  }
  
  public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
  {
    return new FeatureIterator(context, base, resolvers, size);
  }
  
  public Class<?> getCommonPropertyType(ELContext context, Object base)
  {
    int sz = size;
    Class<?> commonType = null;Class<?> type = null;
    for (int i = 0; i < sz; i++)
    {
      type = resolvers[i].getCommonPropertyType(context, base);
      if ((type != null) && ((commonType == null) || (commonType.isAssignableFrom(type)))) {
        commonType = type;
      }
    }
    return commonType;
  }
  
  public Class<?> getType(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    context.setPropertyResolved(false);
    int sz = size;
    for (int i = 0; i < sz; i++)
    {
      Class<?> type = resolvers[i].getType(context, base, property);
      if (context.isPropertyResolved()) {
        return type;
      }
    }
    return null;
  }
  
  private static final class FeatureIterator
    implements Iterator<FeatureDescriptor>
  {
    private final ELContext context;
    private final Object base;
    private final ELResolver[] resolvers;
    private final int size;
    private Iterator itr;
    private int idx;
    
    public FeatureIterator(ELContext context, Object base, ELResolver[] resolvers, int size)
    {
      this.context = context;
      this.base = base;
      this.resolvers = resolvers;
      this.size = size;
      
      idx = 0;
      guaranteeIterator();
    }
    
    private void guaranteeIterator()
    {
      while ((itr == null) && (idx < size))
      {
        itr = resolvers[idx].getFeatureDescriptors(context, base);
        
        idx += 1;
      }
    }
    
    public boolean hasNext()
    {
      return itr != null;
    }
    
    public FeatureDescriptor next()
    {
      Object result = null;
      if ((itr != null) && 
        (itr.hasNext()))
      {
        result = itr.next();
        if (!itr.hasNext())
        {
          itr = null;
          guaranteeIterator();
        }
      }
      return (FeatureDescriptor)result;
    }
    
    public void remove()
    {
      throw new UnsupportedOperationException();
    }
  }
}

/* Location:
 * Qualified Name:     javax.el.CompositeELResolver
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

public abstract class ELContext
{
  private Locale locale;
  private Map<Class<?>, Object> map;
  private boolean resolved;
  
  public ELContext()
  {
    resolved = false;
  }
  
  public Object getContext(Class key)
  {
    if (map == null) {
      return null;
    }
    return map.get(key);
  }
  
  public void putContext(Class key, Object contextObject)
    throws NullPointerException
  {
    if ((key == null) || (contextObject == null)) {
      throw new NullPointerException();
    }
    if (map == null) {
      map = new HashMap();
    }
    map.put(key, contextObject);
  }
  
  public void setPropertyResolved(boolean resolved)
  {
    this.resolved = resolved;
  }
  
  public boolean isPropertyResolved()
  {
    return resolved;
  }
  
  public abstract ELResolver getELResolver();
  
  public abstract FunctionMapper getFunctionMapper();
  
  public abstract VariableMapper getVariableMapper();
  
  public Locale getLocale()
  {
    return locale;
  }
  
  public void setLocale(Locale locale)
  {
    this.locale = locale;
  }
}

/* Location:
 * Qualified Name:     javax.el.ELContext
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.util.EventObject;

public class ELContextEvent
  extends EventObject
{
  public ELContextEvent(ELContext source)
  {
    super(source);
  }
  
  public ELContext getELContext()
  {
    return (ELContext)getSource();
  }
}

/* Location:
 * Qualified Name:     javax.el.ELContextEvent
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.util.EventListener;

public abstract interface ELContextListener
  extends EventListener
{
  public abstract void contextCreated(ELContextEvent paramELContextEvent);
}

/* Location:
 * Qualified Name:     javax.el.ELContextListener
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

public class ELException
  extends RuntimeException
{
  public ELException() {}
  
  public ELException(String message)
  {
    super(message);
  }
  
  public ELException(String message, Throwable cause)
  {
    super(message, cause);
  }
  
  public ELException(Throwable cause)
  {
    super(cause);
  }
}

/* Location:
 * Qualified Name:     javax.el.ELException
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.beans.FeatureDescriptor;
import java.text.MessageFormat;
import java.util.Iterator;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

public abstract class ELResolver
{
  public static final String RESOLVABLE_AT_DESIGN_TIME = "resolvableAtDesignTime";
  public static final String TYPE = "type";
  
  static String message(ELContext context, String name, Object[] props)
  {
    Locale locale = context.getLocale();
    if (locale == null)
    {
      locale = Locale.getDefault();
      if (locale == null) {
        return "";
      }
    }
    ResourceBundle bundle = ResourceBundle.getBundle("javax.el.LocalStrings", locale);
    try
    {
      String template = bundle.getString(name);
      if (props != null) {}
      return MessageFormat.format(template, props);
    }
    catch (MissingResourceException e) {}
    return "Missing Resource: '" + name + "' for Locale " + locale.getDisplayName();
  }
  
  public abstract Object getValue(ELContext paramELContext, Object paramObject1, Object paramObject2)
    throws NullPointerException, PropertyNotFoundException, ELException;
  
  public abstract Class<?> getType(ELContext paramELContext, Object paramObject1, Object paramObject2)
    throws NullPointerException, PropertyNotFoundException, ELException;
  
  public abstract void setValue(ELContext paramELContext, Object paramObject1, Object paramObject2, Object paramObject3)
    throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException;
  
  public abstract boolean isReadOnly(ELContext paramELContext, Object paramObject1, Object paramObject2)
    throws NullPointerException, PropertyNotFoundException, ELException;
  
  public abstract Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext paramELContext, Object paramObject);
  
  public abstract Class<?> getCommonPropertyType(ELContext paramELContext, Object paramObject);
}

/* Location:
 * Qualified Name:     javax.el.ELResolver
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.io.Serializable;

public abstract class Expression
  implements Serializable
{
  public abstract boolean equals(Object paramObject);
  
  public abstract int hashCode();
  
  public abstract String getExpressionString();
  
  public abstract boolean isLiteralText();
}

/* Location:
 * Qualified Name:     javax.el.Expression
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

public abstract class ExpressionFactory
{
  public abstract Object coerceToType(Object paramObject, Class<?> paramClass)
    throws ELException;
  
  public abstract ValueExpression createValueExpression(ELContext paramELContext, String paramString, Class<?> paramClass)
    throws NullPointerException, ELException;
  
  public abstract ValueExpression createValueExpression(Object paramObject, Class<?> paramClass);
  
  public abstract MethodExpression createMethodExpression(ELContext paramELContext, String paramString, Class<?> paramClass, Class<?>[] paramArrayOfClass)
    throws ELException, NullPointerException;
}

/* Location:
 * Qualified Name:     javax.el.ExpressionFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.lang.reflect.Method;

public abstract class FunctionMapper
{
  public abstract Method resolveFunction(String paramString1, String paramString2);
}

/* Location:
 * Qualified Name:     javax.el.FunctionMapper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.beans.FeatureDescriptor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

public class ListELResolver
  extends ELResolver
{
  private final boolean readOnly;
  private static final Class UNMODIFIABLE = Collections.unmodifiableList(new ArrayList()).getClass();
  
  public ListELResolver()
  {
    readOnly = false;
  }
  
  public ListELResolver(boolean readOnly)
  {
    this.readOnly = readOnly;
  }
  
  public Object getValue(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base instanceof List))
    {
      context.setPropertyResolved(true);
      List list = (List)base;
      int idx = coerce(property);
      if ((idx < 0) || (idx >= list.size())) {
        return null;
      }
      return list.get(idx);
    }
    return null;
  }
  
  public Class<?> getType(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base instanceof List))
    {
      context.setPropertyResolved(true);
      List list = (List)base;
      int idx = coerce(property);
      if ((idx < 0) || (idx >= list.size())) {
        return null;
      }
      Object obj = list.get(idx);
      return obj != null ? obj.getClass() : null;
    }
    return null;
  }
  
  public void setValue(ELContext context, Object base, Object property, Object value)
    throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base instanceof List))
    {
      context.setPropertyResolved(true);
      List list = (List)base;
      if (readOnly) {
        throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass().getName() }));
      }
      int idx = coerce(property);
      try
      {
        list.set(idx, value);
      }
      catch (UnsupportedOperationException e)
      {
        throw new PropertyNotWritableException(e);
      }
      catch (IndexOutOfBoundsException e)
      {
        throw new PropertyNotFoundException(e);
      }
    }
  }
  
  public boolean isReadOnly(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base instanceof List))
    {
      context.setPropertyResolved(true);
      List list = (List)base;
      int idx = coerce(property);
      if ((idx < 0) || (idx >= list.size())) {
        throw new PropertyNotFoundException(new ArrayIndexOutOfBoundsException(idx).getMessage());
      }
      return (readOnly) || (UNMODIFIABLE.equals(list.getClass()));
    }
    return readOnly;
  }
  
  public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
  {
    if ((base instanceof List))
    {
      FeatureDescriptor[] descs = new FeatureDescriptor[((List)base).size()];
      for (int i = 0; i < descs.length; i++)
      {
        descs[i] = new FeatureDescriptor();
        descs[i].setDisplayName("[" + i + "]");
        descs[i].setExpert(false);
        descs[i].setHidden(false);
        descs[i].setName("" + i);
        descs[i].setPreferred(true);
        descs[i].setValue("resolvableAtDesignTime", Boolean.FALSE);
        descs[i].setValue("type", Integer.class);
      }
      return Arrays.asList(descs).iterator();
    }
    return null;
  }
  
  public Class<?> getCommonPropertyType(ELContext context, Object base)
  {
    if ((base != null) && ((base instanceof List))) {
      return Integer.class;
    }
    return null;
  }
  
  private static final int coerce(Object property)
  {
    if ((property instanceof Number)) {
      return ((Number)property).intValue();
    }
    if ((property instanceof Character)) {
      return ((Character)property).charValue();
    }
    if ((property instanceof Boolean)) {
      return ((Boolean)property).booleanValue() ? 1 : 0;
    }
    if ((property instanceof String)) {
      return Integer.parseInt((String)property);
    }
    throw new IllegalArgumentException(property != null ? property.toString() : "null");
  }
}

/* Location:
 * Qualified Name:     javax.el.ListELResolver
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

import java.beans.FeatureDescriptor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class MapELResolver
  extends ELResolver
{
  private static final Class UNMODIFIABLE = Collections.unmodifiableMap(new HashMap()).getClass();
  private final boolean readOnly;
  
  public MapELResolver()
  {
    readOnly = false;
  }
  
  public MapELResolver(boolean readOnly)
  {
    this.readOnly = readOnly;
  }
  
  public Object getValue(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base instanceof Map))
    {
      context.setPropertyResolved(true);
      return ((Map)base).get(property);
    }
    return null;
  }
  
  public Class<?> getType(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base instanceof Map))
    {
      context.setPropertyResolved(true);
      Object obj = ((Map)base).get(property);
      return obj != null ? obj.getClass() : null;
    }
    return null;
  }
  
  public void setValue(ELContext context, Object base, Object property, Object value)
    throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base instanceof Map))
    {
      context.setPropertyResolved(true);
      if (readOnly) {
        throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass().getName() }));
      }
      try
      {
        ((Map)base).put(property, value);
      }
      catch (UnsupportedOperationException e)
      {
        throw new PropertyNotWritableException(e);
      }
    }
  }
  
  public boolean isReadOnly(ELContext context, Object base, Object property)
    throws NullPointerException, PropertyNotFoundException, ELException
  {
    if (context == null) {
      throw new NullPointerException();
    }
    if ((base instanceof Map))
    {
      context.setPropertyResolved(true);
      return (readOnly) || (UNMODIFIABLE.equals(base.getClass()));
    }
    return readOnly;
  }
  
  public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
  {
    if ((base instanceof Map))
    {
      Iterator itr = ((Map)base).keySet().iterator();
      List<FeatureDescriptor> feats = new ArrayList();
      while (itr.hasNext())
      {
        Object key = itr.next();
        FeatureDescriptor desc = new FeatureDescriptor();
        desc.setDisplayName(key.toString());
        desc.setExpert(false);
        desc.setHidden(false);
        desc.setName(key.toString());
        desc.setPreferred(true);
        desc.setValue("resolvableAtDesignTime", Boolean.FALSE);
        desc.setValue("type", key.getClass());
        feats.add(desc);
      }
      return feats.iterator();
    }
    return null;
  }
  
  public Class<?> getCommonPropertyType(ELContext context, Object base)
  {
    if ((base instanceof Map)) {
      return Object.class;
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     javax.el.MapELResolver
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

public abstract class MethodExpression
  extends Expression
{
  public abstract MethodInfo getMethodInfo(ELContext paramELContext)
    throws NullPointerException, PropertyNotFoundException, MethodNotFoundException, ELException;
  
  public abstract Object invoke(ELContext paramELContext, Object[] paramArrayOfObject)
    throws NullPointerException, PropertyNotFoundException, MethodNotFoundException, ELException;
}

/* Location:
 * Qualified Name:     javax.el.MethodExpression
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

public class MethodInfo
{
  private final String name;
  private final Class<?>[] paramTypes;
  private final Class<?> returnType;
  
  public MethodInfo(String name, Class<?> returnType, Class<?>[] paramTypes)
  {
    this.name = name;
    this.returnType = returnType;
    this.paramTypes = paramTypes;
  }
  
  public String getName()
  {
    return name;
  }
  
  public Class<?>[] getParamTypes()
  {
    return paramTypes;
  }
  
  public Class<?> getReturnType()
  {
    return returnType;
  }
}

/* Location:
 * Qualified Name:     javax.el.MethodInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

public class MethodNotFoundException
  extends ELException
{
  public MethodNotFoundException() {}
  
  public MethodNotFoundException(String message)
  {
    super(message);
  }
  
  public MethodNotFoundException(String message, Throwable cause)
  {
    super(message, cause);
  }
  
  public MethodNotFoundException(Throwable cause)
  {
    super(cause);
  }
}

/* Location:
 * Qualified Name:     javax.el.MethodNotFoundException
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;

public class PropertyNotFoundException
  extends ELException
{
  public PropertyNotFoundException() {}
  
  public PropertyNotFoundException(String message)
  {
    super(message);
  }
  
  public PropertyNotFoundException(String message, Throwable cause)
  {
    super(message, cause);
  }
  
  public PropertyNotFoundException(Throwable cause)
  {
    super(cause);
  }
}

/* Location:
 * Qualified Name:     javax.el.PropertyNotFoundException
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package javax.el;
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156

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-2019. Infinite Loop Ltd