static Object workObject ( Map < String , Object > workList , String name , boolean isArray ) { logger . trace ( "get working object for {}" , name ) ; if ( workList . get ( name ) != null ) return workList . get ( name ) ; else { String [ ] parts = splitName ( name ) ; // parts: (parent, name, isArray) Map < String , Object > parentObj = ( Map < String , Object > ) workObject ( workList , parts [ 0 ] , false ) ; Object theObj = isArray ? new ArrayList < String > ( ) : new HashMap < String , Object > ( ) ; parentObj . put ( parts [ 1 ] , theObj ) ; workList . put ( name , theObj ) ; return theObj ; } }
find work object specified by name create and attach it if not exists