public static BackportedJsonStringEncoder getInstance ( ) { SoftReference < BackportedJsonStringEncoder > ref = _threadEncoder . get ( ) ; BackportedJsonStringEncoder enc = ( ref == null ) ? null : ref . get ( ) ; if ( enc == null ) { enc = new BackportedJsonStringEncoder ( ) ; _threadEncoder . set ( new SoftReference < BackportedJsonStringEncoder > ( enc ) ) ; } return enc ; }
Factory method for getting an instance ; this is either recycled per - thread instance or a newly constructed one .