Class ExampleMetadataProvider
- java.lang.Object
-
- software.amazon.awssdk.codegen.internal.ExampleMetadataProvider
-
public final class ExampleMetadataProvider extends Object
Class for loading and caching code example metadata from JSON files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExampleMetadataProvider.ExampleData
-
Constructor Summary
Constructors Constructor Description ExampleMetadataProvider(String exampleMetaPath)Creates an ExampleMetadataProvider instance for the given JSON file path.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>createLinkToCodeExample(Metadata metadata, String operationName)Creates a link to a code example for the given operation.List<ExampleMetadataProvider.ExampleData>getServiceCodeExamples(Metadata metadata)Gets all code examples for a specific service.
-
-
-
Constructor Detail
-
ExampleMetadataProvider
public ExampleMetadataProvider(String exampleMetaPath)
Creates an ExampleMetadataProvider instance for the given JSON file path.- Parameters:
exampleMetaPath- path to the example metadata JSON file
-
-
Method Detail
-
createLinkToCodeExample
public Optional<String> createLinkToCodeExample(Metadata metadata, String operationName)
Creates a link to a code example for the given operation.- Parameters:
metadata- the service metadataoperationName- the name of the operation to find an example for- Returns:
- Optional containing the HTML link to the code example, or empty if no example found
-
getServiceCodeExamples
public List<ExampleMetadataProvider.ExampleData> getServiceCodeExamples(Metadata metadata)
Gets all code examples for a specific service.- Parameters:
metadata- the service metadata- Returns:
- a list of examples for the service
-
-