public Context deepCopy ( ) { Context below = null ; if ( outer != null ) { below = outer . deepCopy ( ) ; } Context result = new Context ( assistantFactory , location , title , below ) ; result . threadState = threadState ; for ( ILexNameToken var : keySet ( ) ) { Value v = get ( var ) ; result . put ( var , v . deepCopy ( ) ) ; } return result ; }
Make a deep copy of the context using Value . deepCopy . Every concrete subclass must implements its own version of this method .