Class LibPhoneNumberCountryResolver
java.lang.Object
com.irurueta.authserver.authorization.infrastructure.sms.LibPhoneNumberCountryResolver
- All Implemented Interfaces:
PhoneCountryResolver
PhoneCountryResolver over libphonenumber: the region of an E.164 number.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.i18n.phonenumbers.PhoneNumberUtilThe libphonenumber entry point. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
phoneNumberUtil
private final com.google.i18n.phonenumbers.PhoneNumberUtil phoneNumberUtilThe libphonenumber entry point.
-
-
Constructor Details
-
LibPhoneNumberCountryResolver
public LibPhoneNumberCountryResolver()
-
-
Method Details
-
countryOf
Description copied from interface:PhoneCountryResolverFinds the country of a number.- Specified by:
countryOfin interfacePhoneCountryResolver- Parameters:
phone- the number.- Returns:
- the upper-case ISO 3166-1 alpha-2 code, or empty when the number belongs to no known region.
-