public int getTypeIdFor ( String slashname , boolean allocateIfNotFound ) { if ( allocateIfNotFound ) { return NameRegistry . getIdOrAllocateFor ( slashname ) ; } else { return NameRegistry . getIdFor ( slashname ) ; } }
Lookup the type ID for a string . First checks those allocated but not yet registered then those that are already registered . If not found then a new one is allocated and recorded .