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

java.lang.Object
  extended by org.fife.rsta.ac.java.rjc.ast.AbstractTypeDeclarationNode
      extended by org.fife.rsta.ac.java.rjc.ast.NormalClassDeclaration
All Implemented Interfaces:
ASTNode, TypeDeclaration, TypeDeclarationContainer

public class NormalClassDeclaration
extends AbstractTypeDeclarationNode

A class declaration:

 NormalClassDeclaration:
    'class' Identifier [TypeParameters] ['extends' Type] ['implements' TypeList] ClassBody
 

Version:
1.0
Author:
Robert Futrell

Constructor Summary
NormalClassDeclaration(Scanner s, int offs, String className)
           
 
Method Summary
 void addImplemented(Type implemented)
           
 Type getExtendedType()
           
 int getImplementedCount()
           
 Iterator getImplementedIterator()
           
 Method getMethodContainingOffset(int offs)
          Gets the method in this class that contains a given offset.
 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.
 List getTypeParameters()
           
 String getTypeString()
           
 void setDeclarationEndOffset(Offset end)
           
protected  void setDeclarationOffsets(Offset start, Offset end)
          Sets the start and end offsets of this node.
 void setExtendedType(Type type)
           
 void setTypeParameters(List typeParams)
           
 
Methods inherited from class org.fife.rsta.ac.java.rjc.ast.AbstractTypeDeclarationNode
addMember, addTypeDeclaration, getBodyContainsOffset, getBodyEndOffset, getBodyStartOffset, getChildType, getChildTypeAtOffset, getChildTypeCount, getDocComment, getFieldIterator, getMember, getMemberCount, getMemberIterator, getMethodIterator, getMethodsByName, getModifiers, getPackage, isDeprecated, setBodyEndOffset, setBodyStartOffset, setDeprecated, setDocComment, setModifiers, setPackage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.fife.rsta.ac.java.rjc.ast.TypeDeclaration
getName
 
Methods inherited from interface org.fife.rsta.ac.java.rjc.ast.ASTNode
getNameEndOffset, getNameStartOffset
 

Constructor Detail

NormalClassDeclaration

public NormalClassDeclaration(Scanner s,
                              int offs,
                              String className)
Method Detail

addImplemented

public void addImplemented(Type implemented)

getExtendedType

public Type getExtendedType()

getImplementedCount

public int getImplementedCount()

getImplementedIterator

public Iterator getImplementedIterator()

getMethodContainingOffset

public Method getMethodContainingOffset(int offs)
Gets the method in this class that contains a given offset.

Parameters:
offs - The offset.
Returns:
The method containing the offset, or null if no method in this class contains the offset.

getTypeParameters

public List getTypeParameters()

getTypeString

public String getTypeString()

setExtendedType

public void setExtendedType(Type type)

setTypeParameters

public void setTypeParameters(List typeParams)

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.


Copyright © 2003-2011. All Rights Reserved.