public abstract class ImportDeclaration extends Node
This class is a base class for classes representing import declarations. Imports are optional for the
CompilationUnit.
An EmptyImportDeclaration is simply a semicolon among the import declarations.ImportDeclaration ::= "import" ( "static" )?NameExpr( "." "*" )? ";"
Node.ObserverRegistrationModeABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration| Constructor and Description |
|---|
ImportDeclaration() |
ImportDeclaration(Range range) |
| Modifier and Type | Method and Description |
|---|---|
static ImportDeclaration |
create(Range range,
Name name,
boolean isStatic,
boolean isAsterisk)
Factory method for import declarations.
|
addOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBegin, getChildNodes, getComment, getEnd, getNodeLists, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, getUserData, hasComment, hashCode, isPositionedAfter, isPositionedBefore, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, setAsParentNodeOf, setBegin, setBlockComment, setComment, setEnd, setLineComment, setParentNode, setRange, setUserData, toString, toString, tryAddImportToParentCompilationUnit, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitgetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfpublic ImportDeclaration()
public ImportDeclaration(Range range)
public static ImportDeclaration create(Range range, Name name, boolean isStatic, boolean isAsterisk)
range - the range the import declaration covers. Range.UNKNOWN if not known.name - the qualified name of the import.isStatic - whether the import is static.isAsterisk - whether the import is on demand.Copyright © 2007–2016. All rights reserved.