| Constructor and Description |
|---|
Field(Scanner s,
Modifiers modifiers,
Type type,
Token t) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDocComment() |
Modifiers |
getModifiers() |
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() |
Type |
getType() |
boolean |
isDeprecated() |
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) |
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()
public Modifiers getModifiers()
public Type getType()
public boolean isDeprecated()
public void setDeprecated(boolean deprecated)
public void setDocComment(java.lang.String comment)
public TypeDeclaration getParentTypeDeclaration()
getParentTypeDeclaration in interface Memberpublic boolean isStatic()
getModifiers().isStatic(); useful since
getModifiers() may return null.isStatic in interface MemberMember.getModifiers()public void setParentTypeDeclaration(TypeDeclaration dec)
setParentTypeDeclaration in interface Memberpublic 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