Interface ImportContainer
-
@Deprecated public interface ImportContainerDeprecated.Contains the imports associated with a specific file.This class is deprecated and will be removed in a future release.
Use
ImportContainerinstead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidimportSymbol(Symbol symbol, java.lang.String alias)Deprecated.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.java.lang.StringtoString()Deprecated.Implementations must implement a customtoStringmethod that converts the collected imports to code that can be written to aCodeWriter.
-
-
-
Method Detail
-
importSymbol
void importSymbol(Symbol symbol, java.lang.String alias)
Deprecated.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.
- Parameters:
symbol- Symbol to import if it's in another namespace.alias- Alias to import the symbol as.
-
toString
java.lang.String toString()
Deprecated.Implementations must implement a customtoStringmethod that converts the collected imports to code that can be written to aCodeWriter.- Overrides:
toStringin classjava.lang.Object- Returns:
- Returns the collected imports as a string.
-
-