public class Block extends AbstractParent implements ChildElement, java.lang.Cloneable
Constructor and Description |
---|
Block(Parent parent,
int firstLine)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Block |
clone() |
int |
getLine()
Return the block first line.
|
SourceModel |
getModel()
Return the root model.
|
Parent |
getParent()
Return the block parent.
|
java.util.SortedMap<java.lang.Integer,java.util.List<Var>> |
getVars()
Return the variable declarations.
|
void |
setLastLine(int lastLine)
Set the last line of the block.
|
addBlock, addComment, addSentence, addVar, getBlocks, getChildrenElements, getFirstLine, getLastLine, getReturnLine, getSentences, isComment, setFirstLine, setReturnLine
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countBlocks, getBlock, getContent, isBeforeReturnLine, lastBlock
public Block(Parent parent, int firstLine)
parent
- the parentfirstLine
- the first linepublic Parent getParent()
public SourceModel getModel()
public void setLastLine(int lastLine)
setLastLine
in interface Parent
setLastLine
in class AbstractParent
lastLine
- the last line of the blockpublic int getLine()
getLine
in interface ChildElement
public Block clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
Copyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence