@ SuppressWarnings ( "unchecked" ) static synchronized < S extends Storable > GenericStorableCodec < S > getInstance ( GenericStorableCodecFactory factory , GenericEncodingStrategy < S > encodingStrategy , boolean isMaster , Layout layout , RawSupport support ) throws SupportException { Object layoutKey = layout == null ? null : new LayoutKey ( layout ) ; Object key = KeyFactory . createKey ( new Object [ ] { encodingStrategy , isMaster , layoutKey } ) ; Class < ? extends S > storableImpl = ( Class < ? extends S > ) cCache . get ( key ) ; if ( storableImpl == null ) { storableImpl = generateStorable ( encodingStrategy , isMaster , layout ) ; cCache . put ( key , storableImpl ) ; } return new GenericStorableCodec < S > ( key , factory , encodingStrategy . getType ( ) , storableImpl , encodingStrategy , layout , support ) ; }
Returns an instance of the codec . The Storable type itself may be an interface or a class . If it is a class then it must not be final and it must have a public no - arg constructor .