givenHostsParserWith() — netty Function Reference
Architecture documentation for the givenHostsParserWith() function in DefaultHostsFileEntriesResolverTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c9bbb4ba_0238_249b_efc5_48551d67679c["givenHostsParserWith()"] 222d3f0b_2438_e015_0a1d_f30980f84e70["DefaultHostsFileEntriesResolverTest"] c9bbb4ba_0238_249b_efc5_48551d67679c -->|defined in| 222d3f0b_2438_e015_0a1d_f30980f84e70 b5801e64_24d5_9803_da0d_7fa7ae226879["shouldntFindWhenAddressTypeDoesntMatch()"] b5801e64_24d5_9803_da0d_7fa7ae226879 -->|calls| c9bbb4ba_0238_249b_efc5_48551d67679c 80c0349c_efd1_f33c_9ba1_915cc6e6ddca["shouldPickIpv4WhenBothAreDefinedButIpv4IsPreferred()"] 80c0349c_efd1_f33c_9ba1_915cc6e6ddca -->|calls| c9bbb4ba_0238_249b_efc5_48551d67679c 1fd006c3_f13b_0426_a6c9_9c769ba302d2["shouldPickIpv6WhenBothAreDefinedButIpv6IsPreferred()"] 1fd006c3_f13b_0426_a6c9_9c769ba302d2 -->|calls| c9bbb4ba_0238_249b_efc5_48551d67679c bff2572b_25b2_920c_c6ac_84de281cecbc["shouldntFindWhenAddressesTypeDoesntMatch()"] bff2572b_25b2_920c_c6ac_84de281cecbc -->|calls| c9bbb4ba_0238_249b_efc5_48551d67679c 9015ab78_800e_52e1_eb24_7ee8e4f28177["shouldPickIpv4FirstWhenBothAreDefinedButIpv4IsPreferred()"] 9015ab78_800e_52e1_eb24_7ee8e4f28177 -->|calls| c9bbb4ba_0238_249b_efc5_48551d67679c 33b879ca_b112_1f56_5f11_2453a504977e["shouldPickIpv6FirstWhenBothAreDefinedButIpv6IsPreferred()"] 33b879ca_b112_1f56_5f11_2453a504977e -->|calls| c9bbb4ba_0238_249b_efc5_48551d67679c 867a4721_6cfc_a287_f585_63978abcfd2b["shouldNotRefreshHostsFileContentBeforeRefreshIntervalElapsed()"] 867a4721_6cfc_a287_f585_63978abcfd2b -->|calls| c9bbb4ba_0238_249b_efc5_48551d67679c 79b0f7a8_cbed_1c80_a21a_3a0c737311cd["shouldRefreshHostsFileContentAfterRefreshInterval()"] 79b0f7a8_cbed_1c80_a21a_3a0c737311cd -->|calls| c9bbb4ba_0238_249b_efc5_48551d67679c style c9bbb4ba_0238_249b_efc5_48551d67679c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
resolver/src/test/java/io/netty/resolver/DefaultHostsFileEntriesResolverTest.java lines 178–193
private HostsFileEntriesProvider.Parser givenHostsParserWith(final Map<String, List<InetAddress>> inet4Entries,
final Map<String, List<InetAddress>> inet6Entries) {
HostsFileEntriesProvider.Parser mockParser = mock(HostsFileEntriesProvider.Parser.class);
Answer<HostsFileEntriesProvider> mockedAnswer = new Answer<HostsFileEntriesProvider>() {
@Override
public HostsFileEntriesProvider answer(InvocationOnMock invocation) {
return new HostsFileEntriesProvider(inet4Entries, inet6Entries);
}
};
when(mockParser.parseSilently()).thenAnswer(mockedAnswer);
when(mockParser.parseSilently(any(Charset.class))).thenAnswer(mockedAnswer);
return mockParser;
}
Domain
Subdomains
Called By
- shouldNotRefreshHostsFileContentBeforeRefreshIntervalElapsed()
- shouldPickIpv4FirstWhenBothAreDefinedButIpv4IsPreferred()
- shouldPickIpv4WhenBothAreDefinedButIpv4IsPreferred()
- shouldPickIpv6FirstWhenBothAreDefinedButIpv6IsPreferred()
- shouldPickIpv6WhenBothAreDefinedButIpv6IsPreferred()
- shouldRefreshHostsFileContentAfterRefreshInterval()
- shouldntFindWhenAddressTypeDoesntMatch()
- shouldntFindWhenAddressesTypeDoesntMatch()
Source
Frequently Asked Questions
What does givenHostsParserWith() do?
givenHostsParserWith() is a function in the netty codebase, defined in resolver/src/test/java/io/netty/resolver/DefaultHostsFileEntriesResolverTest.java.
Where is givenHostsParserWith() defined?
givenHostsParserWith() is defined in resolver/src/test/java/io/netty/resolver/DefaultHostsFileEntriesResolverTest.java at line 178.
What calls givenHostsParserWith()?
givenHostsParserWith() is called by 8 function(s): shouldNotRefreshHostsFileContentBeforeRefreshIntervalElapsed, shouldPickIpv4FirstWhenBothAreDefinedButIpv4IsPreferred, shouldPickIpv4WhenBothAreDefinedButIpv4IsPreferred, shouldPickIpv6FirstWhenBothAreDefinedButIpv6IsPreferred, shouldPickIpv6WhenBothAreDefinedButIpv6IsPreferred, shouldRefreshHostsFileContentAfterRefreshInterval, shouldntFindWhenAddressTypeDoesntMatch, shouldntFindWhenAddressesTypeDoesntMatch.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free