private < T extends NamedDescriptor > T getOrCreateNamedDescriptor ( Class < T > type , String name , Map < String , T > descriptors , Store store ) { T descriptor = descriptors . get ( name ) ; if ( descriptor == null ) { descriptor = store . create ( type ) ; descriptor . setName ( name ) ; descriptors . put ( name , descriptor ) ; } return descriptor ; }
Get or create a named descriptor .