- Type Parameters:
T- the type of the implementing class to allow method chaining
- All Known Subinterfaces:
Knowledge,RuleSession<S>,RuleSetContext<C,,R> RuntimeContext<C>,StatefulSession,StatelessSession
- All Known Implementing Classes:
AbstractSessionWrapper,Configuration,KnowledgeWrapper
public interface FluentImports<T>
Represents an entity capable of managing Java imports in a fluent manner.
Allows for adding import statements using both string representations and
Class objects.
Additionally, it provides methods to retrieve the currently added import statements.-
Method Summary
Modifier and TypeMethodDescriptiondefault TAdds an explicit type import.Adds an import statement using its string representation.Retrieves the current set of import statements.Deprecated.
-
Method Details
-
addImport
Adds an import statement using its string representation.- Parameters:
imp- the full canonical name of the class or package to be imported- Returns:
- this instance to allow for method chaining
-
addImport
Adds an explicit type import.- Parameters:
type- the class to be imported- Returns:
- an instance of the implementing class to allow for method chaining
- Throws:
IllegalArgumentException- if the canonical name of the class is null
-
getImports
Imports getImports()Retrieves the current set of import statements.- Returns:
- an
Importsobject containing the current set of import statements
-
getJavaImports
Deprecated.Use theImports.asJavaImportStatements(StringBuilder)method insteadRetrieves a set containing the string representations of Java import statements.- Returns:
- a
Setof strings representing the current Java import statements
-
Imports.asJavaImportStatements(StringBuilder)method instead