| Constructor and Description |
|---|
Field(Scanner s,
Modifiers modifiers,
Type type,
Token t) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDocComment()
Returns the doc comment for this member.
|
Modifiers |
getModifiers()
Returns the modifiers of this member.
|
java.lang.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.
|
TypeDeclaration |
getParentTypeDeclaration()
Returns the parent type declaration of this member.
|
Type |
getType()
Returns the type of this member.
|
boolean |
isDeprecated()
Returns whether this member is deprecated.
|
boolean |
isStatic()
Shortcut for
getModifiers().isStatic(); useful since
getModifiers() may return null. |
void |
setDeclarationEndOffset(Offset end) |
protected void |
setDeclarationOffsets(Offset start,
Offset end)
Sets the start and end offsets of this node.
|
void |
setDeprecated(boolean deprecated) |
void |
setDocComment(java.lang.String comment) |
void |
setParentTypeDeclaration(TypeDeclaration dec)
Sets the parent type declaration of this member.
|
java.lang.String |
toString()
Returns the name of this node (e.g.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getNameEndOffset, getNameStartOffsetpublic java.lang.String getDocComment()
Memberpublic Modifiers getModifiers()
Memberpublic Type getType()
Memberpublic boolean isDeprecated()
Memberpublic void setDeprecated(boolean deprecated)
public void setDocComment(java.lang.String comment)
public TypeDeclaration getParentTypeDeclaration()
MembergetParentTypeDeclaration in interface MemberMember.setParentTypeDeclaration(TypeDeclaration)public boolean isStatic()
getModifiers().isStatic(); useful since
getModifiers() may return null.isStatic in interface MemberMember.getModifiers()public void setParentTypeDeclaration(TypeDeclaration dec)
setParentTypeDeclaration in interface Memberdec - The parent type declaration.Member.getParentTypeDeclaration()public java.lang.String getName()
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.
public int getNameEndOffset()
getNameEndOffset in interface ASTNodepublic int getNameStartOffset()
getNameStartOffset in interface ASTNodepublic void setDeclarationEndOffset(Offset end)
protected void setDeclarationOffsets(Offset start, Offset end)
start - The start offset.end - The end offset.public java.lang.String toString()
getName()).
Subclasses can override this method if appropriate.toString in class java.lang.Object