FileDocCategorySizeDatePackage
ResourceBundleELResolver.javaAPI DocApache Tomcat 6.0.143815Fri Jul 20 04:20:34 BST 2007javax.el

ResourceBundleELResolver

public class ResourceBundleELResolver extends ELResolver

Fields Summary
Constructors Summary
public ResourceBundleELResolver()

		super();
	
Methods Summary
public java.lang.ClassgetCommonPropertyType(javax.el.ELContext context, java.lang.Object base)

		if (base instanceof ResourceBundle) {
			return String.class;
		}
		return null;
	
public java.util.IteratorgetFeatureDescriptors(javax.el.ELContext context, java.lang.Object base)

		if (base instanceof ResourceBundle) {
			List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
			Enumeration e = ((ResourceBundle) base).getKeys();
			FeatureDescriptor feat;
			String key;
			while (e.hasMoreElements()) {
				key = (String) e.nextElement();
				feat = new FeatureDescriptor();
				feat.setDisplayName(key);
				feat.setExpert(false);
				feat.setHidden(false);
				feat.setName(key);
				feat.setPreferred(true);
				feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
				feat.setValue(TYPE, String.class);
				feats.add(feat);
			}
			return feats.iterator();
		}
		return null;
	
public java.lang.ClassgetType(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)

		if (context == null) {
			throw new NullPointerException();
		}
		
		if (base instanceof ResourceBundle) {
			context.setPropertyResolved(true);
		}
		
		return null;
	
public java.lang.ObjectgetValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)

		if (context == null) {
			throw new NullPointerException();
		}
		
		if (base instanceof ResourceBundle) {
			context.setPropertyResolved(true);

			if (property != null) {
				try {
					return ((ResourceBundle) base).getObject(property
							.toString());
				} catch (MissingResourceException mre) {
					return "???" + property.toString() + "???";
				}
			}
		}

		return null;
	
public booleanisReadOnly(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)

		if (context == null) {
			throw new NullPointerException();
		}
		
		if (base instanceof ResourceBundle) {
			context.setPropertyResolved(true);
		}
		
		return true;
	
public voidsetValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)

		if (context == null) {
			throw new NullPointerException();
		}
		
		if (base instanceof ResourceBundle) {
			context.setPropertyResolved(true);
			throw new PropertyNotWritableException(message(context,
					"resolverNotWriteable", new Object[] { base.getClass()
							.getName() }));
		}