public interface TypeDeclaration extends ASTNode, TypeDeclarationContainer
| Modifier and Type | Method and Description |
|---|---|
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() |
java.lang.String |
getDocComment() |
java.util.Iterator<Field> |
getFieldIterator()
Returns an iterator over all fields defined in this type.
|
Member |
getMember(int index) |
int |
getMemberCount() |
java.util.Iterator<Member> |
getMemberIterator()
Returns an iterator over all members of this type.
|
java.util.Iterator<Method> |
getMethodIterator()
Returns an iterator over all methods defined in this type.
|
java.util.List<Method> |
getMethodsByName(java.lang.String name)
Returns all methods declared in this type with the given name.
|
Modifiers |
getModifiers()
Returns the modifiers of this type declaration.
|
java.lang.String |
getName()
Returns the name of this type, unqualified.
|
java.lang.String |
getName(boolean fullyQualified)
Returns the name of this type.
|
Package |
getPackage()
Returns the package this type is in.
|
TypeDeclaration |
getParentType()
Returns the parent type declaration.
|
java.lang.String |
getTypeString() |
boolean |
isDeprecated() |
boolean |
isStatic()
Shortcut for
getModifiers().isStatic(); useful since
getModifiers() may return null. |
void |
setDocComment(java.lang.String comment) |
void |
setParentType(TypeDeclaration parentType)
Sets the parent type declaration for this type declaration.
|
getNameEndOffset, getNameStartOffsetaddTypeDeclarationboolean getBodyContainsOffset(int offs)
int getBodyEndOffset()
int getBodyStartOffset()
TypeDeclaration getChildType(int index)
TypeDeclaration getChildTypeAtOffset(int offs)
offs - The offset.null if the offset is
outside of any child type declaration.int getChildTypeCount()
java.lang.String getDocComment()
java.util.Iterator<Field> getFieldIterator()
getMethodIterator(),
getMemberIterator()Member getMember(int index)
int getMemberCount()
java.util.Iterator<Member> getMemberIterator()
getMethodIterator()java.util.Iterator<Method> getMethodIterator()
getFieldIterator(),
getMemberIterator()java.util.List<Method> getMethodsByName(java.lang.String name)
name - The name to check for.Modifiers getModifiers()
null if no
modifiers were specified.java.lang.String getName()
getName in interface ASTNodegetName(boolean)java.lang.String getName(boolean fullyQualified)
fullyQualified - Whether the name returned should be fully
qualified.getName()Package getPackage()
null if it's in the default package.TypeDeclaration getParentType()
null if there isn't
one.setParentType(TypeDeclaration)java.lang.String getTypeString()
boolean isDeprecated()
boolean isStatic()
getModifiers().isStatic(); useful since
getModifiers() may return null.getModifiers()void setDocComment(java.lang.String comment)
void setParentType(TypeDeclaration parentType)
parentType - The parent type declaration.getParentType()