org.fife.rsta.ac.java.rjc.ast
Class ImportDeclaration

java.lang.Object
  extended by org.fife.rsta.ac.java.rjc.ast.ImportDeclaration
All Implemented Interfaces:
ASTNode

public class ImportDeclaration
extends Object

An import declaration in a class file.

Version:
1.0
Author:
Robert Futrell

Constructor Summary
ImportDeclaration(Scanner s, int offs, String info, boolean isStatic)
           
 
Method Summary
 String getName()
          Returns the "name" of this node.
 int getNameEndOffset()
          Returns the end offset of the "name" of this node.
 int getNameStartOffset()
          Returns the start offset of the "name" of this node.
 boolean isStatic()
           
 boolean isWildcard()
           
 void setDeclarationEndOffset(Offset end)
           
protected  void setDeclarationOffsets(Offset start, Offset end)
          Sets the start and end offsets of this node.
 void setStatic(boolean isStatic)
           
 String toString()
          Returns the name of this node (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImportDeclaration

public ImportDeclaration(Scanner s,
                         int offs,
                         String info,
                         boolean isStatic)
Method Detail

isStatic

public boolean isStatic()

isWildcard

public boolean isWildcard()

setStatic

public void setStatic(boolean isStatic)

getName

public String getName()
Returns the "name" of this node. This will be the name of the method, the name of the member or local variable, etc. For CodeBlocks it will be CodeBlock.NAME.

Note that this may not be unique. For example, a class with an overloaded method will have multiple methods with the same "name," just with different signatures.

Specified by:
getName in interface ASTNode
Returns:
The "name" of this node.

getNameEndOffset

public int getNameEndOffset()
Returns the end offset of the "name" of this node.

Specified by:
getNameEndOffset in interface ASTNode
Returns:
The end offset.

getNameStartOffset

public int getNameStartOffset()
Returns the start offset of the "name" of this node.

Specified by:
getNameStartOffset in interface ASTNode
Returns:
The start offset.

setDeclarationEndOffset

public void setDeclarationEndOffset(Offset end)

setDeclarationOffsets

protected void setDeclarationOffsets(Offset start,
                                     Offset end)
Sets the start and end offsets of this node.

Parameters:
start - The start offset.
end - The end offset.

toString

public String toString()
Returns the name of this node (e.g. the value of getName()). Subclasses can override this method if appropriate.

Overrides:
toString in class Object
Returns:
A string representation of this node.


Copyright © 2003-2011. All Rights Reserved.