Interface Member

All Superinterfaces:
ASTNode
All Known Implementing Classes:
AbstractMember, CodeBlock, Field, Method

public interface Member extends ASTNode
A marker for a member of a class or interface.
Version:
1.0
  • Method Details

    • getDocComment

      String getDocComment()
      Returns the doc comment for this member.
      Returns:
      This member's doc comment.
    • getNameEndOffset

      int getNameEndOffset()
      Description copied from interface: ASTNode
      Returns the end offset of the "name" of this node.
      Specified by:
      getNameEndOffset in interface ASTNode
      Returns:
      The end offset.
    • getNameStartOffset

      int getNameStartOffset()
      Description copied from interface: ASTNode
      Returns the start offset of the "name" of this node.
      Specified by:
      getNameStartOffset in interface ASTNode
      Returns:
      The start offset.
    • getModifiers

      Modifiers getModifiers()
      Returns the modifiers of this member.
      Returns:
      The modifiers.
    • 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.
    • getParentTypeDeclaration

      TypeDeclaration getParentTypeDeclaration()
      Returns the parent type declaration of this member.
      Returns:
      The parent type declaration.
      See Also:
    • getType

      Type getType()
      Returns the type of this member.
      Returns:
      This member's type.
    • isDeprecated

      boolean isDeprecated()
      Returns whether this member is deprecated.
      Returns:
      Whether this member is deprecated.
    • isStatic

      boolean isStatic()
      Shortcut for getModifiers().isStatic(); useful since getModifiers() may return null.
      Returns:
      Whether this member is static.
      See Also:
    • setParentTypeDeclaration

      void setParentTypeDeclaration(TypeDeclaration dec)
      Sets the parent type declaration of this member.
      Parameters:
      dec - The parent type declaration.
      See Also: