Object[] factoredProperties = new Object[] {propertyId};
// check for expected interface types per JSP.2.3.4
if (base instanceof IObjectSymbol)
{
final IObjectSymbol objSymbol = (IObjectSymbol) base;
typeDesc = objSymbol.getTypeDescriptor();
// although not stated explicitly stated by the spec, in practice (based on Sun RI),
// a list cannot have non-numeric indexed properties
// note: due to remove(Object) having different return types
// an object can't be both a List and a Map! So we can consider
// a List instanceof out of order
if (objSymbol.supportsCoercion(TypeConstants.TYPE_LIST))
{
typeDesc = null;
}
// per JSP.2.3.4, if instance of map (unconstrained in our terminology)
else if (objSymbol.supportsCoercion(TypeConstants.TYPE_MAP))
{
EList<ValueType> args = new BasicEList<ValueType>();
args.add(new StringLiteralType(propertyId.toString()));
ISymbol prop = objSymbol.call("get", args, propertyId.toString()); //$NON-NLS-1$
if (prop != null)
{
return prop;
}
typeDesc = objSymbol.coerce(TypeConstants.TYPE_MAP);
// handle string keys into maps that contain dots. Because type descriptor
// handle dotted property ids (i.e. 'x.y.z') as separate properties with
// intermediate parts, we need to handle this specially.
if (propertyId instanceof String && ((String)propertyId).indexOf('.')>-1)