Interface Import
-
- All Superinterfaces:
Internal,StaticCapable,StaticCapableSource<Import>
public interface Import extends Internal, StaticCapableSource<Import>
Represents an imported element in aJavaSource.- Author:
- Lincoln Baxter, III
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringWILDCARD
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetPackage()Returns the package part of a import.java.lang.StringgetQualifiedName()Returns the qualified name, so it's the same as 'getPackage() + "." + getSimpleName()'.java.lang.StringgetSimpleName()Returns the simple name of a import.booleanisWildcard()Checks if this import is a wildcard (*) import.ImportsetName(java.lang.String name)Sets the data of this import object.-
Methods inherited from interface org.jboss.forge.roaster.Internal
getInternal
-
Methods inherited from interface org.jboss.forge.roaster.model.StaticCapable
isStatic
-
Methods inherited from interface org.jboss.forge.roaster.model.source.StaticCapableSource
setStatic
-
-
-
-
Field Detail
-
WILDCARD
static final java.lang.String WILDCARD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPackage
java.lang.String getPackage()
Returns the package part of a import.- Returns:
- the package of this import
-
getSimpleName
java.lang.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:
Class.getSimpleName()
-
getQualifiedName
java.lang.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(java.lang.String name)
Sets the data of this import object. The data is the part of aimportstatement which is betweenimportand;.This method is not intended to be called from externally.
- Parameters:
name- the actual data of the import- Returns:
this
-
-