|
||||||||||
| 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(List<IdentifierToken> ident,
boolean pkg,
boolean sttc)
Creates a new import declaration node |
|
ImportDeclaration(List<IdentifierToken> ident,
boolean pkg,
boolean sttc,
SourceInfo si)
Creates a new import declaration node |
|
ImportDeclaration(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 |
|
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(String s)
Sets the package name |
|
void |
setPackage(boolean b)
Sets the package property |
|
String |
toString()
Implementation of toString for use in unit testing |
|
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(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
IllegalArgumentException - if ident is null
public ImportDeclaration(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
IllegalArgumentException - if ident is null
public ImportDeclaration(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
IllegalArgumentException - if ident is null| Method Detail |
|---|
public String getName()
public void setName(String s)
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 String toString()
toString in class Objectpublic String toStringHelper()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||