public static Object getVariable ( PageContext pc , Collection collection , String var ) throws PageException { StringList list = parse ( pc , new ParserString ( var ) , false ) ; if ( list == null ) throw new InterpreterException ( "invalid variable declaration [" + var + "]" ) ; while ( list . hasNextNext ( ) ) { collection = Caster . toCollection ( collection . get ( KeyImpl . init ( list . next ( ) ) ) ) ; } return collection . get ( KeyImpl . init ( list . next ( ) ) ) ; }
reads a subelement from a struct