Interface FluentImports<T>

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 Type
    Method
    Description
    default T
    addImport(Class<?> type)
     
    Adds an import statement using its string representation.
    Retrieves the current set of import statements.
    default Set<String>
    Retrieves a set containing the string representations of Java import statements.
  • Method Details

    • addImport

      T addImport(String imp)
      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

      default T addImport(Class<?> type)
    • getImports

      Imports getImports()
      Retrieves the current set of import statements.
      Returns:
      an Imports object containing the current set of import statements
    • getJavaImports

      default Set<String> getJavaImports()
      Retrieves a set containing the string representations of Java import statements.
      Returns:
      a Set of strings representing the current Java import statements