@Override
    public Object setEL(PageContext pc, Object coll, String key, Object value) {
	// Objects
	if (coll instanceof Objects) {
	    ((Objects) coll).setEL(pc, KeyImpl.init(key), value);
	    return value;
	}
	// Collection
	else if (coll instanceof Collection) {
	    ((Collection) coll).setEL(KeyImpl.init(key), value);
	    return value;
	}
	// Map
	else if (coll instanceof Map) {
	    try {
		Reflector.setProperty(coll, key, value);
		return value;
	    }
	    catch (Throwable t) {
		ExceptionUtil.rethrowIfNecessary(t);
	    }
	    ((Map) coll).put(key, value);
	    return value;
	}
	// List
	else if (coll instanceof List) {
	    List list = ((List) coll);
	    int index = Caster.toIntValue(key, Integer.MIN_VALUE);
	    if (index == Integer.MIN_VALUE) return null;
	    if (list.size() >= index) list.set(index - 1, value);
	    else {
		while (list.size() < index - 1)
		    list.add(null);
		list.add(value);
	    }
	    return value;
	}
	// Native Array
	else if (Decision.isNativeArray(coll)) {
	    return ArrayUtil.setEL(coll, Caster.toIntValue(key, Integer.MIN_VALUE) - 1, value);
	}
	// Node
	else if (coll instanceof Node) {
	    return XMLUtil.setPropertyEL((Node) coll, KeyImpl.init(key), value);
	}
	// Direct Object Access
	if (pc.getConfig().getSecurityManager().getAccess(SecurityManager.TYPE_DIRECT_JAVA_ACCESS) == SecurityManager.VALUE_YES) {
	    Reflector.setPropertyEL(coll, key, value);
	    return value;
	}
	return null;
    }
@ Override public Object setEL ( PageContext pc , Object coll , String key , Object value ) { if ( coll instanceof Objects ) { ( ( Objects ) coll ) . setEL ( pc , KeyImpl . init ( key ) , value ) ; return value ; } else if ( coll instanceof Collection ) { ( ( Collection ) coll ) . setEL ( KeyImpl . init ( key ) , value ) ; return value ; } else if ( coll instanceof Map ) { try { Reflector . setProperty ( coll , key , value ) ; return value ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t ) ; } ( ( Map ) coll ) . put ( key , value ) ; return value ; } else if ( coll instanceof List ) { List list = ( ( List ) coll ) ; int index = Caster . toIntValue ( key , Integer . MIN_VALUE ) ; if ( index == Integer . MIN_VALUE ) return null ; if ( list . size ( ) >= index ) list . set ( index - 1 , value ) ; else { while ( list . size ( ) < index - 1 ) list . add ( null ) ; list . add ( value ) ; } return value ; } else if ( Decision . isNativeArray ( coll ) ) { return ArrayUtil . setEL ( coll , Caster . toIntValue ( key , Integer . MIN_VALUE ) - 1 , value ) ; } else if ( coll instanceof Node ) { return XMLUtil . setPropertyEL ( ( Node ) coll , KeyImpl . init ( key ) , value ) ; } if ( pc . getConfig ( ) . getSecurityManager ( ) . getAccess ( SecurityManager . TYPE_DIRECT_JAVA_ACCESS ) == SecurityManager . VALUE_YES ) { Reflector . setPropertyEL ( coll , key , value ) ; return value ; } return null ; }
@see lucee.runtime.util.VariableUtil#setEL(lucee.runtime.PageContext, java.lang.Object,
java.lang.String, java.lang.Object)