Class ParseNodeFactoryRegistry
java.lang.Object
com.microsoft.kiota.serialization.ParseNodeFactoryRegistry
- All Implemented Interfaces:
ParseNodeFactory
This factory holds a list of all the registered factories for the various types of nodes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Map<String, ParseNodeFactory> List of factories that are registered by content type.static final ParseNodeFactoryRegistryDefault singleton instance of the registry to be used when registering new factories that should be available by default. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetParseNode(String contentType, InputStream rawResponse) Creates aParseNodefrom the givenInputStreamand content type.Returns the content type this factory's parse nodes can deserialize.
-
Field Details
-
defaultInstance
Default singleton instance of the registry to be used when registering new factories that should be available by default. -
contentTypeAssociatedFactories
List of factories that are registered by content type.
-
-
Constructor Details
-
ParseNodeFactoryRegistry
public ParseNodeFactoryRegistry()Default constructor for the registry.
-
-
Method Details
-
getValidContentType
Description copied from interface:ParseNodeFactoryReturns the content type this factory's parse nodes can deserialize.- Specified by:
getValidContentTypein interfaceParseNodeFactory- Returns:
- the content type this factory's parse nodes can deserialize.
-
getParseNode
@Nonnull public ParseNode getParseNode(@Nonnull String contentType, @Nonnull InputStream rawResponse) Description copied from interface:ParseNodeFactoryCreates aParseNodefrom the givenInputStreamand content type.- Specified by:
getParseNodein interfaceParseNodeFactory- Parameters:
contentType- the content type of theInputStream.rawResponse- theInputStreamto read from.- Returns:
- a
ParseNodethat can deserialize the givenInputStream.
-