Interface Import

All Superinterfaces:
Internal, StaticCapable, StaticCapableSource<Import>

public interface Import extends Internal, StaticCapableSource<Import>
Represents an imported element in a JavaSource.
Author:
Lincoln Baxter, III
  • Field Details

  • Method Details

    • getPackage

      String getPackage()
      Returns the package part of a import.
      Returns:
      the package of this import
    • getSimpleName

      String getSimpleName()
      Returns the simple name of a import.
      Returns:
      the simple class name of a import or WILDCARD, if this is a wildcard import.
      See Also:
    • getQualifiedName

      String getQualifiedName()
      Returns the qualified name, so it's the same as 'getPackage() + "." + getSimpleName()'. In the case this is a wildcard import, the whole import including a '*' at the end is returned.
      Returns:
      the qualified name or the full name if this is a wildcard import
    • isWildcard

      boolean isWildcard()
      Checks if this import is a wildcard (*) import.
      Returns:
      true if this is a wildcard import, false otherwise
    • setName

      Import setName(String name)
      Sets the data of this import object. The data is the part of a import statement which is between import and ;.

      This method is not intended to be called from externally.

      Parameters:
      name - the actual data of the import
      Returns:
      this