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 NetworkSpecifier
newStringNetworkSpecifier
(String specifier) Constructs a newStringNetworkSpecifier
instance, which has remained hidden on all SDKs (as of U), but has existed since theNetworkSpecifier
hierarchy was created in O to represent a few more niche specifier types without defining a full-blown subclass ofNetworkSpecifier
for each of their particular use cases.
-
Method Details
-
newStringNetworkSpecifier
Constructs a newStringNetworkSpecifier
instance, which has remained hidden on all SDKs (as of U), but has existed since theNetworkSpecifier
hierarchy was created in O to represent a few more niche specifier types without defining a full-blown subclass ofNetworkSpecifier
for each of their particular use cases. These meanings typically stabilize over time and then gain a concreteNetworkSpecifier
subtype in the public SDK, which tests should prefer when available.Depending on the
specifier
string's content, the returned instance will have one of several different meanings. SeeNetworkRequest.Builder.setNetworkSpecifier(String)
documentation for more detail.
-