|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkoala.dynamicjava.tree.Node
koala.dynamicjava.tree.ImportDeclaration
public class ImportDeclaration
This class represents the import declarations
| Constructor Summary | |
|---|---|
ImportDeclaration(java.util.List<IdentifierToken> ident,
boolean pkg,
boolean sttc)
Creates a new import declaration node |
|
ImportDeclaration(java.util.List<IdentifierToken> ident,
boolean pkg,
boolean sttc,
SourceInfo si)
Creates a new import declaration node |
|
ImportDeclaration(java.lang.String nm,
boolean pkg,
boolean sttc,
SourceInfo si)
Creates a new import declaration node |
|
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
java.lang.String |
getName()
Returns the name of the imported class or package |
|
boolean |
isPackage()
Returns true if the identifier represents a package, false if it represents a class |
|
boolean |
isStatic()
Returns true if the identifier represents a static import, false otherwise |
|
boolean |
isStaticImportClass()
Returns true if the identifier represents a class whose methods are being statically imported, false if it represents a single method or if it is not a static import |
|
void |
setName(java.lang.String s)
Sets the package name |
|
void |
setPackage(boolean b)
Sets the package property |
|
java.lang.String |
toString()
Implementation of toString for use in unit testing |
|
java.lang.String |
toStringHelper()
|
|
| Methods inherited from class koala.dynamicjava.tree.Node |
|---|
archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImportDeclaration(java.util.List<IdentifierToken> ident,
boolean pkg,
boolean sttc)
ident - a list of tokens that represents a package or a class namepkg - true if this declaration imports a packagesttc - true if this declaration is a static import
java.lang.IllegalArgumentException - if ident is null
public ImportDeclaration(java.util.List<IdentifierToken> ident,
boolean pkg,
boolean sttc,
SourceInfo si)
ident - a list of tokens that represents a package or a class namepkg - true if this declaration imports a packagesttc - true if this declaration is a static import
java.lang.IllegalArgumentException - if ident is null
public ImportDeclaration(java.lang.String nm,
boolean pkg,
boolean sttc,
SourceInfo si)
nm - a string that represents a package or a class namepkg - true if this declaration imports a packagesttc - true if this declaration is a static import
java.lang.IllegalArgumentException - if ident is null| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String s)
java.lang.IllegalArgumentException - if s is nullpublic boolean isPackage()
public boolean isStaticImportClass()
public void setPackage(boolean b)
public boolean isStatic()
public <T> T acceptVisitor(Visitor<T> visitor)
acceptVisitor in class Nodevisitor - the visitor to acceptpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringHelper()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||