public void visit ( Paintable paintable , Object group ) { if ( context . isReady ( ) ) { String className = paintable . getClass ( ) . getName ( ) ; if ( painters . containsKey ( className ) ) { List < Painter > list = painters . get ( className ) ; for ( Painter painter : list ) { painter . paint ( paintable , group , context ) ; } } } }
The visitors visit function .