Interface InterfaceCapableSource<T extends JavaSource<T>>

All Superinterfaces:
InterfaceCapable
All Known Subinterfaces:
JavaClassSource, JavaEnumSource, JavaInterfaceSource, JavaRecordSource

public interface InterfaceCapableSource<T extends JavaSource<T>> extends InterfaceCapable
Represents a JavaSource that may implement one or more interfaces.
Author:
Lincoln Baxter, III
  • Method Details

    • addInterface

      T addInterface(String type)
      Implements the specified interface name
      Parameters:
      type - the interface FQN
      Returns:
      this object
    • addInterface

      default T addInterface(Class<?> type)
      Implements the specified Class interface
      Parameters:
      type - the interface Class reference
      Returns:
      this object
    • addInterface

      default T addInterface(JavaInterface<?> type)
      Implements the specified JavaInterface
      Parameters:
      type - the interface
      Returns:
      this object
    • implementInterface

      T implementInterface(Class<?> type)
      Implements the specified Class interface and import their abstract methods, if any.
      Parameters:
      type - the interface Class reference
      Returns:
      this object
      See Also:
    • implementInterface

      T implementInterface(JavaInterface<?> type)
      Implements the specified JavaInterface and import their abstract methods, if any.
      Parameters:
      type - the interface JavaInterface reference
      Returns:
      this object
      See Also:
      • Methods#implementAbstractMethods(JavaInterface, MethodHolderSource)
    • removeInterface

      T removeInterface(String type)
      Removes the specified interface FQN
      Parameters:
      type - the interface FQN
      Returns:
      this object
    • removeInterface

      default T removeInterface(Class<?> type)
      Removes the specified interface
      Parameters:
      type - the interface Class
      Returns:
      this object
    • removeInterface

      default T removeInterface(JavaInterface<?> type)
      Removes the specified interface
      Parameters:
      type - the interface JavaInterface
      Returns:
      this object