Class DocImportContainer
java.lang.Object
software.amazon.smithy.docgen.writers.DocImportContainer
- All Implemented Interfaces:
ImportContainer
A No-Op import container.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
importSymbol
(Symbol symbol, String s) Adds an import for the given symbol if and only if the "namespace" of the provided Symbol differs from the "namespace" associated with the ImportContainer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.smithy.codegen.core.ImportContainer
importSymbol, toString
-
Constructor Details
-
DocImportContainer
public DocImportContainer()
-
-
Method Details
-
importSymbol
Description copied from interface:ImportContainer
Adds an import for the given symbol if and only if the "namespace" of the provided Symbol differs from the "namespace" associated with the ImportContainer."namespace" in this context can mean whatever it needs to mean for the target programming language. In some languages, it might mean the path to a file. In others, it might mean a proper namespace string. It's up to subclasses to both track a current "namespace" and implement this method in a way that makes sense.
- Specified by:
importSymbol
in interfaceImportContainer
- Parameters:
symbol
- Symbol to import if it's in another namespace.s
- Alias to import the symbol as.
-