Class ImportStatement
- java.lang.Object
-
- de.skuzzle.enforcer.restrictimports.parser.ImportStatement
-
public final class ImportStatement extends Object
Represents an import statement that has been discovered while parsing a source file.
-
-
Constructor Summary
Constructors Constructor Description ImportStatement(String importName, int line, ImportType importType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetFqcn()StringgetImportName()Returns the import name including the 'static ' prefix if this represents a static import.intgetLine()The physical line within the source file in which the import has occurred.inthashCode()booleanisQualifiedTypeUsage()Whether this is an 'artificial' import that has been created from a full qualified type reference within the source rather than from a real import statement.StringtoString()
-
-
-
Constructor Detail
-
ImportStatement
public ImportStatement(String importName, int line, ImportType importType)
-
-
Method Detail
-
getLine
public int getLine()
The physical line within the source file in which the import has occurred. Number is always 1-based!- Returns:
- The line number of the matched imports.
-
getImportName
public String getImportName()
Returns the import name including the 'static ' prefix if this represents a static import.- Returns:
- The full import name.
-
getFqcn
public String getFqcn()
-
isQualifiedTypeUsage
public boolean isQualifiedTypeUsage()
Whether this is an 'artificial' import that has been created from a full qualified type reference within the source rather than from a real import statement.- Returns:
- Whether this represents a full qualified type use.
-
-