org.fife.rsta.ac.java.rjc.ast
Interface TypeDeclaration

All Superinterfaces:
ASTNode, TypeDeclarationContainer
All Known Implementing Classes:
AbstractTypeDeclarationNode, EnumDeclaration, NormalClassDeclaration, NormalInterfaceDeclaration

public interface TypeDeclaration
extends ASTNode, TypeDeclarationContainer


Method Summary
 boolean getBodyContainsOffset(int offs)
           
 int getBodyEndOffset()
           
 int getBodyStartOffset()
           
 TypeDeclaration getChildType(int index)
           
 TypeDeclaration getChildTypeAtOffset(int offs)
          Returns the child type declaration of this one that contains the specified offset, if any.
 int getChildTypeCount()
           
 String getDocComment()
           
 Iterator getFieldIterator()
          Returns an iterator over all fields defined in this type.
 int getMemberCount()
           
 Iterator getMemberIterator()
          Returns an iterator over all members of this type.
 Iterator getMethodIterator()
          Returns an iterator over all methods defined in this type.
 List getMethodsByName(String name)
          Returns all methods declared in this type with the given name.
 Modifiers getModifiers()
           
 String getName()
          Returns the "name" of this node.
 Package getPackage()
          Returns the package this type is in.
 String getTypeString()
           
 boolean isDeprecated()
           
 void setDocComment(String comment)
           
 
Methods inherited from interface org.fife.rsta.ac.java.rjc.ast.ASTNode
getNameEndOffset, getNameStartOffset
 
Methods inherited from interface org.fife.rsta.ac.java.rjc.ast.TypeDeclarationContainer
addTypeDeclaration
 

Method Detail

getBodyContainsOffset

boolean getBodyContainsOffset(int offs)

getBodyEndOffset

int getBodyEndOffset()

getBodyStartOffset

int getBodyStartOffset()

getChildType

TypeDeclaration getChildType(int index)

getChildTypeAtOffset

TypeDeclaration getChildTypeAtOffset(int offs)
Returns the child type declaration of this one that contains the specified offset, if any.

Parameters:
offs - The offset.
Returns:
The type declaration, or null if the offset is outside of any child type declaration.

getChildTypeCount

int getChildTypeCount()

getDocComment

String getDocComment()

getFieldIterator

Iterator getFieldIterator()
Returns an iterator over all fields defined in this type.

Returns:
The iterator.
See Also:
getMethodIterator(), getMemberIterator()

getMemberCount

int getMemberCount()

getMemberIterator

Iterator getMemberIterator()
Returns an iterator over all members of this type. Note that an exception may be thrown if a method is added to this type while this iterator is being used.

Returns:
The iterator.
See Also:
getMethodIterator()

getMethodIterator

Iterator getMethodIterator()
Returns an iterator over all methods defined in this type.

Returns:
The iterator.
See Also:
getFieldIterator(), getMemberIterator()

getMethodsByName

List getMethodsByName(String name)
Returns all methods declared in this type with the given name. Does not check for methods with this name in subclasses.

Parameters:
name - The name to check for.
Returns:
Any method overloads with that name, or an empty list if none.

getModifiers

Modifiers getModifiers()

getName

String getName()
Description copied from interface: ASTNode
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.

getPackage

Package getPackage()
Returns the package this type is in.

Returns:
The package, or null if it's in the default package.

getTypeString

String getTypeString()

isDeprecated

boolean isDeprecated()

setDocComment

void setDocComment(String comment)


Copyright © 2003-2011. All Rights Reserved.