public TokenInfo toDTO(){
  return new TokenInfo(type,friendlyName,id,readOnly,available,active,serialNumber,label,slotIndex,status,Collections.unmodifiableList(getKeysAsDTOs()),Collections.unmodifiableMap(tokenInfo));
}

public TokenInfo toDTO ( ) { return new TokenInfo ( type , friendlyName , id , readOnly , available , active , serialNumber , label , slotIndex , status , Collections . unmodifiableList ( getKeysAsDTOs ( ) ) , Collections . unmodifiableMap ( tokenInfo ) ) ; }
converts this object to value object .
