@ SuppressWarnings ( "unchecked" ) public void registerTypeInstance ( Item item ) { if ( getTypeInstanceCache ( ) . register ( item ) ) { //check if the item implements hookable when its added for the first time if ( item instanceof IHookable ) { withEventHooks ( ( ( IHookable < Item > ) item ) . getEventHooks ( ) ) ; } } }
register a new type into the TypeInstances to be able to efficiently create thew ViewHolders