CodeBlock

/**
* @brief A code block, usually surrounded by curly braces.
*/

Inherit from CodeBlockDO

Primary key: element_hash_id: int

schema CodeBlock extends CodeBlockDO {
  @primary element_hash_id: int,
  number_of_statement: int,
  parent_hash_id: int,
  is_empty: int,
  location_hash_id: int,
  printable_text: string
}

CodeBlock::getParentHashId

/**
* @brief gets the parent hash id of this element.
* @return int
*/
pub fn getParentHashId(self: CodeBlock) -> int;

CodeBlock::getNumberOfStatement

/**
* @brief gets the number of statement of this element.
* @return int
*/
pub fn getNumberOfStatement(self: CodeBlock) -> int;

CodeBlock::getLocationHashId

/**
* @brief gets the location hash id of this element.
* @return int
*/
pub fn getLocationHashId(self: CodeBlock) -> int;

CodeBlock::getParent

/**
* @brief gets the parent code block of the try statement
* @return CodeBlock 
*/
pub fn getParent(self: CodeBlock) -> ElementParent;

CodeBlock::__all__

Data constraint method.

pub fn __all__(db: JavaDB) -> *CodeBlock;

CodeBlock::getLocation

/**
* @brief gets the location for the element.
* @return Location
*/
pub fn getLocation(self: CodeBlock) -> Location;

CodeBlock::getAnAncestor

/**
* @brief gets an ancestor of the element.
* @return ElementParent 
*/
pub fn getAnAncestor(self: CodeBlock) -> *ElementParent;

CodeBlock::getIsEmpty

/**
* @brief gets the is empty of this element.
* @return int
*/
pub fn getIsEmpty(self: CodeBlock) -> int;

CodeBlock::getPrintableText

/**
* @brief gets a printed representation of this element, including its structure where applicable.
* @return string.
*/
pub fn getPrintableText(self: CodeBlock) -> string;

CodeBlock::getAStatement

/**
* @brief gets the immediate child statement of this code block that occurs at the specified (zero-based) position.
* @return Statement 
*/
pub fn getAStatement(self: CodeBlock) -> *Statement;

CodeBlock::getStatement

/**
* @brief gets the i-th child statement of this code block that occurs at the specified (zero-based) position.
* @return Statement 
*/
pub fn getStatement(self: CodeBlock, idx: int) -> Statement;