Java: added compiled metadata generation
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2011 The Libphonenumber Authors
|
||||
* Copyright (C) 2025 Vladislav Kashin (modified)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
pub const METADATA: [u8; 201802] = [
|
||||
0x0A, 0xE9, 0x01, 0x0A, 0x1D, 0x12, 0x17, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31,
|
||||
@@ -15525,4 +15541,3 @@ pub const METADATA: [u8; 201802] = [
|
||||
0xFF, 0x01, 0xE2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0x01
|
||||
];
|
||||
|
||||
3
src/phonenumberutil/generated/mod.rs
Normal file
3
src/phonenumberutil/generated/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub mod metadata;
|
||||
pub mod test_metadata;
|
||||
|
||||
1039
src/phonenumberutil/generated/test_metadata.rs
Normal file
1039
src/phonenumberutil/generated/test_metadata.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,3 @@
|
||||
mod helper_constants;
|
||||
mod metadata;
|
||||
|
||||
pub(super) use helper_constants::{*};
|
||||
pub(super) use metadata::METADATA;
|
||||
|
||||
@@ -4,18 +4,17 @@ use protobuf::Message;
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::{
|
||||
interfaces::MatcherApi,
|
||||
proto_gen::{
|
||||
interfaces::MatcherApi, phonenumberutil::generated::metadata::METADATA, proto_gen::{
|
||||
phonemetadata::{PhoneMetadata, PhoneMetadataCollection, PhoneNumberDesc},
|
||||
phonenumber::PhoneNumber,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
use super::{
|
||||
PhoneNumberFormat, PhoneNumberType, ValidNumberLenType,
|
||||
errors::ValidationResultErr,
|
||||
helper_constants::{
|
||||
METADATA, OPTIONAL_EXT_SUFFIX, PLUS_SIGN, POSSIBLE_CHARS_AFTER_EXT_LABEL,
|
||||
OPTIONAL_EXT_SUFFIX, PLUS_SIGN, POSSIBLE_CHARS_AFTER_EXT_LABEL,
|
||||
POSSIBLE_SEPARATORS_BETWEEN_NUMBER_AND_EXT_LABEL, RFC3966_EXTN_PREFIX, RFC3966_PREFIX,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -6,6 +6,7 @@ pub mod phonenumberutil;
|
||||
mod phone_number_regexps_and_mappings;
|
||||
pub(self) mod helper_types;
|
||||
pub(self) mod comparisons;
|
||||
pub(crate) mod generated;
|
||||
|
||||
use std::sync::LazyLock;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user