Package org.robolectric.shadows
Class NetworkSpecifierFactory
java.lang.Object
org.robolectric.shadows.NetworkSpecifierFactory
Factory to create
NetworkSpecifier types that are hidden on certain SDK levels.-
Method Summary
Modifier and TypeMethodDescriptionstatic NetworkSpecifiernewStringNetworkSpecifier(String specifier) Constructs a newStringNetworkSpecifierinstance, which has remained hidden on all SDKs (as of U), but has existed since theNetworkSpecifierhierarchy was created in O to represent a few more niche specifier types without defining a full-blown subclass ofNetworkSpecifierfor each of their particular use cases.
-
Method Details
-
newStringNetworkSpecifier
Constructs a newStringNetworkSpecifierinstance, which has remained hidden on all SDKs (as of U), but has existed since theNetworkSpecifierhierarchy was created in O to represent a few more niche specifier types without defining a full-blown subclass ofNetworkSpecifierfor each of their particular use cases. These meanings typically stabilize over time and then gain a concreteNetworkSpecifiersubtype in the public SDK, which tests should prefer when available.Depending on the
specifierstring's content, the returned instance will have one of several different meanings. SeeNetworkRequest.Builder.setNetworkSpecifier(String)documentation for more detail.
-