Interface Import
- All Superinterfaces:
Internal,StaticCapable,StaticCapableSource<Import>
Represents an imported element in a
JavaSource.- Author:
- Lincoln Baxter, III
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the package part of a import.Returns the qualified name, so it's the same as 'getPackage() + "." + getSimpleName()'.Returns the simple name of a import.booleanChecks if this import is a wildcard (*) import.Sets the data of this import object.Methods inherited from interface org.jboss.forge.roaster.Internal
getInternalMethods inherited from interface org.jboss.forge.roaster.model.StaticCapable
isStaticMethods inherited from interface org.jboss.forge.roaster.model.source.StaticCapableSource
setStatic
-
Field Details
-
WILDCARD
- See Also:
-
-
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
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
-