| Constructor and Description |
|---|
Method(Scanner s,
Modifiers modifiers,
Type type,
Token nameToken,
java.util.List<FormalParameter> params,
java.util.List<java.lang.String> thrownTypeNames) |
| Modifier and Type | Method and Description |
|---|---|
CodeBlock |
getBody() |
boolean |
getBodyContainsOffset(int offs) |
int |
getBodyEndOffset() |
int |
getBodyStartOffset() |
java.lang.String |
getDocComment() |
Modifiers |
getModifiers() |
java.lang.String |
getName()
Returns the "name" of this node.
|
java.lang.String |
getNameAndParameters() |
int |
getNameEndOffset()
Returns the end offset of the "name" of this node.
|
int |
getNameStartOffset()
Returns the start offset of the "name" of this node.
|
FormalParameter |
getParameter(int index) |
int |
getParameterCount() |
java.util.Iterator<FormalParameter> |
getParameterIterator() |
TypeDeclaration |
getParentTypeDeclaration() |
int |
getThrownTypeNameCount() |
Type |
getType() |
boolean |
isConstructor() |
boolean |
isDeprecated() |
boolean |
isStatic()
Shortcut for
getModifiers().isStatic(); useful since
getModifiers() may return null. |
void |
setBody(CodeBlock body) |
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 Method(Scanner s, Modifiers modifiers, Type type, Token nameToken, java.util.List<FormalParameter> params, java.util.List<java.lang.String> thrownTypeNames)
public CodeBlock getBody()
public boolean getBodyContainsOffset(int offs)
public int getBodyEndOffset()
public int getBodyStartOffset()
public java.lang.String getDocComment()
public Modifiers getModifiers()
public java.lang.String getNameAndParameters()
public FormalParameter getParameter(int index)
public int getParameterCount()
public java.util.Iterator<FormalParameter> getParameterIterator()
public int getThrownTypeNameCount()
public Type getType()
public boolean isConstructor()
public boolean isDeprecated()
public void setBody(CodeBlock body)
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